Flavours Partner API
Integrations

Errors

The responses of the token endpoint and the integration management endpoints, with their causes and fixes.

Two surfaces return errors, and they use different formats.

  • The token endpoint, POST /oauth/token, returns OAuth 2.0 error bodies (error and error_description).
  • The integration management endpoints under /api/v2/integrations use the standard Flavours envelope (meta and data) described on the Errors page.

Token endpoint

An error body has an error code and an error_description. Some also carry a hint. Branch your code on the HTTP status and the error code, not on the description text.

StatuserrorCauseWhat to do
401invalid_clientThe client ID is unknown, the client secret is wrong or missing, the secret was rotated, or the integration was revoked.Check both values. If they worked before, see Token lifecycle. Do not retry in a loop.
400unsupported_grant_typegrant_type is missing, or it is not client_credentials.Send grant_type=client_credentials.
400invalid_requestA required parameter is missing, for example client_id.Send all three fields.
429none (Flavours envelope)Too many token requests.Wait for Retry-After seconds.

Invalid client or secret

{
  "error": "invalid_client",
  "error_description": "Client authentication failed"
}

A missing client_secret returns the same response.

Wrong or missing grant type

{
  "error": "unsupported_grant_type",
  "error_description": "The authorization grant type is not supported by the authorization server.",
  "hint": "Check that all required parameters have been provided"
}

Only client_credentials is supported. Other grants, such as password, return this response.

Missing client ID

{
  "error": "invalid_request",
  "error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.",
  "hint": "Check the `client_id` parameter"
}

Rate limit

The token endpoint allows 10 requests per minute for each client_id and 30 requests per minute for each IP address. Every attempt counts, including failed ones. Every token response carries X-RateLimit-Limit and X-RateLimit-Remaining. When you exceed a limit, the endpoint returns 429 with a Retry-After header and the standard envelope:

{
  "meta": {
    "code": 429,
    "status": "error",
    "message": "Too many token requests. Please try again shortly."
  },
  "data": null
}

See Rate limiting for the headers.

Integration management

You create, edit, rotate, and revoke integrations in the Flavours web app, which calls these endpoints with your signed-in session. The errors below are what the web app surfaces. All use the standard envelope.

EndpointPurpose
GET /api/v2/integrationsList integrations. Never returns a secret.
POST /api/v2/integrationsCreate an integration. Returns the secret once.
PATCH /api/v2/integrations/{clientId}Replace the scopes.
POST /api/v2/integrations/{clientId}/rotateIssue a new secret. Returns it once.
DELETE /api/v2/integrations/{clientId}Revoke.
StatusMessageCauseWhat to do
403Only a business owner or manager can manage integrations.The user is limited to a branch.Use an owner or manager account.
403Please confirm your password to create an integration.No password sent, and none confirmed in the last 10 minutes. data.reason is PASSWORD_REQUIRED.Send the account password.
403Please confirm your password to rotate the integration secret.Same, on rotate.Send the account password.
403The password you entered is incorrect.Wrong password on create or rotate.Retry with the correct password.
404Resource not found.The integration does not exist in this market.Check the client ID.
422An integration with this name already exists.Duplicate name in the market.Choose another name.
422This integration has already been revoked.Edit, rotate, or revoke on a revoked integration.Create a new integration.
422A validation message; data lists the failing scopes entry (see validation errors)A scope key is unknown, or a key repeats.Use keys from Scopes.
429Too Many RequestsMore than 10 create or rotate requests per minute, or repeated wrong passwords.Wait, then retry.

The password rule on create and rotate has a 10-minute window: after a correct password, further create and rotate requests by the same user need no password for 10 minutes. Edit, revoke, and list never ask for it.

An admin account that has no market of its own must also send market_id; otherwise the response is 422 with field set to market.

Example 403 for a missing password:

{
  "meta": {
    "code": 403,
    "status": "error",
    "message": "Please confirm your password to create an integration."
  },
  "data": {
    "reason": "PASSWORD_REQUIRED"
  }
}

Example 422 for a duplicate name:

{
  "meta": {
    "code": 422,
    "status": "error",
    "message": "An integration with this name already exists."
  },
  "data": null
}

On this page