# API documentation

Authentication, endpoints, and errors.

## Authentication

Browsing products and creating a guest checkout need no API key. Later checkout requests use the returned checkout token, valid for one hour.

Private orders and account data need a session or account API key. One active key is allowed, with full access within your account role.

```text
Authorization: Bearer YOUR_API_KEY_OR_CHECKOUT_TOKEN
```

Use the credential listed by the endpoint. Keys are shown once; keep them private. Sign in to create or revoke a key.

## Errors & recovery

Check the HTTP status first. Commerce errors include status, code, and detail. REST errors may also include traceId or error; keep traceId when contacting support.

| Status | Action |
| --- | --- |
| 400 | Correct the request using the endpoint schema. |
| 401 | Check the credential and expiry. Use the token issued for this checkout. |
| 403 | Check account permissions, ownership, and request origin. |
| 404 | Check the resource ID. A guest checkout may have expired or been claimed by the buyer. |
| 409 | Read the current cart or order. Refresh shipping and tax, then confirm the updated amount. |
| 413 / 415 | Send JSON. Commerce request bodies must be 32 KB or smaller. |
| 429 | Wait before retrying. Respect Retry-After when provided. |
| 502 / 503 | Retry reads with bounded backoff. Keep the existing checkout ID. |

Checkout creation is not idempotent: retrying creates another unpaid cart. Check the existing order before retrying a purchase. Order submission does not confirm payment, and a paid deposit does not mean the balance is paid.

OpenAPI: https://vulcanrobotics.ai/docs/api/openapi.json
Documentation: https://vulcanrobotics.ai/docs/api
