Errors & pagination

Every error uses the same JSON shape, with a code you can switch on.

{
    "error": {
        "code": "insufficient_scope",
        "message": "This credential lacks the required scope: profile.read.",
        "request_id": "req_8f2k3m9x1q4w7e5r6t0y"
    }
}
HTTPcodeMeaning
401unauthenticatedNo Authorization header, or it isn't a bearer token.
401invalid_tokenUnknown, expired or revoked key or token.
403insufficient_scopeThe credential is valid but lacks the scope for this endpoint.
403forbiddenNot allowed, e.g. a live key on an account without approved API access.
403live_key_requiredA test key called an endpoint that changes real data. Use a live key.
403not_a_sellerThe account doesn't own (or work for) an approved store.
404not_foundNo such endpoint or resource.
405method_not_allowedWrong HTTP method.
409invalid_stateThe resource can't make that change now, e.g. shipping an order that's already shipped or cancelled.
422validation_failedA parameter is invalid; see error.details.
429rate_limitedToo many requests; wait Retry-After seconds.
500server_errorOur fault. Retry with backoff and quote the request_id if it persists.

Pagination

List endpoints accept page and per_page (max 100) and return meta and links:

{
    "data": [
        "\u2026"
    ],
    "meta": {
        "page": 2,
        "per_page": 20,
        "total": 57,
        "last_page": 3
    },
    "links": {
        "next": "https://developers.vaxhost.com/api/v1/apps?page=3",
        "prev": "https://developers.vaxhost.com/api/v1/apps?page=1"
    }
}

Request IDs

Every response has an X-Request-Id header (you may send your own). Include it when you contact support.