The API accepts parameters sent in JSON format. The success or failure of the request handling is signaled by the appropriate HTTP code of the returned response. HTTP code 200 means correct execution of the request, other codes indicate an error adequate to the reported code, e.g. HTTP 401 - authorization error.

Communication

The API is only accessible using HTTPS at api.100shoppers.com.

Authorization

Each request requires authorization using an *API Key (APIkey)* and *APISecret (APIsecret)*, which you can generate yourself within the administration panel. The authorization mechanism uses the X-BB-API-Authorization header, in which you must pass a sequence built according to the following pattern.

X-BB-API-Authorization: APIkey:signature signature = HMAC-SHA1( APIsecret, UTF-8-Encoding-Of( stringToSign ) ) ); stringToSign = HTTP-VERB + " " + requestPath + "\n" + JSONPayload;

NOTE: The maximum number of updated records in one package is 200, while packages can be multiple.

Example of a query

POST https://adm.getbuybox.com/api/v1/campaigns/{campaignId}/offers X-BB-API-Authorization: APIkey:signature Content-Type: application/json {   "offers":     [       {         "id":"1001",         "url":"https://offers.io/offer-1",         "price":9.90,         "available":true       },{         "id":"1002",         "url":"https://offers.io/offer-2",         "price":10.99,         "available":true         }     ] }

Answer

Content-Type: application/json {"result":"OK"}

Did this answer your question?