Zum Hauptinhalt springen
Omneya
EN
Start test system Try it
Developer docs menu

Errors

The error envelope, HTTP status codes, field-level error codes, and which errors to fix, retry or report to the shop operator.

The error envelope

Every error under /api/v1 uses the same structure:

{
  "error": {
    "code": "not_found",
    "message": "The requested resource does not exist.",
    "details": []
  }
}
  • code is a stable, machine-readable identifier. Base your handling on it.
  • message is for people and written in English. It can change at any time. Do not parse it.
  • details is either an empty list [] or an object with additional information. Its content depends on the code.

Status codes and error codes

Statuserror.codeCauseWhat to do
401unauthorizedKey missing, invalid, paused, expired or revoked. The reason is never stated.Check the key, ask the operator
403insufficient_scopeKey is valid but lacks a scope. details.required and details.missing list the scopes.Ask the operator to add the scope
403forbiddenAccess deniedDo not retry, ask the operator
404not_foundPath or resource does not exist, the customer is not linked to your key, or the API is not enabled for this shopCheck the path and IDs
405method_not_allowedWrong HTTP method for this pathUse the documented method
409order_deletedAn order with this external_order_id existed but has been deletedDo not retry, inform the operator
409conflictThe request conflicts with the current stateDo not retry unchanged
422validation_failedThe data is invalid. details lists every problem per field.Fix the data, then send again
422client_not_configuredThe access is not fully set up: no shop, shop deleted, or the default referrer is inactive or not assigned to the shopInform the operator
429rate_limitedToo many requests, or too many failed authentication attemptsWait for Retry-After seconds, then retry
500server_errorUnexpected error on the shop’s sideRetry later; if it persists, give the operator details.reference if present
other 4xx/5xxrequest_failedThe request could not be processedCheck the request; retry 5xx later

A complete list of all codes, including field-level codes, is in the error code reference.

Field errors

validation_failed lists all problems at once, not only the first. details is an object keyed by field name. Each field holds a list of { code, message } entries:

{
  "error": {
    "code": "validation_failed",
    "message": "The order was not created.",
    "details": {
      "items.1.sku": [{ "code": "unknown_article", "message": "Article 'SKU-9999' is not known." }],
      "payment_method_id": [
        {
          "code": "unknown_payment_method",
          "message": "Payment method 99 does not exist or is inactive."
        }
      ]
    }
  }
}

Field names use dots for nesting. items.1.sku is the field sku of the second item, because list positions count from 0. customer.billing.postcode is the postcode of the billing address.

Customer endpoints use the same structure, with the general message The request payload is invalid.

The field codes fall into a few groups:

  • Format: required, invalid_format, too_long, out_of_range, invalid_value, duplicate_value
  • Unknown references: unknown_payment_method, unknown_referrer, unknown_order_status, unknown_country, unknown_customer, unknown_article, unknown_value
  • Not offered: payment_method_not_available (the payment method exists but is not offered in your client’s shop, or the customer is not approved for the collective invoice; use an ID from listPaymentMethods)
  • Business rules: unsupported_currency, required_for_packstation, customer_address_incomplete, ambiguous_article, article_inactive, article_tax_unresolved, article_reserved

Each code is described in the error code reference. If you receive a field code you do not know, treat it like invalid_format: the field needs correcting.

Nothing is created on error

If the API answers with an error, nothing was created or changed by that request. For orders this means: no order, no customer, no stock reservation. You can fix the data and send the same request again.

Server errors

An unexpected error answers 500 with server_error. When an order could not be created, details.reference contains an identifier the operator can use to find the case:

{
  "error": {
    "code": "server_error",
    "message": "An unexpected error occurred. The order was not created.",
    "details": { "reference": "2f0c6a52-6a8e-4c1e-9d0e-0b7f3c8a1e44" }
  }
}

Retry later with unchanged data. See Retries and duplicate protection.

Maintenance

During maintenance the shop answers 503 Service Unavailable with the header X-App-Maintenance: 1. This is the only response that does not use the error envelope:

{
  "message": "Service Unavailable"
}

Make sure your error handling does not fail when error is missing. Treat 503 like any other temporary error and retry later.

Warnings

Some problems do not stop an order. The order is created, and the response lists them in warnings, for example no_shipping_method or collective_invoice_single_order. See Send an order.