curl--request GET \--url https://sandbox.api.24hourinspections.com/v1/orders \--header'Authorization: Bearer <token>'
{"items":[{"id":"IOM-12092","location":"1711 E 71st St #2, Chicago, IL, 60649","current_status":"New"}],"pagination":{"total_items_count":803,"total_pages":41,"current_page":1,"items_per_page":20},"_links":{"self":{"href":"/v1/orders?page=1&limit=20"},"first":{"href":"/v1/orders?page=1&limit=20"},"last":{"href":"/v1/orders?page=1&limit=20"},"prev":{"href":"/v1/orders?page=1&limit=20"},"next":{"href":"/v1/orders?page=1&limit=20"}}}
Receive a list of orders with optional filtering capabilities based on custom metadata provided when originally creating orders.
This allows users to filter orders based on custom data associated with each order, such as a loan or customer identifier.
You can pass metadata as part of the filters query parameter in the request. The metadata is structured as key-value pairs, allowing you to search for orders based on specific metadata fields that were set during order creation.
Example Request
curl--request GET \--url https://sandbox.api.24hourinspections.com/v1/orders?offset=1&limit=20&filters={"metadata":{"key1":"value1"}}\--header'Authorization: Bearer eyJhbGci...'
This will return orders where the metadata contains "key1": "value1". Multiple metadata filters can be combined to refine the search.
The response also supports pagination to navigate through large sets of orders.
curl--request GET \--url https://sandbox.api.24hourinspections.com/v1/orders \--header'Authorization: Bearer <token>'
{"items":[{"id":"IOM-12092","location":"1711 E 71st St #2, Chicago, IL, 60649","current_status":"New"}],"pagination":{"total_items_count":803,"total_pages":41,"current_page":1,"items_per_page":20},"_links":{"self":{"href":"/v1/orders?page=1&limit=20"},"first":{"href":"/v1/orders?page=1&limit=20"},"last":{"href":"/v1/orders?page=1&limit=20"},"prev":{"href":"/v1/orders?page=1&limit=20"},"next":{"href":"/v1/orders?page=1&limit=20"}}}