Retrieve Orders for a Location.
This endpoint accepts several query parameters to filter the data returned. Data will be returned chronologically.
GET ~/orders
Headers
Field | Type | Description |
---|---|---|
doshii-location-id | String |
The hashed ID of the location you're targeting. See Hashed Location IDs |
Accept-Encodingoptional | String |
Using compression on the response will improve the response times of this endpoint. Using this header will indicate to Doshii that the JSON response should be compressed (e.g. |
Parameters
Field | Type | Description |
---|---|---|
statusoptional | String |
Comma separated list of statuses. Defaults to accepting all. eg. |
posRefoptional | String |
The POS reference for the order. |
externalOrderRefoptional | String |
The optional external order reference provided by the Partner when the order was created. |
fromoptional | Integer |
The date and time (seconds since Epoch) <= Order's creation time. Eg. |
tooptional | Integer |
The date and time (seconds since Epoch) >= Order's creation time. Eg. |
offsetoptional | Integer |
Number of matching records to skip before returning the appropriate rows. Default: 0 |
limitoptional | Integer |
Max number of records to return. Default is 50 (Maximum: 100). If the request is made on the Read-Only service and gzip compression is enabled (e.g. |
sortoptional | String |
Sort orders ascending: |
Response
Field | Type | Description |
---|---|---|
count | Integer |
Number of records that match the query |
offset | String |
Number of matching records skipped before returning the appropriate rows |
limit | String |
Max number of records returned |
rows | Object[] |
The matching rows |
Examples
Response
{
count: 224,
offset: 12,
limit: 2,
rows: [{
"id": "1",
"status": "pending",
"checkinId": "3",
"locationId": "Xuy8K3a0",
"requiredAt":null,
"availableEta":null,
"manuallyProcessed": false,
"surcounts": [],
"items": [
{
"name":"Toasted Sourdough Bread & Eggs",
"description":"Just ye old classic",
"unitPrice":"1100",
"posId":"lol12",
"quantity":1,
"surcounts": [],
"options": []
}
],
"createdAt": "2016-04-12T20:54:25.289Z",
"updatedAt": "2016-04-12T20:54:25.289Z",
"transactions": [],
"checkin": {
"id": "3",
"tableNames": [
"table2"
],
"covers": null,
"completedAt": null,
"createdAt": "2016-04-12T20:54:25.289Z",
"updatedAt": "2016-04-12T20:54:25.289Z",
"uri": "http://localhost:2001/partner/v3/checkins/3"
},
"version":"iwgjr2NJ014",
"uri": "https://sandbox.doshii.co/partner/v3/orders/1"
}, {
"id": "2",
"status": "accepted",
"checkinId": "5",
"locationId": "Xuy8K3a0",
"requiredAt":null,
"availableEta":null,
"manuallyProcessed": false,
"surcounts": [],
"items": [
{
"name":"Toasted Sourdough Bread & Eggs",
"description":"Just ye old classic",
"unitPrice":"1100",
"posId":"lol12",
"quantity":1,
"surcounts": [],
"options": []
}
],
"posCreatedAt": "2016-04-12T20:54:26.289Z",
"createdAt": "2016-04-12T20:54:25.289Z",
"updatedAt": "2016-04-12T20:54:27.289Z",
"transactions": [
{
"version": "Gj0mwWY9YbIjQMPYX2qEib1enQPBRYIbllDrOXpD",
"id": "1",
"orderId": "2",
"reference": "cash",
"invoice": null,
"amount": "10000",
"status": "complete",
"createdAt": "2016-04-12T21:28:29.330Z",
"updatedAt": "2016-04-12T21:28:29.330Z",
"uri": "https://sandbox.doshii.co/partner/v3/transactions/1"
}
],
"checkin": {
"id": "5",
"tableNames": [
"table12"
],
"covers": null,
"completedAt": null,
"createdAt": "2016-04-12T20:54:25.289Z",
"updatedAt": "2016-04-12T20:54:25.289Z",
"uri": "http://localhost:2001/partner/v3/checkins/5"
},
"version":"g4MMRsd3333NJ014",
"uri": "https://sandbox.doshii.co/partner/v3/orders/2"
}]
Comments
0 comments
Please sign in to leave a comment.