Rate Limiting & Idempotency

Understand rate limits and safely retry requests

Rate Limits

Rate limiting applies to Personal Access Token requests only. Cookie sessions are exempt.

  • Burst: 10 requests per second
  • Sustained: 600 requests per minute

Rate limit buckets are per-token — different tokens have independent limits.

Response Headers

Rate limit information is included in response headers:

  • X-RateLimit-Limit: 10 — burst capacity
  • X-RateLimit-Remaining: 5 — tokens remaining in bucket
  • Retry-After: 30 — seconds to wait (only on 429 responses)

Handling 429 Responses

When rate limited, the API returns a 429 status. Use exponential backoff:

# Check the Retry-After header and wait that many seconds
curl -i https://yourshop.zeroshop.io/admin/api/products \
  -H "Authorization: Bearer zspat_..."
# If 429: Retry-After: 30 → wait 30 seconds

Idempotency

For write operations (POST, PUT, PATCH) using PAT authentication, you can send an Idempotency-Key header to safely retry requests:

curl -X POST https://yourshop.zeroshop.io/admin/api/products \
  -H "Authorization: Bearer zspat_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: import-row-42-2026-04-13" \
  -d '{"name": "Widget", "price": 999}'

Key details:

  • Same key + same body → returns cached 2xx response
  • Same key + different body → returns 409 Conflict
  • Only successful (2xx) responses are cached for 24 hours
  • GET requests ignore the header
  • Scoped per token

We value your privacy

We use cookies for essential site functionality and, with your consent, analytics to understand how our platform is used. No personal data is shared with third parties. See our Privacy Policy for details.