/api/client/state1

Polling endpoint: client passes a known order id (with its last-changed timestamp) OR a delivery date and tour id, server tells whether the order / date is still actionable.

Change Note: add age indication

Parameters

(int) order id to check; if given, lastchanged is also required (oid branch)🔗 order_id
(date) iso8601 timestamp of the last order change known to the client (required with oid)
(int) tour id to check (required for the date branch)
(date) iso8601 delivery date to check (required for the date branch)
(String) optionally define the response-format for this call. One of: compact (default) | compacts | full | fulls | json | md | html | js | openapi | yaml
(int) optionally force the API to check against the role (instead of silently not returning data). For guests or public access, the default is -1. 0 (regular customer) and above define the role for which the current session is expected to be authorized.

Response Types

OrderState

OrderState (v1) docs

Polling result that tells whether a specific order or a specific delivery date is still actionable for the client. Can be used by shops to decide if a stale (old, modified) cart needs to reload data (a order may have changes on server side). For a complete overview about possible dates and orders, use the dates endpoint.

Fields (3)
#FieldTypeDescriptionLinks
0statestringpolling result: ok (no change), changed (order was modified server-side), over (order stop time passed), deleted (order no longer exists), cancelled (order was cancelled), done (order is fulfilled), order (a new order was found for the requested date), tover (the tour does not fit the customer schedule anymore), error (request could not be processed)
1oidstringorder id; set when a new order was found for the requested date (state=order), 0 otherwise⬆ oid🔗 order_id
2agestringminutes elapsed since the order was last changed server-side based in the lastchanged input; only set when state=changed

Data (1 record)

stateoidage
error0 →assign1 →dlvr1 →udlvr1 →order27 →order28 →order29 →state1 ⬆