Orders
An order represents the consumer's intent as captured in the shop system. The order is the starting point for all subsequent routing and fulfillment activities.
This article focuses on creating and canceling orders that go through the process via the API. For full details about the order entity, see the Order Management article. To modify an order, see the Order modification article. To create an order record, see the Order records article.
Create an order
To create a new order in fulfillmenttools, call the following POST endpoint:
POST https://{YOUR_TENANT_NAME}.api.fulfillmenttools.com/api/ordersBelow is an example of an order:
{
"consumer": {
"addresses": [
{
"firstName": "Phil",
"lastName": "Bison",
"street": "Bison Drive",
"houseNumber": "42",
"postalCode": "42420",
"city": "Los Angeles",
"country": "US",
"email": "phil.bison@fulfillmenttools.com"
}
]
},
"tenantOrderId": "R456728546",
"orderDate": "2024-01-19T08:45:50.525Z",
"orderLineItems": [
{
"article": {
"tenantArticleId": "TSHIRT-W-2468",
"title": "Basic T-Shirt White"
},
"quantity": 1
},
{
"article": {
"tenantArticleId": "SNEAK-W-4891",
"title": "White sneakers"
},
"quantity": 1
}
],
"deliveryPreferences": {
"shipping": {
"serviceLevel": "DELIVERY"
}
}
}If the request was successful, it returns an HTTP 200 OK response with a body that contains some new values:
id: Every order has a unique generated ID for identification.
version: Version as part of our optimistic locking mechanism.
orderLineItems[].id: Each order line item has its ID.
status: Every order has a status, newly posted orders always have the status OPEN if the status isn't defined in the request (for example, you could set the "status": "LOCKED" in the initial request).
processId: A process is an entity containing every entity involved in the whole fulfilling process.
created: Time at which the order was created in fulfillmenttools.
lastModified: Time the order was most recently modified.
Cancel an order
You can't delete an order via the API, you can only cancel an order. To do this, you'll need to change the status of the order via API, or cancel it via Backoffice.
To edit an order, see the Order modification article.
Order sources
When a Customer Support Manager wants to see the source for each order (for example, their own online shop or third-party platforms like Amazon, Otto, and so on) to track the order process better and respond to customer inquiries more effectively, there's an option to define the source of the order.
Users have two options:
sourceRef: Refers to the existing source in configurations.tenantSourceId: Refers to the tenant source, which is defined in the source configurations.
Create a source
Administrators can define possible sources of an order via API.
Last updated
Was this helpful?

