WasteSaver Audit: Orders endpoint
OLD ENDPOINT: GET /api/store/locations/:org_location_id/orders
NEW ENDPOINT (remains the same): GET /api/store/locations/:org_location_id/orders
Payload proposal:
{
"items": [
{
"reference": "17241405128753672",
"date": "2022-08-24",
"size_display": "20L",
"quantity": 1,
"type": 1,
"scheduled_type": 2,
"status": "deleted | temporary | new | pending | scheduled | in_progress | completed | delayed | cancelled | issue | in_review",
"waste_stream": {
"name": {
"fr-fr": "PMD",
"de-de": "Verpackungen",
"nl-nl": "PMD",
"en-gb": "PMD"
}
},
"pickup_point": {
"name": "Pickup Point",
"address": {
"street_name": "Keizersgracht",
"house_number": "359",
"postal_code": "1016 EJ",
"town": "Amsterdam",
"country_code": "NL",
"lat": 52.3687078,
"lon": 4.8849146
}
},
"is_cancellable": true,
"is_issue_creatable": true,
"created_at": "2022-10-19 12:52:46.682394",
"updated_at": "2022-10-19 12:52:46.682394"
}
],
"pagination": {
"next": "/api/store/locations/0804795f-fbff-46f7-bd60-0ba0cd30d409/...",
"previous": null,
"first": "/api/store/locations/0804795f-fbff-46f7-bd60-0ba0cd30d409/...",
"last": "/api/store/locations/0804795f-fbff-46f7-bd60-0ba0cd30d409/...",
"total_pages": 2,
"total_items": 18
}
}
Other than the status that I think it should be a number, I agreed with everything. Will update the gist with this 🙌