Errors
Shape of an error
{
"code": "bad-request/missing-param",
"message": "Missing channelId",
"params": "channelId"
}Channels errors are FLAT
If you are coming from the Orders API, errors there are wrapped: { "error": { "code", "message" } }. Channels wraps nothing. The code and message are at the root, as in the example.
A client reading body.error.code will get undefined on every error in this domain.
codestringStable, machine-readable code. It is the only thing you should branch on: messages change, codes do not.
messagestringEnglish description, meant for logs and debugging. Do NOT show it to a merchant as-is — it is neither translated nor written for them.
parameterstringThe field that caused the rejection, when the rejection is about a specific field. Present in channel patch validation errors.
paramsstringSame as `parameter`, under a different name, and sometimes with several comma-separated fields. Both keys coexist; check both.
typesSupportedstring[]Only on bad-request/invalid-channel-type: the full list of types accepted at setup.
warningsstring[]Only on conflict/sync-in-progress and the deletion 500: prose warnings about the state that blocked the operation.
How to read a code
The prefix before the slash tells you whose problem it is and therefore what to do:
| Prefix | HTTP | Whose | What to do |
|---|---|---|---|
bad-request/… | 400 | Yours: the request is malformed | Fix the request. Retrying unchanged fails the same way. |
unprocessable-entity/… | 422 | Yours, but semantic: the request is well-formed and something it references is not usable | Fix the referenced data (a location, an OAuth code). |
oauth/… | 400 | The authorization flow's | Almost always: send the merchant to authorize again. |
forbidden/…, Unauthorized, permission-denied | 403 | Permissions | Do not retry. Check your API key's scope. |
not-found/… | 404 | The resource does not exist | Do not retry. |
conflict/… | 409 | The system's current state | Retry later: something is in progress. |
internal-error…, server-error/… | 500 | Ours | Retry with exponential backoff. If it persists, report it. |
not-implemented | 501 | The route exists but does nothing | Never retry. See below. |
The ones you will actually see
Authentication and permissions
| Code | HTTP | When |
|---|---|---|
bad-request/missing-tenant | 401 | The API key did not resolve to a tenant. Note: it is 401, not 400, despite the bad-request/ prefix. |
permission-denied | 403 | Your API key lacks the permission the route requires. The response includes requiredPermission with the exact name. |
Unauthorized | 403 | The channel exists but belongs to another tenant. Note the capital letter and missing prefix: it is the only code shaped that way. |
forbidden/channel-access | 403 | Same case, on the Coppel routes. Two codes for one situation. |
Channel not found
Three different codes for "the channel does not exist"
This is not sloppiness in this documentation: three routes resolve the same case three ways. Handle all of them.
GET /channels/{channelId}→ 400bad-request/not-foundGET /channels/{channelId}/settings→ 404not-found/channelGET /channels/{channelId}/deletion-impact→ 500internal-error(known defect: the impact computation throws before reaching the 404 branch)
Setup and connection
| Code | HTTP | When |
|---|---|---|
bad-request/invalid-channel-type | 400 | type missing or unrecognized. Carries typesSupported, which lists twelve even though only ten actually get created. |
bad-request/invalid-auth | 400 | Missing Shein's tempToken, whose setup is not built. |
bad-request/location-required | 400 | Missing the fulfillment location on one of the ten types that require it. |
not-found/channel | 404 | There is no channel with that channelId in your account. Returned by POST /channels/reconnect. |
bad-request/channel-type | 400 | The channel exists but is not of the type the operation accepts. Returned by POST /channels/reconnect, which only takes MercadoLibre. |
bad-request/missing-param | 400 | A required field is missing; params says which. |
bad-request/invalid-config | 400 | config does not have the shape that type expects. |
bad-request/missing-url | 400 | Missing the store URL (WooCommerce). |
unprocessable-entity/location-invalid | 422 | The location does not belong to your tenant. |
unprocessable-entity/invalid-connection-code | 422 | The marketplace rejected the authorization code. |
unprocessable-entity/invalid-api-keys | 422 | The marketplace rejected the application keys. |
unprocessable-entity/intent-not-found | 422 | The intentNonce does not exist, was consumed, or expired. |
oauth/invalid-grant | 400 | The code was already used or expired. Valid 10 minutes, single use. |
oauth/invalid-client | 400 | Invalid application credentials. The merchant cannot fix this. |
oauth/invalid-scope | 400 | The requested scope is not valid. |
oauth/invalid-request | 400 | The OAuth request is malformed. |
oauth/token-exchange-failed | 400 | Generic exchange failure. |
Body and parameters
| Code | HTTP | When |
|---|---|---|
bad-request/missing-body | 400 | The method requires a body and it arrived empty. |
bad-request/invalid-json | 400 | The body does not parse as JSON. |
bad-request/invalid-param | 400 | A query parameter is not a number, or is negative. |
bad-request/invalid-pagination | 400 | page or limit out of range. |
bad-request/invalid-settings | 400 | Missing the settings envelope in the body. |
bad-request/invalid-entity-type | 400 | entityType outside person / organization. |
bad-request/invalid-preparation-time | 400 | preparationTime.value is not a positive number. |
bad-request/invalid-preparation-unit | 400 | preparationTime.unit outside minutes / hours / days. |
method-not-allowed | 405 | The method does not apply to that route. |
Async jobs
| Code | HTTP | When |
|---|---|---|
conflict/active-job | 409 | There is already an active job of that family on the channel. Retry later, or poll the running one. |
conflict/sync-in-progress | 409 | The channel cannot be deleted while a synchronization is running. |
not-found/job, not-found/sync-job, not-found/link-job, not-found/export-job | 404 | The job does not exist, or does not belong to this channel. |
bad-request/job-not-cancellable | 400 | The job already finished, or is in a state that does not allow cancellation. |
Marketplace-specific
| Code | HTTP | When |
|---|---|---|
unsupported-channel-type | 400 | You used a marketplace-specific route against a channel of another type. |
bad-request/invalid-channel-type | 400 | Same case on the Coppel routes: the channel is not of type coppel. |
channel-unavailable | 503 | The marketplace did not respond. |
shopify-error/unauthorized | 401 | The Shopify token expired or is invalid. Reconnect the channel. |
not-implemented | 501 | See below. |
`501 not-implemented` is not a transient error
The Amazon, Walmart and Shein POST routes always return 501. The routes exist and are wired, but their handlers are empty stubs: there is nothing behind them.
Do not treat it as a temporary failure and do not retry it. For those three marketplaces, writes go through the generic synchronization and export endpoints, not their specific route.
Server errors
The server-error/… codes are operation-specific — measured 28 distinct ones in the domain: server-error/validate-export, server-error/category-tree, server-error/sync-start-failed… — and they all mean the same thing to your client: something failed on our side in that particular operation.
Do not branch on each one. Branch on the server-error/ prefix and internal-error, retry with exponential backoff, and log the full code so it is useful when reporting.
`internal-error/deletion-failed` is NOT blindly retryable
It is the exception to the rule above. It means channel deletion got underway and stopped midway; the response carries deletedCounts with what was actually deleted. Retrying continues from there, but in the meantime a channel exists in an intermediate state. The response carries deletedCounts with what was actually deleted.
Next steps
- Connect a channel — setup errors, in context.
- Channels — the full model.