Skip to content

Errors

Every error THIS APPLICATION emits is RFC 9457 application/problem+json, shaped like the ProblemBody component. The one exception is not ours to fix: a request the gateway in front of a deployment refuses ITSELF never reaches the application, and answers whatever that gateway answers (text/plain on the reference deployment). Two classes do that, and only the first is about your request being malformed: a path the gateway will not parse — a percent-encoded NUL, say — answers “Bad request”, and a method the gateway does not forward answers “The upstream server responded with 405” even though the request is perfectly well formed (TRACE does this on the reference deployment; PROPFIND, equally unknown to this API, is forwarded and gets a proper method-not-allowed problem body). So: treat any 4xx whose Content-Type is not application/problem+json as final and non-retryable, and do not parse it — which is the same handling either class needs. Which requests a gateway keeps is a property of the deployment, not of this API.

A PATCH /customers/{customerRef}/attributes naming an attribute the tenant has not defined answers:

{
"type": "https://ninetables.io/problems/validation-failed",
"title": "Validation Failed",
"status": 400,
"detail": "Request validation failed",
"code": "VALIDATION_FAILED",
"errors": [
{
"key": "favourite_wine",
"code": "unknown_attribute",
"detail": "unknown customer attribute: favourite_wine"
}
]
}

Dispatch on type — it is https://ninetables.io/problems/<slug>, it is a closed enum (the ProblemType component, which also lists each entry’s status), and it separates cases the status merges: not-found, unknown-endpoint and segment-archived are all 404. It is a URI, but a nominal one: compare it as a string and do not dereference it. code is always the SCREAMING_SNAKE of the same slug, so it carries no information type does not. title is the same text for every occurrence of a type, for logs, and never something to branch on. status repeats the HTTP status, so a stored or forwarded problem stays self-describing. detail says what went wrong this time, in prose written for a developer reading a log: never parse it. It is absent where the type alone is the whole story, as on the 500 below.

Every problem body emits its members in the order the examples on this page show, a /batch item’s problem included.

Slug-specific members ride at the top level and are declared on ProblemBody rather than left to prose: errors[] (every offending field, with codes from FieldErrorCode), blockers[] and hidden_blockers (what is preventing an archive, and how many more your key cannot read), required_scope, resource, conflicting_id, conflicting_tables, drifted, pending_attributes and retry_after. A stale conditional write, for instance, names the keys to re-read in drifted:

{
"type": "https://ninetables.io/problems/conflict-stale-write",
"title": "Conflict",
"status": 409,
"detail": "The write was rejected: 1 attribute(s) changed since you read them — member_tier. Nothing was written; re-read the drifted keys and retry.",
"code": "CONFLICT_STALE_WRITE",
"drifted": [
"member_tier"
]
}

Inside errors[], code says WHAT is wrong and key says WHERE. key is a name rather than a typed pointer, and it names one of five things:

ShapeLooks likeEmitted when
an attribute keymember_tiera values write: every per-attribute code keys on the attribute itself, never on values.member_tier
(root)(root)the body as a whole is missing, not JSON-typed or not parseable, carries an unrecognised top-level member, or breaks a rule spanning several members (source_key requires source_system)
a path into the bodylabel, items.0.ref, options.0.valuea body member failed the published schema or a server-side rule, dotted for nesting and indexed for arrays
a query-parameter namelimit, cursor, include, statusthat parameter failed its schema, or a rule the schema cannot express (an unknown booking status)
a lower-cased request-header nameidempotency-keythat header failed its schema; idempotency-key is the only header this API validates

Two rules keep the five unambiguous. An unrecognised member keys on its CONTAINER, because a member the schema does not know has no path of its own: (root) at the top level, items.0 inside a batch item, with detail naming the member (Unrecognized key: "colour"). And no operation declares one name in two places, so a key other than (root) matches at most one of that operation’s body members, query parameters and headers.

The array is EXHAUSTIVE: every offending field is reported, not only the first, so one pass over it is the complete list of fixes. On an attribute write the entries arrive in the order the keys appeared in the values object you sent. Not every 400 carries them: an invalid-ref is a whole-request problem whose detail names the malformed identifier.

