RetailHardHat Developer docs

REST API documentation

Requests & pagination

Understand JSON payloads, response envelopes and list navigation.

Request format

Use HTTPS, send JSON bodies with Content-Type: application/json, and use the exact endpoint and method listed for each resource. Resource field mappings are not a guarantee that every field is writable: endpoint validation and server-owned fields still apply.

Pagination

List endpoints that support pagination accept a positive page (default 1) and limit between 1 and 100 (default 50).

GET /api/v1/sites?page=2&limit=25

Filtering and sorting

Supported filters depend on the endpoint. For example, the sites list supports a status filter. Do not assume every field is filterable. List handlers supporting sorting accept sort_by (or sortBy) and sort_order (or sortOrder), with asc or desc direction.

GET /api/v1/sites?status=active&sort_by=createdAt&sort_order=desc

Response envelope

{
  "data": [],
  "meta": {
    "totalCount": 0,
    "pageCount": 0,
    "currentPage": 1,
    "perPage": 50
  },
  "errors": null
}

Single-record responses generally set meta to null. Error responses set data to null and return an errors array. Upload and download endpoints may use different content types; inspect their individual operation descriptions.