Skip to content

Errors, limits and idempotency

Errors come back as JSON with a detail field. Most errors are a short machine code:

{"detail": "insufficient_scope"}

For validation errors, detail is a list of fields:

{"detail": [{"type": "missing", "loc": ["body", "items", 0, "urun_adi"], "msg": "Field required"}]}

When a plan limit is exceeded, detail carries a readable message (in Turkish):

{"detail": [{"code": "limit_asildi", "limit": "gunluk_giden_arama", "deger": 200, "message": "…"}]}
CodedetailMeaning
401api_key_requiredNo Authorization: Bearer … (response has WWW-Authenticate: Bearer)
401invalid_api_keyThe key is invalid or revoked
403insufficient_scopeThe key lacks the required scope
403publishable_key_not_allowedA publishable key can’t be used here
404not_foundNo such record, or the feature is off in your plan
409idempotency_in_progressThe first request with the same Idempotency-Key is still running
413payload_too_largeThe body is larger than 5 MB
422duplicate_key: <id>The same id twice in one request
422idempotency_key_reusedThe same Idempotency-Key was used for a different request
422invalid_idempotency_keyThe key is longer than 255 characters
422idempotency_key_requiredPOST /api/v1/aramalar was sent without a key
422unknown_purpose, invalid_phone, invalid_status, invalid_range, unknown_filterEndpoint-specific validation
422limit_asildi (list)Plan limit
429rate_limitedRate limit; wait the number of seconds in Retry-After
5xx—Temporary error; retry with the same Idempotency-Key

120 requests per minute per key (fixed window). When exceeded you get 429 rate_limited and a Retry-After header with the seconds left in the window. On the button’s browser endpoints the counter only increases for requests from an allowed domain; failed button attempts are also limited to 20 per minute per IP (429 too_many_failures).

  • Body up to 5 MB (413 payload_too_large).
  • Batch writes take 1–1000 records per request.

If you send an Idempotency-Key header on a write request (POST, PUT, PATCH, DELETE):

  • The response is kept for 24 hours. The same key with the same request (method, path, query and body) returns the same response, with an Idempotent-Replayed: true header.
  • The same key with a different request returns 422 idempotency_key_reused.
  • A second request with the same key while the first is still running gets 409 idempotency_in_progress.
  • 5xx responses and 401, 403, 413, 429 are not stored; you can retry with the same key after them.
  • The key is scoped to your API key; up to 255 characters.

List endpoints use a cursor: send the response’s next_cursor as cursor in the next request. limit is 1–100 (default 50). Requests and calls are incremental (oldest to newest; the cursor is kept on an empty page); carts are sorted newest first.