code is one of eighteen values, the FieldErrorCode component’s closed vocabulary, so branch on it rather than on detail.

The request did not match the published schema

  • schema_invalid — a body member, query parameter or request header failed the published schema: an unknown member, a wrong JSON type, a bound, or a rule the schema states (an email that is not one, a phone with no +/00 prefix). It is decided before any attribute is looked up, so a request carrying one carries no per-attribute entries.

About the attribute, not the value

  • unknown_attribute — no definition with this key on this entity in this tenant.
  • entity_mismatch — the key exists on the OTHER entity, as when a booking attribute is sent to a customer; the detail names which.
  • attribute_archived — the definition is archived. Restore it with PATCH /definitions/{entity}/{key} {"archived": false} or stop writing it.
  • not_api_writable — the definition’s api_writable is false: a system attribute (detail reads a Nine Tables attribute), a computed one of your own (computed from bookings), or one the tenant reserved for the app. It is not a permissions problem, so no scope fixes it.

The value is the wrong shape

  • type_mismatch — the JSON type does not match the data_type: a number for text, an array for select, a non-string inside a multi_select array. Nothing is coerced, so "42" is not a number.
  • op_not_supported — an op object ({"op": …}) sent to an attribute that takes a plain value. Only multi_select and counter_list accept ops.
  • invalid_op — the attribute takes ops and this one is not usable: the wrong op family for the type (add/remove belong to multi_select, increment/set_key/remove_key to counter_list), an unknown member, a missing or over-long counter key, a missing or non-integer by/count, or an empty ops array. The detail names the member.
  • invalid_counter_entry — an element of a counter_list full-replace array is not {key, count, last_at?}: a bad type, a missing or over-long key, a fractional or negative count, an unknown member, or the same key twice.

The shape is right and the value is not

  • unknown_option — a select/multi_select value outside the definition’s options. The detail lists the accepted values, or points at GET /definitions/{entity}/{key} when there are more than 20.
  • invalid_value — a well-typed value a rule of its own refuses: a date that is not YYYY-MM-DD or names no real day, a datetime with no offset (see Timestamps), or an options value that breaks the SelectOption contract. It also covers a well-formed value a rule outside the schema refuses: an unknown category on a definition write, a computed rule the platform refuses (keyed computed, the detail saying why) or a member the rule decides sent beside it, a webhook url refused as an endpoint (see Webhooks), an unknown booking status or include in a query string, and, keyed (root) because the trigger that raises it sees the row rather than the request, dropping a stored select option.
  • value_too_long — a text value over Limits.text_value_chars.
  • too_many_values — a collection over its cap: Limits.multi_select_values_per_row, Limits.counter_keys_per_row or Limits.counter_ops_per_attribute_per_request. The cap is on the RESULT, so an add that would cross it is refused however small its payload.

About a definition write

  • not_catalogue — enabled sent for a definition of your own, which is always in use; only a built-in is switched on and off.
  • system_locked — computed sent for a built-in, whose rule belongs to Nine Tables. Switch it on or off with enabled instead.
  • computed_type_mismatch — a new rule computes another data_type than the definition holds, which is immutable. Create a definition for the new rule.
  • computed_cap — a tenant holds at most 50 live computed attributes of its own; archive one before creating another.
  • reserved_key — the key belongs to the Nine Tables catalogue. A create answers it as 409 conflict-reserved-key instead, naming the built-in to switch on.

Every 400 and every 409 in the API reference publishes the body the operation sends, keyed under the request that produces it. Each example is rendered by the factory that raises it, and the request-validation ones are replayed against the API in its test suite.

A key that is missing, malformed, unknown or revoked, or a key presented to the other kind of deployment, answers the IDENTICAL 401, so a caller cannot probe the state of a key:

{
"type": "https://ninetables.io/problems/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Missing, malformed, unknown, or revoked API key",
"code": "UNAUTHORIZED"
}

It always carries WWW-Authenticate: Bearer, and never X-RateLimit-*: no key resolved, so there is no quota to report. How the header is parsed lists the rules the 401 cannot tell you about.

A key without a scope the request needs answers insufficient-scope, naming the scope in required_scope:

