Errors
Every error code, when it happens and its HTTP status.
Errors share one body. NOT_SUPPORTED means the site cannot do it and lists alternatives; NOT_ALLOWED means the caller may not and gives a reason.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"BAD_REQUEST",
"NOT_FOUND",
"UNKNOWN",
"NOT_SUPPORTED",
"NOT_ALLOWED",
"SUBJECT_REQUIRED",
"QUOTE_EXPIRED",
"PRICE_CHANGED",
"OUT_OF_STOCK",
"NEEDS_CONFIRMATION",
"CONFIRMATION_STALE",
"CONFIRMATION_EXPIRED",
"CONFIRMATION_MISMATCH",
"IDEMPOTENCY_CONFLICT",
"SOURCE_UNAVAILABLE",
"RATE_LIMITED"
]
},
"reason": {
"anyOf": [
{
"type": "string",
"enum": [
"actor_level",
"handoff_held",
"handoff_not_active",
"operator_disabled",
"plan",
"subject_required_delegation",
"suspended"
]
},
{
"type": "string",
"enum": [
"knowledge_updating"
]
}
]
},
"message": {
"type": "string"
},
"alternatives": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"
}
},
"retryAfterMs": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"requestId": {
"type": "string"
},
"docsUrl": {
"type": "string",
"format": "uri"
}
},
"required": [
"code",
"docsUrl"
]
}
},
"required": [
"error"
]
}| Code | HTTP | Meaning |
|---|---|---|
BAD_REQUEST | 400 | The request does not match the capability's input schema. |
NOT_FOUND | 404 | The site or resource does not exist for this caller. A resource owned by someone else is reported the same way, so existence cannot be probed. |
UNKNOWN | 404 | KIVEX has no evidence for the requested value. It never guesses. |
NOT_SUPPORTED | 422 | The site cannot do this. alternatives lists capabilities that can help instead. |
NOT_ALLOWED | 403 | The caller may not do this. reason says why. |
SUBJECT_REQUIRED | 401 | The capability acts for a signed-in person and the request carries none. |
QUOTE_EXPIRED | 409 | The quote is no longer valid. Request a new one. |
PRICE_CHANGED | 409 | A price changed after the quote. Request a new quote. |
OUT_OF_STOCK | 409 | An item is no longer available. |
NEEDS_CONFIRMATION | 409 | A person has to confirm the action first. The response says where. |
CONFIRMATION_STALE | 409 | The data changed after the preview was confirmed. Request a new preview. |
CONFIRMATION_EXPIRED | 410 | The confirmation is no longer valid. |
CONFIRMATION_MISMATCH | 409 | The confirmation belongs to a different action, resource, amount or person. |
IDEMPOTENCY_CONFLICT | 409 | The idempotency key was already used with different arguments. |
| 503 | The source of truth for this value is unreachable. KIVEX never serves stale data as current. reason may say why, e.g. knowledge_updating. | |
RATE_LIMITED | 429 | Too many requests. Retry after retryAfterMs. |
Reasons for NOT_ALLOWED
| Reason | Meaning |
|---|---|
actor_level | The caller's actor level is not allowed to use this capability. |
handoff_held | Someone else is handling this conversation: an operator in the Hub or another system. It is free again after handoff.ended. |
handoff_not_active | This conversation is not handed over to you: take it over first, or it has ended. |
operator_disabled | The site operator switched this capability off. |
plan | The site's plan does not include this capability. |
subject_required_delegation | Acting for a signed-in person requires a delegation from that person. |
suspended | Access to the site is suspended. |
Reasons for SOURCE_UNAVAILABLE
| Reason | Meaning |
|---|---|
knowledge_updating | The site's knowledge is being updated right now. Retry after retryAfterMs. |