Get ready to receive orders
Sending order updates
- OMS
- Business
Sylvius Ziegler
Business Analyst
You’re almost done! In this final section, we’ll teach you all about the order updates you can send via the Admin API.
After receiving an order in your system, you can send these types of order updates via the Admin API, which are reflected in the data retrieved by APIs can trigger:
It is completely optional to send order updates. However, if you require features of SCAYLE to be triggered (see above), you should consider sending them.
In order to update orders, you use following methods:
Endpoint | Description |
---|---|
Create Shipment | Used to notify SCAYLE, about items, which were shipped (usually physically shipped). |
Create Cancellation | Used to notify SCAYLE, about items, which cannot be fulfilled. |
Create Return | Used to notify SCAYLE, about items, which were returned by the customer. |
shipmentKey
can be used to send the track & trace id along with the request, which can be retrieved in the Frontend using the Customer Account API in order to generate the tracking url, see getApiCustomerOrder.returnKey
set via the create-shipment endpoint to send returns, so you should use a retrievable identifier. We recommend using the same orderItemId
as the returnKey
when sending shipments if you don’t need a different key. By doing this, you do not have to continue using the returnKey because the orderItemId
should work anyways.In the last chapter, we already received our first order in the German shop.
Now let’s assume the order has been physically fulfilled and one package was shipped via DHL. In this case, you would send out the following shipment:
{
"shopKey": "fs",
"countryCode": "DE",
"carrier": "DHL",
"deliveryDate": "2023-11-08 14:30:27",
"items": [
{
"orderItemId": 1,
"returnKey": "550357807160"
}
],
"orderId": 123,
"returnIdentCode": "123456789012",
"shipmentKey": "582301b967d97"
}
Parameter | Description |
---|---|
shopKey | Must match the shopKey , where the order was initially placed in. See shopCountry.shopKey in the order-confirmed webhook. |
countryCode | Must match the countryCode , where the order was initially placed in. See shopCountry.countryCode in the order-confirmed webhook. |
carrier | The carrier the order was sent out with. |
deliveryDate | Defines the timestamp of the package leaving the warehouse. |
items.orderItemId | Corresponds to the id of the order item received within the order-confirmed webhook and identifies an order line item uniquely. |
items.returnKey | Used to map future return requests to the corresponding order line item. |
orderId | Corresponds to the id received within the order-confirmed webhook and uniquely identifies an order. |
returnIdentCode | Unique ID generated for product return (in case the customer prefers to return the product later). |
shipmentKey | A key that is assigned to uniquely identify a shipment. For example, the track&trace of the carrier. |
Unfortunately, the customer decided to return the item, so we assume that the return was processed. In that case, we need to send the order update to SCAYLE using the following operation create return:
[
{
"received": "2023-11-09 07:30:27",
"returnKey": "550357807160"
}
]
Parameter | Description |
---|---|
received | The property defines the date the return was physically received. |
returnKey | The value must match the returnKey set within the previous shipment request. |
That’s it! You successfully updated your first order and made it through the guide.
Get ready to receive orders
Sylvius Ziegler
Business Analyst
Congratulations! You’ve learned how to configure and integrate the basic features and endpoints necessary to run an eCommerce business in SCAYLE.
There are many more features and APIs to discover, so feel free to consult the following resources: