All API-methods (except login) requires a "token" in header of the request. This token is given the user when submitting a valid login request.
| Name | Type | Url | Parameters | Description |
|---|---|---|---|---|
| Login | POST | /api/login |
|
If valid login credentials, returns a usertoken that is needed for all other API-methods |
| Logout | POST | /api/logout | Deletes the login token used for this request |
| Name | Type | Url | Parameters | Description |
|---|---|---|---|---|
| Create password change request | POST | /api/password/reset |
|
Sends an email with a link containing a code to set a new password |
| Set new password | PUT | /api/password/new |
|
Sets the new password if userId and code is correct. Also checks that newPassword and confirmNewPassword are identical |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Get all | GET | /api/brand/all | All | Fetch all brands the current user has access to | |
| Get my brands | GET | /api/brand/my | All |
|
Fetch all brands (BrandMiniDto) the current user has access to and current brand in a BranFullDto. |
| Get by ID | GET | /api/brand/{Brand_id} | All | Fetch a brand if the current user has access | |
| Create | POST | /api/brand | Admin |
|
Creates a brand with the given paramenters. Field adPlatformTypes is a list of valid AdPlatformTypes. All wordPreferences are optional, and will get default values if not set |
| Update | PUT | /api/brand/{Brand_id} | Brandadmin for given brand |
|
Updates a brand with the given paramenters. Field adPlatformTypes is a list of valid AdPlatformTypes. All wordPreferences are optional, and will get default values if not set |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Fetch LinkedIn location facets | GET | /api/linkedin-location-search | Company admin |
|
Fetch LinkedIn location facets based on search word (Norway only) |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Fetch location from Google Places | GET | /api/google-places-search | User |
|
Fetch location from Google Places based on search word |
| Fetch location from Google Places | GET | /api/google-address-by-coordinates | User |
|
Fetch addresses from Google Geocode based on coordinates (reverse geocoding) |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Fetch Facebook targeting facets | GET | /api/facebook-targeting-search | Company admin |
|
Fetch Facebook targeting facets based on search query and type |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Get by ID | GET | /api/company/{Company_id} | All | Fetch a company if the current user has access | |
| Create | POST | /api/company | Brand admin for the brand this company will be conected to |
|
Creates a company with the given paramenters |
| Update | PUT | /api/company/{Company_id} | Company admin for the given company |
|
Updates a company with the given paramenters |
| Delete | DELETE | /api/company/{Brand_id} | Brand admin for given company or higher | Deactivates a company with the given id |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Get parent targeting group | GET | /api/targeting-group/parent/{parentId} | Brand admin | Fetches a targeting group based on ID. User must be brand admin with the associated brand, or company. Returns: targetingGroup | |
| Get targeting group by parent and company | GET | /api/targeting-group/parent/{parentId}/company/{companyId} | Brand admin | Fetches a targeting group based on parent ID and company ID. User must be brand admin with the associated brand, or company. Returns: targetingGroup (if exists), parentTargetingGroup | |
| Create parent targeting group (For Brand) | POST | /api/targeting-group | Admin |
|
Creates a Targeting group for the given brand |
| Update parent targeting group (For Brand) | PUT | /api/targeting-group/parent/{id} | Brand Admin |
|
Creates or updates a Targeting group for the given company with the parent given |
| Create or update targeting group for company | PUT | /api/targeting-group/parent/{parentId}/company/{companyId} | Brand Admin |
|
Creates or updates a Targeting group for the given company with the parent given |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Get token invite | GET | /api/user-access-invite/{token} | All | Fetches the user access invite with given token. Will give error if the token has an email associated with a user is already (should then redirect to login) | |
| Register user | POST | /api/user-access-invite/{token} | All |
|
Creates a new User from the invitation token. Uses invite token to fetch the invite. The email should be automatically filled from the token. |
| Cancel access invite | DELETE | /api/user-access-invite/{id} | User with at least the authority to create a similar invite | Deletes the user access invite with given id | |
| Respond to access invite | POST | /api/user-access-invite/respond | Only the user associated with the invite |
|
Responds to the user access invite. Accept is set to true for accepting and false for declining. |
| Invite user to brand | POST | /api/user-access-invite/inviteToBrand | Rights equal or higher that the invited user |
|
Invites a user to the given brand. If the user already has access or a pending invitation with the same or higher access level this will fail. If success; responds with full brand. |
| Invite user to company | POST | /api/user-access-invite/inviteToCompany | Rights equal or higher that the invited user |
|
Invites a user to the given company. If the user already has access or a pending invitation with the same or higher access level this will fail. If success; responds with full company. |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Delete access | DELETE | /api/user-access/{id} | All | Will remove access between company/brand and a user, as long as user has admin access and power equal to or above the targeted access. |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Get self | GET | /api/user/me | All | Fetches the user that is logged in | |
| Update self | PUT | /api/user/me | All |
|
Updates the user that is logged in |
| Update my password | POST | /api/user/me/password | All |
|
Updates the password for the user that is logged in |
| Get all | GET | /api/user/all | Admin | Fetches all users (only for testing purposes) The correct way to fetch users are via fetchBrand and fetchCompany (only users of brandadmin or above can see users on fetchBrand) |
|
| Get by ID | GET | /api/user/{User_id} |
Companyuser: fetch self, CompanyAdmin: fetch users of that company, BrandAdmin: fetch users of that brand Admin: fetch any user |
Fetches the user with given ID | |
| Accept user invite (create user) | POST | /api/user/new/{token} | All |
|
Creates a new User. Uses token to fetch the invite. The email should be automatically filled from the token. |
| Update | PUT | /api/user/{User_id} |
Update self: all, Update others: only systemadmin |
|
Updates an existing User |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Get all | GET | /api/default-campaign-type-size/all | All | Fetch all DefaultCampaignTypeSize |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Get all | GET | /api/campaign-type/all | Admin | Fetch all CampaignTypes | |
| Get by ID | GET | /api/campaign-type/{CampaignType_id} | Admin | Fetch one CampaignType by ID | |
| Create | POST | /api/campaign-type | Admin |
|
Creates a new CampaignType. Field adPlatformTypes is a list of valid AdPlatformTypes |
| Update | PUT | /api/campaign-type/{CampaignType_id} | Admin |
|
Updates an existing CampaignType. Field adPlatformTypes is a list of valid AdPlatformTypes |
| Change position | PUT | /api/campaign-type/{CampaignType_id}/move | Admin |
|
Sets position of CampaignType and moves siblings accordingly |
| Delete CampaignType | DELETE | /api/campaign-type/{CampaignType_id} | Admin | Deletes CampaignType |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Create | POST | /api/campaign-field-model-entry | All |
|
Creates a new CampaignFieldModelEntry for a CampaignFieldModel with the given id campaignFieldModelId. |
| Update | PUT | /api/campaign-field-model-entry/{CampaignFieldModelEntry_id} | All |
|
Updates an existing CampaignFieldModelEntry. |
| Delete | DELETE | /api/campaign-field-model-entry/{CampaignFieldModelEntry_id} | All | Deletes an existing CampaignFieldModelEntry |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Create | POST | /api/campaign-order | CompanyUser for given company |
|
Creates a new CampaignOrder. A CampaignOders budgets can be divided into three different types: budgetOption, budgetOptionCustom, fullCustom |
| Create multiple | POST | /api/campaign-orders | At least CompanyUser for all companies |
|
Creates one or several campaignOrders |
| Update | PUT | /api/campaign-order/{CampaignOrder_id} | CompanyUser for given company |
|
Updates an existing CampaignOrder. |
| Cancel | PUT | /api/campaign-order/{CampaignOrder_id}/cancel | CompanyUser for given company | Cancels CampaignOrder (either a running one, or a pending one) | |
| Get one campaign order (no login required) | GET | /api/campaign-order/{CampaignOrder_id}/ad | None | Used when rendering an ad. Only requires a valid campaignOrderId. Returns a much simpler version with only the needed data for rendering an ad. | |
| Get campaign orders by brand | GET | /api/campaign-order/by-brand/{Brand_id} | CompanyUser for at least one company under given brand | Fetches all CampaignOrders for the given brand | |
| Get campaign order with report | GET | /api/campaign-order/{CampaignOrder_id} | CompanyUser for given company | Fetches a full CampaignOrder including report data from ad platforms for the given campaign order. | |
| Fetch billable orders | GET | /api/campaign-order/billable | Admin | Fetches billable campaignorders. | |
| Billing | POST | /api/campaign-order/{CampaignOrder_id}/bill | Admin | Marks the given CampaignOrder as billed. |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Upload | POST | /api/campaign-field-picture | Any user |
|
Uploads a temp file that can be used in a campaignOrder as a CampaignFieldOption |
| Update | PUT | /api/campaign-field-picture/{id} | Any user |
|
Updates properties for a picture |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Upload | POST | /api/campaign-field-video | Any user |
|
Uploads a temp file that can be used in a campaignOrder as a CampaignFieldOption |
| Update | PUT | /api/campaign-field-video/{id} | Any user |
|
Updates properties for a video |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Upload | POST | /api/campaign-field-audio | Any user |
|
Uploads a temp file that can be used in a campaignOrder as a CampaignFieldOption |
| Update | PUT | /api/campaign-field-audio/{id} | Any user |
|
Updates properties for an audio |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Start import | POST | /api/import/run | Admin |
|
Starts importing companies for the given brandId using the submitted CSV-file |
| Get log | GET | /api/import/log | Admin | Get log for last import job |
| Name | Type | Url | UserLevel | Parameters | Description |
|---|---|---|---|---|---|
| Get configuration | GET | /api/conf | System admin | Get the current configurations. What is to be running, and what is paused | |
| Update configuration | PUT | /api/conf | System admin |
|
Updates configuration with the given values |