{
"type": "https://ninetables.io/problems/insufficient-scope",
"title": "Insufficient Scope",
"status": 403,
"detail": "This operation requires the 'customers:read' scope",
"code": "INSUFFICIENT_SCOPE",
"required_scope": "customers:read"
}

It names ONE scope, the one missing where the request was refused, so a request needing two can answer twice as you add them (GET /customers?include=attributes wants both customers:read and attributes:read). It is never the scopes your key holds; read those from GET /me. A key’s scopes are fixed when it is minted, so no retry changes the answer: it calls for a different key.

403 app-not-installed is about the restaurant, not your key. While the restaurant has the Customer Data app uninstalled, every key it issued answers it on every route, GET /me included, and none of its webhooks queues anything. The keys, the webhook subscriptions, the attribute definitions and the segments are kept, and the same key answers normally again once the restaurant reinstalls the app. Webhook events queued before the uninstall are held for up to 30 days (see Paused and disabled subscriptions). Do not rotate or re-mint a key over it; ask the restaurant.

{
"type": "https://ninetables.io/problems/app-not-installed",
"title": "App Not Installed",
"status": 403,
"detail": "Customer Data is not installed for this restaurant. Requests and webhooks resume when the restaurant reinstalls it.",
"code": "APP_NOT_INSTALLED"
}

403 tenant-wide-key-required is about what the key reaches. Recomputing an attribute (POST /definitions/{entity}/{key}/recompute) needs a key that reaches every restaurant, and a key limited to restaurants answers it. Like a missing scope, it calls for a different key.

Which 403s cost a rate-limit token is under Where the quota headers appear.

Cross-tenant and nonexistent resources are the IDENTICAL 404: a resource in another tenant answers exactly what an id matching no record answers, so the API never reveals that it exists. resource names the kind the route was looking for:

{
"type": "https://ninetables.io/problems/not-found",
"title": "Not Found",
"status": 404,
"detail": "No such customer",
"code": "NOT_FOUND",
"resource": "customer"
}

A path no route matches DOES reach the application, and answers 404 unknown-endpoint:

{
"type": "https://ninetables.io/problems/unknown-endpoint",
"title": "Not Found",
"status": 404,
"detail": "No route matches this path",
"code": "UNKNOWN_ENDPOINT"
}

It is published here rather than as an operation’s response because it belongs to no operation, and it is the one error that tells you the fault is in the URL rather than in the request. The path is never echoed back, so a bad prefix and a bad route are indistinguishable.

405 responses carry an Allow header, which lists HEAD wherever GET is allowed.

409 concurrent-modification is the one retryable conflict. The database rolled the write back because it collided with another writer (a deadlock, a serialization failure or a lock refusal), so nothing was written and the same request, repeated, can succeed. Retry it with backoff; reuse the same Idempotency-Key where the operation takes one. Every other 409 is a statement about the resource’s state and repeats identically until that state changes. 409 conflict-reserved-key names a Nine Tables built-in whose key a create asked for: switch the built-in on rather than retry (see Catalogue). 409 conflict-delivery-erased is permanent: the guest the delivery is about was erased, so it can never be sent again and retrying is pointless. 409 loyalty-not-installed repeats until the restaurant installs the loyalty club app, after which the same request succeeds (see Loyalty club members). 409 segment-pending waits on the platform rather than on you: the dynamic segment, or the customer list filtered or sorted by attribute values, reads computed attributes, named in pending_attributes, whose values are still being computed, so retry after Retry-After seconds. One whose compute_state is failed does not settle by waiting (see Settling).

A 500 never echoes its cause, which is captured on our side, so it carries no detail:

{
"type": "https://ninetables.io/problems/internal",
"title": "Internal Server Error",
"status": 500,
"code": "INTERNAL"
}

Retry a 429, a 5xx (502 upstream-unavailable included: a proposal Nine AI could not answer is not charged), 409 concurrent-modification and 409 idempotency-key-in-flight, each with the same request and the same Idempotency-Key. Retry 409 segment-pending after its Retry-After. 402 insufficient-ai-credits repeats until an owner tops up the tenant’s AI credits. Do not treat 400 validation-failed as retryable: fix the request instead. Every other 4xx repeats identically.