API reference
Errors
Every Verilo API error code, what causes it and how to fix it, with the error envelope every failure shares.
Every failure answers with an HTTP status and the same JSON envelope:
{
"error": {
"type": "invalid_request_error",
"code": "parameter_invalid",
"message": "order.lines[0].quantity: must be a whole number of at least 1",
"param": "order.lines[0].quantity",
"requestId": "req_8a2f7d6d6ba448e7f25953f0",
"docUrl": "https://verilo.app/docs/api/errors#parameter-invalid"
}
}typegroups errors by what you do about them.codenames the exact case. Codes never change meaning, so branch on them.messageis for people and may be reworded.paramnames the field at fault, as you sent it, when there is one.requestIdis also in theRequest-Idheader of every response. Quote it when you contact us.
Retrying
Retry rate_limited, idempotency_in_progress and internal_error, with the same Idempotency-Key so a request that did succeed is not repeated. Do not retry other 4xx errors unchanged: fix the request first.
Invalid requests (400)
parameter_missing
A required parameter is missing. Add the parameter named in param.
parameter_invalid
A parameter has the wrong type or an invalid value. param names it. Correct the value at param. The message says what is expected, for example an https address or a whole number.
body_invalid
The request body is not a JSON object. Send a JSON object with Content-Type: application/json, under 2 MB.
version_unknown
The Verilo-Version header names a version that does not exist. Send a version listed on Versioning, or leave the header out.
order_line_missing
The order has no line with that id. Use one of the order's line ids, as you sent them.
order_line_required
The order has more than one line, so lineId must name the damaged item. Name the damaged line with lineId.
reference_missing
The template needs a reference this request did not give. param names it. Send it in references, such as references.serial.codes; the template's capabilities.references lists what it reads.
template_invalid
The template definition breaks a rule. param names the field and message says which rule, for example a reference named on a step whose kind checks none. The rules are on Step kinds.
Authentication (401)
api_key_missing
No API key was sent. Send Authorization: Bearer <key>. Send Authorization: Bearer vrl_test_... or vrl_live_....
api_key_invalid
The API key is not recognised, or it was revoked. Check you copied the whole key, and that it was not revoked. Make a new one on Developers.
Permission (403)
account_closed
The account this key belongs to is closed. Contact us.
test_mode_only
This operation needs a test key (vrl_test_…). Use a test key. Live Claims and Verifications are completed by your customer on their phone.
agreement_required
The current Data Processing Agreement has not been accepted for this account. An Admin accepts the current Data Processing Agreement in Settings, then retry.
Not found (404)
resource_missing
No object with that id exists for this key's account and mode. Check the id and the mode: a test key cannot see live objects.
route_missing
No endpoint answers this method and path. Check the method and path against this reference. Every path starts with /v1.
order_missing
The order has not been sent to Verilo. Send it inline as order, or first with POST /v1/orders. Send the order inline as order, or first with POST /v1/orders.
Conflicts (409)
claim_open
This item already has an open Claim. The response carries its id in claimId. Use the Claim in claimId, or cancel it first. Send the same reference to get it back with 200.
claim_state
The Claim is in a state that does not allow this operation. Read the Claim's status. A new link needs an open Claim with no Result; the scripted customer needs an unopened link.
result_exists
A Verification Result exists, so the Claim or Verification can no longer be cancelled or sent a new link. For a Claim, record an Outcome instead.
outcome_exists
An Outcome is already recorded on this Claim. An Outcome is recorded once per Claim.
verification_state
The Verification is in a state that does not allow this operation. Read its status. A new link or a cancel needs a Verification with no Result; the scripted customer needs an unopened link.
template_read_only
Built-in templates cannot be changed or archived. Make your own from one. Copy its steps into POST /v1/templates, or use Copy to my templates on the dashboard.
pack_unavailable
A carrier claim pack is not available for this Claim yet. message says why. Wait for a Verified Result, and make sure the order's shipment has a trackingNumber.
Idempotency (409)
idempotency_conflict
The Idempotency-Key was used with a different request body. Use a new Idempotency-Key for a different request.
idempotency_in_progress
A request with this Idempotency-Key is still being processed. Retry after a moment. Retry after a second with the same key.
Rate limits (429)
rate_limited
Too many requests. Wait for the number of seconds in Retry-After. Wait the seconds in Retry-After, then retry. Spread bursts out.
Billing (402)
billing_required
Live Claims and Verifications need a card on file. Add one in the dashboard under Billing. An Admin turns on card billing under Billing. Test keys never need it.
Verilo errors (500)
internal_error
Something went wrong on Verilo's side. Retry with the same Idempotency-Key. Retry with the same Idempotency-Key. If it persists, contact us with the requestId.