Errors
Every failed request to https://api.meykt.com/v1 returns the same JSON envelope with a machine-readable code. Codes are a permanent part of the API contract: they are added over time, but never renamed or repurposed within v1. Warnings are a separate concept — a warning means the request succeeded.
#Error format
A failed request returns a single top-level error object. There is no data key on an error response.
{
"error": {
"code": "validation_failed",
"message": "The order was rejected. No part of it was accepted — fix the listed fields and resend the complete order.",
"doc_url": "https://www.meykt.com/en/developers/errors/validation_failed",
"errors": [
{
"code": "validation_failed",
"message": "Number must be greater than or equal to 1",
"field": "items.0.quantity"
},
{
"code": "validation_failed",
"message": "String must contain at least 1 character(s)",
"field": "items.1.name"
}
]
}
}| Field | Always present | Meaning |
|---|---|---|
code | yes | Stable machine identifier. Branch on this. |
message | yes | Human-readable English text. May change at any time. |
field | no | Path to the offending field, when a single field caused the failure. |
doc_url | yes | Link to the reference page for this code. |
errors | no | Present for parsed validation details. Command/profile responses cap the list at 50; correct the listed issues and validate again. |
#code
code is the only value you should program against. It is stable forever — renaming a code would break existing integrations and is only possible in a new API version. Never match on message, and never parse the HTTP status alone: several distinct codes share the status 422.
New codes may be added at any time. Treat an unrecognised code as a generic failure of its HTTP status class rather than crashing.
#message
message targets a human reading a log or a terminal. The wording, punctuation and level of detail can change without notice. It often carries the specific detail that code cannot express — for example insufficient_scope names the missing scopes, and file_type_not_allowed names the file type that was actually detected. Log it; do not branch on it.
#field
field names the exact location in your request body. It is present when the failure can be attributed to one place, and it also appears on each entry inside errors[].
Two notations occur, depending on where the check happened:
- Schema validation uses dot notation for array indexes:
items.0.quantity,items.1.name,currency. - File reference and warning paths use bracket notation:
items[0].files[0].upload_id,items[2].sku.
Do not build a parser that assumes one notation. Treat field as an opaque label for display and logging.
#doc_url
doc_url points at the reference page for that code. Every code in the table below is addressable at /developers/errors/<code>, so an automated client can fetch an explanation for a failure it has not seen before without a lookup table.
#errors
On validation_failed, the API validates the whole request and returns every problem at once (up to 50 entries), so you do not have to fix one field per round trip. Each entry has the same code / message / field shape as the outer object.
Order creation is all-or-nothing: if errors[] is present, nothing was created. Correct all listed fields and resend the complete order — not just the corrected part.
#Error codes
| Code | HTTP | Cause | Fix |
|---|---|---|---|
snapshot_required | 409 | Snapshot expired or nonzero change cursor too old | Rebuild aggregate inventory from cursor=0 or read a new complete snapshot; positions require a new position snapshot |
inventory_snapshot_limit | 429 | Ten snapshots are active | Reuse one, close a completed position snapshot, or wait for expiry |
inventory_snapshot_closed | 409 | The position snapshot is closed | Start a new complete position snapshot with a new request ID |
unit_unsupported | 422 | A recorded unit is outside this contract | Use the supported piece base unit; no implicit conversion is performed |
inventory_projection_too_large | 409 | Authorized view exceeds 5000 entries | Preserve the previous view and contact support |
invalid_api_key | 401 | Key missing, unknown, revoked or expired | Check the Authorization: Bearer … header; verify in the dashboard that the key is still active; create a new one if needed |
insufficient_scope | 403 | The key does not carry the required scope | The message names the missing scopes; create a key with the matching scopes (there is no scope hierarchy — orders:write does not include orders:read) |
payload_too_large | 413 | JSON exceeds 256 KiB; upload file contents separately. | |
integration_profile_version_conflict | 409 | Requested format version is not active or needs revalidation. | |
integration_profile_response_unavailable | 502 | Operation processed; formatted response unavailable. Preserve business identity and read its canonical result. | |
invalid_json | 400 | The body is not valid JSON | Check the request body — usually a missing quote or a trailing comma |
validation_failed | 422 | One or more fields invalid — nothing was created | Walk errors[]; each entry names a field and a reason; resend the corrected complete order |
set_not_accepted | 422 | A set of the order breaks a set rule | Send the parts exactly as the bill of materials in Meykt lists them, or leave the parts out; put personalization on the line that becomes an item |
order_already_exists_with_different_content | 409 | The external_order_id already exists with different content | Do not invent a new number if this is meant to be the same order — align the content or resolve it in the dashboard. Use a new external_order_id only for a genuinely new order |
file_not_found | 422 | upload_id unknown, never uploaded, expired, requested with a key of the other environment (test or live) — or already used up for return evidence | Call POST /v1/uploads, PUT the bytes to the returned upload_url, then reference the upload_id with a key of the same environment. Unreferenced uploads expire after 14 days and must be re-uploaded |
file_type_not_allowed | 422 | The file content is not an allowed type (the message names the detected type) | See the file reference for allowed types. Renaming the extension does not help — the actual content is inspected |
not_found | 404 | Unknown path, or an order id that is unknown or belongs to another integration | Check the path against the reference. Order ids come from your own create and list responses |
rate_limited | 429 | A rate limit was reached: 120 requests per minute on one key, 300 per minute across all keys of the organization, the write allowance, or the allowance for unfiltered list pages. X-RateLimit-Scope names which one | Wait for Retry-After, then retry the same request. Fetch only changes (GET /v1/orders?updated_since=…) instead of polling single orders or downloading full lists. See Rate limits |
upload_limit_reached | 429 | The organization used up its upload slots (500 per hour, 5,000 per day, all live keys together) or too many unused uploads are waiting (10 GB). Test keys have their own, smaller allowance (50 per hour, 500 per day, 1 GB) | Wait for Retry-After; request one slot per file just before uploading; create the orders that reference waiting uploads |
internal_error | 500 | A failure on our side | Resend the identical body — duplicate protection makes this safe. Contact support if it repeats |
service_unavailable | 503 | Temporary overload or an unavailable dependency prevents processing or confirmation | Honor Retry-After; retry with backoff, jitter and the original request identity |
#Webhook endpoint errors
These codes only occur when managing webhook endpoints.
| Code | HTTP | Cause | Fix |
|---|---|---|---|
webhook_url_invalid | 422 | The target URL is not a valid https URL | Only https is accepted; http:// is rejected |
webhook_target_blocked | 422 | The target resolves to a private or reserved network address | Use a publicly reachable host. If you cannot expose one, poll GET /v1/orders?updated_since=… instead |
webhook_limit_reached | 422 | The connection already has the maximum of five active webhook endpoints | Switch off an endpoint you no longer need, then register the new one |
#Customer errors
These codes only occur on the customer endpoints (/v1/customers).
| Code | HTTP | Cause | Fix |
|---|---|---|---|
customer_bridge_not_approved | 403 | The organization has not yet approved passing customer data through the API | An owner or admin approves sharing customer data with your system once in the dashboard under API access; then repeat the request |
test_key_read_only | 403 | A test key tried to create or update a customer | Send validate_only: true with the test key, or use a live key for the write |
customer_match_ambiguous | 409 | The email or external_reference matches more than one customer, so Meykt does not guess | Send code — it is unique — so exactly one customer is meant |
customer_code_taken | 409 | The customer code already belongs to a different customer | Send the code of the customer you mean, or leave code out |
#File errors are nested
file_not_found and file_type_not_allowed never appear as the top-level error.code of an order call. (One exception: POST /v1/returns/evidence answers an upload_id that was already used up for return evidence with top-level 422 file_not_found, field: upload_id.) File problems reject the order as a validation failure, so the top-level code is validation_failed (HTTP 422) and the specific file code sits inside errors[]:
{
"error": {
"code": "validation_failed",
"message": "The order was rejected because of file problems. Nothing was created.",
"doc_url": "https://www.meykt.com/en/developers/errors/validation_failed",
"errors": [
{
"code": "file_not_found",
"message": "No uploaded file found for upload_id 6f1c…",
"field": "items.0.files.0.upload_id"
}
]
}
}Match on error.code first, then walk errors[] for the detail.
#Warnings
A warning is not an error. Warnings appear on a successful POST /v1/orders response (201), alongside the created order:
{
"data": {
"order": {
"id": "…",
"external_order_id": "ORDER-2026-1044",
"is_test": true,
"items": [{ "sku": "BECHER-GROSS", "product_linked": false }]
},
"warnings": [
{
"code": "item_product_unmatched",
"field": "items[0].sku",
"value": "BECHER-GROSS",
"message": "SKU \"BECHER-GROSS\" is not linked to any product yet. The order was accepted; link it in the dashboard under Products → assignment queue."
}
]
}
}The order was accepted and stored. Do not treat warnings as a reason to retry, to change the external_order_id, or to abort your import run.
| Warning code | Meaning | Action |
|---|---|---|
item_product_unmatched | The sku does not match any Meykt product yet, so product_linked is false on that item | Link it once in the dashboard under Products → assignment queue. The link applies retroactively and to all future orders with that SKU |
item_missing_sku | The item was sent without a sku and therefore can never be matched automatically. It runs as a free line: no product structure part, no stock reservation, it does not hold up the order | Send a sku for items that should map to a Meykt product; leave it out only for lines like fees or gift wrapping |
Warnings are advisory metadata. A repeated request that hits duplicate protection returns 200 with "warnings": [] — an empty array is not a signal that a previous warning was resolved.
#Retrying safely
Retries are safe by design because POST /v1/orders is deduplicated on external_order_id: sending the identical body again returns 200 with the same order, never a duplicate. Reuse the same upload_id values in the retry — duplicate detection is computed over upload_ids, not over storage paths.
Safe to retry with the identical body:
500internal_error— a failure on our side; the order may or may not have been stored, and the retry resolves that either way.503service_unavailable— temporary overload or an unavailable dependency. This can occur before key verification and does not establish whether the key is valid. HonorRetry-Afterwhen present; preserve the original body and identity.429upload_limit_reached— the organization's upload slots are used up (500 per hour, 5,000 per day across all live keys; test keys have their own allowance of 50 per hour and 500 per day, which never touches the live one) or too many unused uploads wait in the staging area. Wait for the seconds inRetry-After; the same call then succeeds. Do not request slots in a loop.429rate_limited— wait for the seconds given in theRetry-Afterheader first. The limits are 120 requests per minute per key and, for all keys of an organization together, 300 requests per minute, a write allowance and an allowance for unfiltered list pages (Rate limits).X-RateLimit-Scopenames the limit that rejected the request.X-RateLimit-Limit,X-RateLimit-RemainingandX-RateLimit-Resetdescribe the key and accompany responses that reach the per-key limiter; earlier rejections can omit them. A request rejected with429did not run.- Network timeouts and dropped connections where you never saw a response — this is the case duplicate protection exists for.
Do not retry unchanged (fix first):
400invalid_json,413payload_too_large,422validation_failed— fix the input first. File-specific causes such asfile_not_foundorfile_type_not_allowedappear inerrors[]of the validation response. Correct them and resend the complete order with its original business identity.401invalid_api_key,403insufficient_scope— a key or scope problem; retrying burns rate limit without changing anything.403customer_bridge_not_approved,403test_key_read_only,409customer_match_ambiguous,409customer_code_taken— an approval, key type or ambiguity that the same request cannot resolve. Fix the cause first.404not_found— the path or id is wrong.409order_already_exists_with_different_content— the number is taken by an order with different content. Creation never overwrites an existing order; use the revisioned PATCH command before work starts, or use a newexternal_order_idonly if this really is a different order.
For commands, HTTP 200 can contain data.command.state: "rejected"; HTTP 202 means processing or decision_required, not completion. Read the journal result until terminal. 502 integration_profile_response_unavailable can follow an accepted action: retain its canonical reference headers, input and identity. Never manufacture a new identity merely to retry. For 413 payload_too_large, reduce the JSON payload or use file uploads; repeating unchanged cannot help.
A workable client policy: retry 5xx and 429 with increasing backoff (for example 1 s, 5 s, 30 s, 2 min), random jitter and a bounded number of attempts. Wait at least the Retry-After interval when present, and coordinate workers so they do not all retry together. Keep the original input and identity. Route other failures for a human to inspect instead of retrying unchanged.
Treat
200and201identically when creating an order.201means the order was newly created,200means an identical order already existed. Both return the same order object underdata.order.
#Resource and command recovery
| Code | HTTP | Meaning | Recovery |
|---|---|---|---|
resource_revision_conflict | 409 | The resource has changed since the supplied revision. | Read the current resource, review the differences, then submit the intended change with its current revision and a new command identity. |
idempotency_conflict | 409 | This command identity was already used with different input. | Recover the original result with the original input. Use a new identity only for a genuinely different intentional action. |
command_outcome_unknown | 503 | The command result could not be confirmed. For POST /v1/returns/evidence it can also mean a used-up storage allowance (the message says so). | Retry the exact original input and idempotency_key, or read its saved receipt. Never change the key to work around an uncertain result. With a used-up storage allowance, a retry cannot succeed until space is freed. |
article_identifier_conflict | 409 | The requested article identifiers conflict with existing identifiers. | Read the article and resolve the explicit identity mismatch before retrying. Do not guess another article by its name. |
article_reference_conflict | 409 | An external article reference is already bound differently. | Read the current article references and use the correct binding. Resolve the old relationship explicitly before importing another identity. |
article_catalog_limit | 409 | The requested article exceeds the supported catalogue response size. | Reduce the requested page size where applicable or contact support. Do not interpret the failure as an empty catalogue. |
#Warehouse and case commands
| Code | HTTP | Meaning | Recovery |
|---|---|---|---|
operation_not_available | 403 | This organization cannot currently use the required feature. | Check the feature and organization status. Use the receipt reader to recover an earlier successful command. |
operation_state_conflict | 409 | This operation is not permitted at the current stage. | Read the current case and its required next action before preparing another command. |
quantity_exceeded | 409 | The requested quantity exceeds a proven remaining amount. | Read the latest quantities and send only the intended remaining amount. Do not create another case to bypass the limit. |
confirmation_required | 409 | A surplus or shortage needs explicit confirmation. | Review the difference, then explicitly set the appropriate accept_overdelivery or accept_shortage field. |
condition_required | 422 | A valid condition is required for this action. | Read offered condition options. Receive returns into quarantine; use a released condition only after the required inspection and decision. |
expected_stock_unavailable | 409 | The expected supply is not currently eligible. | Read the inbound and confirmed ETA. Missing, overdue or disabled expectations cannot back a new promise. |
stock_already_allocated | 409 | This quantity already has an exclusive allocation. | Resolve the existing binding using its authorized release or transfer action before making another allocation. |
warehouse_stock_unavailable | 409 | Eligible stock or destination capacity is unavailable. | Read the current balance and capacity and prepare an appropriate quantity and destination. |
location_not_allowed | 422 | This location cannot be used for the requested action. | Choose an authorized receiving or storage location from the options supplied for this operation. |
unsupported_test_operation | 403 | This operation is unavailable to ordinary test keys. | Use a live key with webhooks:manage for all webhook operations, including connectivity pings. For warehouse and return tests, use synthetic fixtures in the isolated simulator; a workflow simulation does not prove a physical booking. |
request_busy | 503 | Another booking currently holds the required resources. | Respect Retry-After. Read the original receipt or retry with exactly the same command identity and input. |
#unit_unsupported · 422
The current public stock contract supports piece. A different recorded unit is rejected explicitly, including on historical inbound or return records. No row is silently dropped and no package, weight or volume is reinterpreted as pieces. Read the supported unit catalog and resolve the unsupported record in the native workspace before retrying.
Machine-readable version of this page: https://www.meykt.com/developers/errors.md