Outgoing Order State Changes
The Outgoing Order State Changes
Import Endpoint
https://{BASE_URL}/imports/outgoing_order_state_changes?...
All import integration endpoints use the same authentication parameters, please see Authentication page for more details.
Since the nature of order state changes are event-like, they cannot be undone by deleting them.
Queueing one or more order state changes for import requires you to send a HTTP POST
request with the above parameters. The Content-Type
should be application/json
.
The body of the request must contain one or more orders state changes. You can queue as many state changes as you would like (at least one).
Upon success a HTTP 200 OK
reponse will be given with body looking something like this:
{
"status": "OK",
"message": "Import of 1 outgoing_order_state_change value(s) initiated"
}
In general the endpoint reponse will let you know if any of the order state changes posted was not queued for import. It will also (if possible) let you know which of the actually failed.
Minimum outgoing order state change import body
A minimum order state change must have an order_identifier
that must be unique across all outgoing orders on the given stock location and a stock_location
representing the shop that placed the order. Finally the new state must be present.
[
{
"stock_location": "xyz",
"order_identifier": "9DC72082-2E44-4A18-883E-2D19787315D4",
"state": "processing"
}
]
The valid states are created
, processing
, ready
, completed
, rejected
, cancelled
.
Full outgoing order state change import body
[
{
"stock_location": "xyz",
"order_identifier": "9DC72082-2E44-4A18-883E-2D19787315D4",
"state": "processing",
"comment": "Shipped using FedEx",
"cashier": {
"identifier": "abc",
"display_name": "John Appleseed"
}
}
]
The cashier here refers to the handler of the order. We re-use our cashier entity here as a common use case in Ka-ching is shop-to-shop orders.
Models
Cashier
The cashier object is defined as follows:
{
"display_name" : "<string, usually initials, required>",
"full_name" : "<string, optional>",
"identifier" : "<string, required>",
"image_url" : "<string, https url to image of store associate, optional>"
}