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, thebrandsfield 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, thesellerIdsfield 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, formatYYYY-MM-DD.endDate(query, optional) β end date, formatYYYY-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.