All list endpoints support a consistent set of query parameters for pagination, filtering, and sorting.
Pagination #
| Parameter | Default | Maximum | Description |
|---|---|---|---|
page | 1 | — | Page number |
per_page | 20 | 100 | Number of results per page |
Example:
GET /wp-json/dmsi-api/v1/licenses?page=2&per_page=50
Filtering #
Use bracket notation to filter by field value:
GET /wp-json/dmsi-api/v1/licenses?filter[status]=active
GET /wp-json/dmsi-api/v1/licenses?filter[product_id]=42&filter[status]=active
Sorting #
Sort results by one or more fields. Prefix a field name with - for descending order:
GET /wp-json/dmsi-api/v1/licenses?sort=created_at
GET /wp-json/dmsi-api/v1/licenses?sort=-created_at,status
Including Related Resources #
Where supported, use the include parameter to embed related records in the response:
GET /wp-json/dmsi-api/v1/licenses?include=license,customer
Idempotency #
For POST and PUT requests, include an Idempotency-Key header to prevent duplicate operations. If a request with the same key is received within 24 hours, the API returns the cached response from the original request.
Idempotency-Key: a1b2c3d4-e5f6-7890-abcd-ef1234567890
