Order Management
This section contains information about the Orders API.
Permissions required: orders:read
, orders:write
, orders:delete
Retrieve list of orders
Returns a list of orders.
GET /api/v3/admin/orders
params : {
"page": 1,
"limit": 10,
"sort": "created_at",
"filter[saleChannel]": "web",
}
Available filters:
- id: Filter by order id.
- orderNumber : Filter by order number.
- orderStatus : Filter by order status. For example,
filter[orderStatus]=1,2,3
. - saleChannel: Filter by sale channel.
- customerId: Filter by customer id.
- customerGroupId: Filter by customer group id.
- rangeBetween.createDate: Filter by create date.
filter[rangeBetween.createDate]=2020-01-01,2020-01-31
. - rangeBetween.orderTotal: Filter by order total.
filter[rangeBetween.orderTotal]=100,200
.
Available includes:
- address: Includes order address.
Retrieve a single order
Returns a single order.
GET /api/v3/admin/orders/{id}
params : {
"include": "address"
}
Create an order
The order number must be unique. If you don't specify an order number, the system will generate a random one.
For bulk order creation, you can send multiple orders in a single request. The maximum number of orders per request is 100.
POST /api/v3/admin/orders
body : {
"orderNumber": "123456",
"orderStatus": 1,
"saleChannel": "web",
"customerId": 1,
"customerGroupId": 1,
"address": {
"addressType": "billing",
"fullName": "John Doe",
"company": "Tsoft",
"address1": "Address 1",
"address2": "Address 2",
"city": "Istanbul",
"state": "Istanbul",
"country": "Turkey",
"zipCode": "34000",
"phone": "5555555555",
"email": ""
},
"items": [
{
"productId": 1,
"variantId": 1,
"quantity": 1,
"price": 100,
"discount": 0,
"tax": 0,
"total": 100
}
],
}
Update an order
Updates an order.
PUT /api/v3/admin/orders/{id}
body : {
"orderStatus": 2,
}
Delete an order
When you delete an order, the related order items,addresses are also deleted.
DELETE /api/v3/admin/orders/{id}