Measura API documentation · v1

Error codes

Use the HTTP status and error.code together, then check the endpoint reference for resource-specific validation.

Error response format

Code example
{
  "success": false,
  "data": null,
  "error": {
    "code": "unauthorized",
    "message": "Malformed key."
  }
}

error.details, meta, and requestId are optional and may be omitted. Details can contain JSON values, including arrays. Do not assume every response has a request ID or retry delay. See the ApiError object.

HTTP status codes

Scroll horizontally to see all columns.

StatusMeaningAction
400Bad RequestMalformed JSON, invalid parameters, missing Idempotency-Key, or missing revision. Correct the request against the endpoint schema.
401UnauthorizedMissing, invalid, revoked, or expired key. Use Authorization: Bearer apik_<keyId>_<secret>.
403ForbiddenPublic API access is unavailable, the required add-on is inactive, or an applicable feature/tier is unavailable.
404Not FoundThe resource is absent or unavailable to this shop. Invalid operation IDs also return 404.
405Method Not AllowedThe resource does not support the requested write method. Check the Allow header when provided.
409ConflictRevision, inventory, idempotency, or concurrent operation conflict. Inspect error.code before retrying.
422Unprocessable EntityThe payload cannot be applied to the resource, measurement configuration, inventory, or supported workflow.
429Too Many RequestsBack off if rate limiting is applied. Honor Retry-After when present; no fixed retry interval is guaranteed.
500Internal Server ErrorAn unexpected failure. For reads, retry with backoff. For writes, preserve the same key and inspect the receipt when available.

Common error codes

Scroll horizontally to see all columns.

Error codeHTTP statusMeaning
bad_request400Invalid parameters or request body.
unauthorized401Authentication failed.
forbidden403Plan, feature, or add-on access is unavailable.
not_found404Resource not found in this shop or endpoint context.
method_not_allowed405Unsupported method on a write resource.
conflict / revision_conflict409The order or recipe changed. Read it again before preparing a new operation.
idempotency_key_reused409The key is already bound to a different request.
operation_in_progress409The identical kit/order write is processing. Inspect error.details.operationId; Retry-After is 2 seconds.
resource_in_progress409Another kit/order operation owns this scope. This request had no effects; retry its same key after the owner finishes. Retry-After is 2 seconds.
operation_requires_review409Changes or receipt persistence may have occurred. Reconcile the operation before starting another write.
unprocessable_entity422Resource state or configuration cannot support this request.
rate_limited429Too many requests.
internal_error500Unexpected server failure; a failed write response alone does not prove rollback.

Resource-specific codes include kit inventory shortages, recipe limits, ineligible variants, and measured order restrictions. The fractional inventory reference documents its separate conflict and partial-failure contract. Read each endpoint’s error table as well as this common reference.

Handle uncertain writes

Kit and order errors may contain operationId and operationStatus in error.details. Retrieve operation status after a lost response or uncertain result. Reuse the original key and identical input for a retry; never bypass processing or requires_review with a new key. A saved rejected operation replays its error, so corrected input needs a new key after the rejection is resolved.

The write safety guide describes permanent kit/order receipts, revision checks, and recovery. Contact support with the operation ID, error code, and request ID when available.