cdn.pizzaDocumentation

Developers

API authentication and errors

A robust integration separates correctable errors, refusals, and temporary outages.

#Overview

A robust integration separates correctable errors, refusals, and temporary outages.

#Common request contract

Use https://api.cdn.pizza, Accept: application/json, and Authorization: Bearer YOUR_API_TOKEN. Protected routes require an authenticated, verified user and sometimes an owner/admin/member role.

A 401 means missing or invalid token, 403 means permission or organization refusal, 404 means inaccessible resource, 422 means validation, 429 means rate limit, and 5xx means a temporary service failure. Do not retry every error.

#Retry policy

  1. Correct the payload on 422.

  2. Renew or revoke a token on 401 without logging it.

  3. Respect permission on 403 and delay on 429.

  4. Retry 5xx with bounded backoff only when the operation is safe to repeat.

#HTTP status and recovery

StatusDescriptionAction
400Unreadable requestFix syntax or Content-Type.
401Missing/invalid tokenRenew the credential without logging it.
403Insufficient permissionCheck email, organization, and role.
404Invisible resourceRecheck ID and organization.
422ValidationFix the reported fields.
429Rate limitedHonor Retry-After.
5xxTemporary errorRetry with backoff only when safe.
Customer documentationReference generated from published interfaces