ShopfloDevelopers

Docs

Errors and rate limits

The response envelope, the error format and how limits work.

Response envelope

A successful call returns HTTP 200 and an envelope with success set to true and your result in data. Some responses add a message, and list responses add paging fields such as current_page, page_size, max_pages and total_count.

Success
{
  "success": true,
  "data": { }
}

Errors

A failed call returns a 4xx or 5xx status and success set to false. error.code is a stable code you can match on, and error.message is text for people. Some errors add a data field with details, for example a list of reasons.

Error
{
  "success": false,
  "error": {
    "code": "GE_003",
    "message": "You're not authorized to access this resource"
  },
  "data": ["Missing, invalid or expired bearer token"]
}

Match on the HTTP status and error.code, not on message text. Messages can change.

Common codes

StatusCodeWhen
400GE_001The request is not valid. The message says which field or rule failed.
401GE_003The bearer token or channel API key is missing, invalid or expired, or the account is not active. data lists the reason.
404GE_004The resource you asked for does not exist for your account.
401AUTH_018Token request only. The client id or secret is wrong, or access is suspended, revoked or past its end date.
403GE_007The brand you asked for is not enabled for your account.
429AUTH_001You went over your per-minute limit.
429TOO_MANY_REQUESTSToken request only. Too many requests from one IP address.

Rate limits

  • Calls with your bearer token share one per-minute limit. The default is 60 requests a minute. Shopflo can agree a different limit with you.
  • Going over returns 429. Wait, then slow down.
  • The token endpoint has its own limit of 10 requests a minute per IP address. An IP address that makes more than 30 attempts in that window is blocked for 15 minutes. Cache your token instead of asking for a new one on every call.

Support

Email [email protected]. Include your client id (never your secret) and the time of the call. If a call failed, add the HTTP status and the error.code.