Documentation Index
Fetch the complete documentation index at: https://docs.retailgrid.io/llms.txt
Use this file to discover all available pages before exploring further.
Status codes
| Status | Meaning | When you see it |
|---|---|---|
200 OK | Success | GET, PATCH, and /bulk responses |
201 Created | Resource created | POST /v1/<entity>/{entity_id} and POST /v1/competitor_prices |
202 Accepted | Job queued | POST /v1/imports/* returning a JobHandle |
204 No Content | Success, no body | DELETE /v1/<entity>/{entity_id} |
401 Unauthorized | API key missing, malformed, or rotated | Auth header issue - see Authentication |
404 Not Found | The path’s entity_id is unknown | Patching or deleting a non-existent row |
422 Unprocessable Entity | Validation failed | Bad payload shape, missing required field, type mismatch |
429 Too Many Requests | Rate limit hit | Back off and retry per Retry-After |
5xx | Server error | Retry with exponential backoff; if persistent, contact support |
Validation error shape
When a request fails schema validation, the API returns a422 with an HTTPValidationError body:
detail is a ValidationError:
loc- JSON path to the offending field, including array indices.msg- human-readable message.type- machine-readable error code (e.g.,missing,string_too_long,value_error).
Bulk endpoints: per-item errors
/bulk endpoints return 200 OK even when individual rows fail. Per-row failures are reported inside BulkResponse.results rather than as a top-level error:
results and check ok. A 200 does not mean every row was written.
Common 422 cases by endpoint family
- Products / variants - missing
product_id, missingskuon a variant create,product_idreferencing an unknown product on a variant. - Transactions - missing
product_id, malformedtransaction_timestamp, decimal field that can’t parse. - Competitor prices - missing one of the four required fields (
competitor_name,observed_at,regular_price,effective_price). - Imports (CSV) - file not attached, file empty, file not UTF-8, header row missing.
Retry strategy
- Idempotent endpoints (
POST /v1/<entity>/{entity_id},PATCH,DELETE,/bulk) - retry on 5xx and on transport errors with exponential backoff (start at 1s, cap at 30s, max 5 attempts). POST /v1/competitor_prices- this is a non-idempotent create (no path id). Retrying after a successful response will create a duplicate row. Check the network outcome before retrying.- Async imports - if
POST /v1/imports/*fails, retry the upload. If it succeeds and the subsequent job fails, fix the CSV and submit a fresh job rather than retrying the same upload.
