The SHIFT72 API is grouped into a number of areas of use. Developers can use this reference page to navigate to areas of interest.
Our OpenAPI documentation is a work in progress!
You can access the Shift72 API through your site’s domain, for example: https://yoursite.com/services/users/auth/sign_in
Authentication can be in two ways:
In both cases, you provide the token as the X-Auth-Token header on your requests.
Some endpoints return additional data (e.g. unpublished content) when accessed by an admin user or API key.
curl -i 'https://store.shift72.com/services/users/auth/sign_up' \
-d 'user[email]=me@email.com' \
-d 'user[password]=password' \
-X POST
curl -i 'https://store.shift72.com/services/users/auth/sign_in' \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{ "user": {
"email":"user@example.com",
"password":"123",
"remember_me":false }
}'
HttpStatus: 200
{
"auth_token":"3007b63f9947fad76cfc3347b1d47a",
"account":{
"user_id":2,
"email":"admin@store.shift72.com",
"name":"Admin User",
"users":[
{
"id":2,
"email":"admin@store.shift72.com",
"name":"Admin User",
"avatar_url":null,
"access_code":null,
"account_admin":null,
"dob":null
}
],
"bypass_cache":true
}
}
Errors will use HTTP status codes. In some cases a reason will be supplied.
Shift72’s API apply caching based on each API’s cache policy. This varies by endpoint, but some APIs that don’t change frequently may cache responses for up to 5 minutes.
You can opt-out of this cache by setting X-Bypass-Cache: 1 on your requests. Some APIs return different results for
admin users (e.g. unpublished content). In admin apps or scripts, it’s always best to use X-Bypass-Cache: 1 to avoid
receiving a mix of public and private responses.
While you can host your site behind a CDN or reverse proxy for better end-user performance, but it must be configured carefully to avoid incorrect behaviour:
X-Bypass-Cache, or the sig/e cookies are present. This ensures admins can see the preview build of the site, and that the admin app does not malfunction.If you’re considering adding a CDN or reverse proxy, please contact your account manager to ensure the correct configuration.
You can embed Shift72 Checkout into any website.
Integrating Checkout into your site