Getting Started with the Brand Centre API

About

Brand Centre has a RESTful API to control most of it's capabilities programmatically. The Brand Centre API contains a series endpoints to control actions within the application. Making calls to these endpoints requires authentication via a generated HMAC based on a generated token/secret to keep your account secure.

When communicating with the API directly, JSON data will be used for outgoing and returned responses (including errors).

Most programming languages provide libraries for RESTful API communication which should make development of solutions to this API relatively easy.

Authentication

The Brand Center requires that you generate a series of HTTP headers in order to authenticate to your account. You can find more about this authentication here: API Authentication (note that Brand Centre and Site Flow use the same authentication method)

API Documentation

The various endpoints and their capabilities are documented on the Brand Centre API Documentation

Testing the API

If you are looking to test API calls to Site Flow you can visit the Brand Centre API Test page.

Error handling

Generally speaking, for 400 errors, the error response will be in a JSON structure as shown below:

{ 
"success": false, 
"error": { 
     "message": "Couldn't find a thing with that ID", 
     "name": "NotFound", 
     "code": 404 
     } 
}

The Site Flow API returns a JSON error along with one of the following error codes:

Error codeMeaning
400Service Unavailable – We’re temporarily offline for maintenance. Please try again later.
401Unauthorized – Your API key is not valid for this account or does not have the role required for this action
403Forbidden – Your API key doesn’t allow access to this resource
404Not Found – The specified resource could not be found. This could be due to an invalid object ID or a reference to something that no longer exists
500Internal Server Error – We had a problem with our server. Try again later.
503Service Unavailable – We’re temporarily offline for maintenance. Please try again later.