Suppliers error catalog

The Suppliers service (/suppliers/*) returns errors with this shape:

{ "code": "not-found", "message": "Purchase order not found" }

Branch your logic on code and the HTTP status, not on message: messages can change.

Errors common to the whole service

CodeHTTPCause
bad-request/missing-tenant401The request carries no tenant. Check your API key.
tenant/suspended403The tenant is suspended, for example because of billing.
permission-denied403The endpoint's permission is missing. The body carries requiredPermission with the missing permission.
not-found404The resource (purchase order, supplier, contact, address or payment) does not exist in your tenant, or the route does not exist.
internal-server-error500Internal error. Retry with increasing backoff.

Validation errors

When Fenicia rejects the content of a request, it returns 400 with code: "validation-error" and a message that says which datum is missing or invalid. Some endpoints return a more specific code:

CodeHTTPCause
validation-error400The content breaks a rule. Examples: the order is in another currency and fxRate is missing; batchNumber or expirationDate is missing for a variant with traceability; a supplier return asks for more pieces than are left.
validation/address400A supplier's address does not match the schema.
validation/contact400A supplier's contact does not match the schema.
payment/conflict409Two concurrent payments on the same order. Retry.

A rejected reception does not count as received

If a reception fails, the order keeps its status and quantities. Retrying the same reception is safe: Fenicia identifies the reception by its number within the order and does not duplicate the reception or the lots.

When to retry

StatusRetry?Notes
400NoFix the request according to the message.
401, 403NoCheck your API key, its permission and the tenant's status.
404NoThe resource does not exist in your tenant.
409YesAnother payment was in progress.
500Yes, with increasing backoffBefore retrying a reception, check the order's status.

Next steps