Whitelabel

πŸ›‘
This API is secured β€” you need to pass access token in the Authorization header.

Sending an invitation to advertisers to the shop

Typically, inviting advertisers to the shop is done via the panel in the “Advertisers” tab (visible only to whitelabel). This endpoint provides the same functionality via API, which is useful when we want to automate the process of inviting advertisers.

POST https://api.adshero.io/v1/invitations/shop/{shopId}/whitelabel HTTP/2
Authorization: Bearer {access_token}
Content-Type: application/json

{ 
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "sellerIds": [ "string" ],
  "brands": [ "string" ]
}
curl --location --request POST \
    'https://api.adshero.io/v1/invitations/shop/{shopId}/whitelabel' \ 
    --header 'Authorization: Bearer {access_token}' \
    --header 'Content-Type: application/json' \
    --data '{ 
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "sellerIds": [ "string" ],
      "brands": [ "string" ]
    }'

Parameter descriptions:

  • firstName β€” Seller’s first name.
  • lastName β€” Seller’s last name.
  • email β€” Email address β€” this is the address where the seller will receive the invitation to create an account. If incorrect, the seller won’t be able to use Ads.
  • sellerIds β€” Seller ID β€” Identifier of the seller from the feed (external_seller_id). It can be empty, but in that case, the brands field must be filled. Defines the products the seller has access to advertise.
  • brands β€” Brand β€” Identifier of the brand from the feed (brand). It can be empty, but in that case, the sellerIds field must be filled. Defines the products the seller has access to advertise.

Costs report

This endpoint returns a report of advertiser costs grouped by advertising units (business slots).

GET https://api.adshero.io/v1/public/statistics/whitelabel/businessSlot/{whitelabelHash}/costs?startDate=2024-01-01&page=1&pageSize=10 HTTP/2
Authorization: Bearer {access_token}
curl --location --request GET \
    'https://api.adshero.io/v1/public/statistics/whitelabel/businessSlot/{whitelabelHash}/costs?startDate=2024-01-01&page=1&pageSize=10' \
    --header 'Authorization: Bearer {access_token}'

Parameter descriptions:

  • whitelabelHash (path, required) β€” whitelabel identifier (UUID), provided by AdsHero as part of whitelabel configuration.
  • startDate (query, required) β€” start date, format YYYY-MM-DD.
  • endDate (query, optional) β€” end date, format YYYY-MM-DD, defaults to today’s date.
  • page (query, required) β€” page number (value > 0).
  • pageSize (query, required) β€” number of results per page (value > 0).

Example response:

{
  "data": [
    {
      "advertiserId": "adv-123",
      "sellerIds": ["seller-1", "seller-2"],
      "stats": {
        "bs-uuid-1": {
          "placementName": "Homepage",
          "regularWalletCost": "150.50",
          "bonusWalletCost": "25.00"
        }
      }
    }
  ],
  "meta": {
    "page": 1,
    "itemsPerPage": 10,
    "totalResults": 42,
    "hasNext": true,
    "hasPrevious": false
  }
}

Response field descriptions:

  • advertiserId β€” advertiser identifier.
  • sellerIds β€” set of seller identifiers (seller IDs) associated with the advertiser.
  • stats β€” map of costs per advertising unit, where the key is the business slot ID:
    • placementName β€” name of the advertising unit.
    • regularWalletCost β€” cost from the regular wallet.
    • bonusWalletCost β€” cost from the bonus wallet.
  • meta.page β€” current page.
  • meta.itemsPerPage β€” number of results per page.
  • meta.totalResults β€” total number of results.
  • meta.hasNext β€” whether a next page exists.
  • meta.hasPrevious β€” whether a previous page exists.