Disposition Order
Fetching list of disposition order.
#LIST
Return a collection of disposition order.
#Example of fetching disposition order list
Request
GET /disposition-orders HTTP/1.1
Response
{
"data": [
{
"id": 181,
"order": 191,
"state": "manual_assignment_process",
"cancelled_at": null,
"created_at": "2024-07-19T09:00:29+00:00",
"updated_at": "2024-07-19T09:00:31+00:00"
},
{
"id": 180,
"order": 190,
"state": "delivered",
"cancelled_at": null,
"created_at": "2024-07-19T08:52:36+00:00",
"updated_at": "2024-07-19T08:52:36+00:00"
},
{
"id": 179,
"order": 189,
"state": "delivered",
"cancelled_at": null,
"created_at": "2024-07-19T08:52:36+00:00",
"updated_at": "2024-07-19T08:52:36+00:00"
},
....
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": "https://api.smake.io/master-administration/disposition-orders?cursor=eyJkaXNwb3NpdGlvbl9vcmRlcnMuaWQiOjE2NywiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ"
},
"meta": {
"path": "https://api.smake.io/master-administration/disposition-orders",
"per_page": 15,
"next_cursor": "eyJkaXNwb3NpdGlvbl9vcmRlcnMuaWQiOjE2NywiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ",
"prev_cursor": null
}
}
#Example of fetching disposition order list with expand
Request
GET /disposition-orders?expand=order HTTP/1.1
Response
{
"data": [
{
"id": 181,
"order": {
"id": 191,
"order_type": 6,
"external_identifier": null,
"external_reference": null,
"merchant": 2,
"cost_centre": null,
"state": "preparing",
"failure_message": null,
"customer_locale": "de",
"currency": "EUR",
"total": 78.23,
"subtotal": 73.112149532711,
"total_tax": 5.11785046728981,
"total_items_price": 75.88,
"shipping_total": 2.35,
"discount_total": 0,
"promotion_codes": [],
"items": [
311
],
"disposition_order": 181,
"customer": 179,
"shipping_address": 356,
"billing_address": 355,
"whitelabel_address": null,
"payment": null,
"shipments": [
191
],
"created_at": "2024-07-19T09:00:09+00:00",
"updated_at": "2024-07-19T09:00:29+00:00",
"cancelled_at": null,
"ordered_at": "2024-07-19T09:00:29+00:00"
},
"state": "manual_assignment_process",
"cancelled_at": null,
"created_at": "2024-07-19T09:00:29+00:00",
"updated_at": "2024-07-19T09:00:31+00:00"
},
{
"id": 180,
"order": {
"id": 190,
"order_type": 6,
"external_identifier": null,
"external_reference": null,
"merchant": 2,
"cost_centre": null,
"state": "completed",
"failure_message": null,
"customer_locale": "de",
"currency": "EUR",
"total": 64.69,
"subtotal": 60.041820841121,
"total_tax": 4.6472964588785,
"total_items_price": 59.49,
"shipping_total": 5.2,
"discount_total": 0,
"promotion_codes": [],
"items": [
310
],
"disposition_order": 180,
"customer": 178,
"shipping_address": 344,
"billing_address": 343,
"whitelabel_address": null,
"payment": null,
"shipments": [
190
],
"created_at": "2024-07-19T08:52:29+00:00",
"updated_at": "2024-07-19T08:52:29+00:00",
"cancelled_at": null,
"ordered_at": "2024-07-19T08:52:29+00:00"
},
"state": "delivered",
"cancelled_at": null,
"created_at": "2024-07-19T08:52:36+00:00",
"updated_at": "2024-07-19T08:52:36+00:00"
},
{
"id": 179,
"order": {
"id": 189,
"order_type": 6,
"external_identifier": null,
"external_reference": null,
"merchant": 2,
"cost_centre": null,
"state": "completed",
"failure_message": null,
"customer_locale": "de",
"currency": "EUR",
"total": 105.37,
"subtotal": 89.40865210084,
"total_tax": 15.96537189916,
"total_items_price": 91.19,
"shipping_total": 14.18,
"discount_total": 0,
"promotion_codes": [],
"items": [
309
],
"disposition_order": 179,
"customer": 177,
"shipping_address": 342,
"billing_address": 341,
"whitelabel_address": null,
"payment": null,
"shipments": [
189
],
"created_at": "2024-07-19T08:52:28+00:00",
"updated_at": "2024-07-19T08:52:29+00:00",
"cancelled_at": null,
"ordered_at": "2024-07-19T08:52:29+00:00"
},
"state": "delivered",
"cancelled_at": null,
"created_at": "2024-07-19T08:52:36+00:00",
"updated_at": "2024-07-19T08:52:36+00:00"
},
....
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": "https://api.smake.io/master-administration/disposition-orders?cursor=eyJkaXNwb3NpdGlvbl9vcmRlcnMuaWQiOjE2NywiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ"
},
"meta": {
"path": "https://api.smake.io/master-administration/disposition-orders",
"per_page": 15,
"next_cursor": "eyJkaXNwb3NpdGlvbl9vcmRlcnMuaWQiOjE2NywiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ",
"prev_cursor": null
}
}
#Available expandable attributes
- order
- order.order_type
- order.items
- order.disposition_order
- order.customer
- order.shipping_address
- order.billing_address
- order.whitelabel_address
- order.shipments
- order.merchant
- order.payment
- order.payment.payment_method
- order.promotion_codes
#GET
Return a disposition order of given order id = x.
Expand can be used here as mentioned before.
#Example of fetching specified disposition order information
Request
GET /disposition-orders/by-order/191 HTTP/1.1
Response
{
"id": 181,
"order": 191,
"state": "manual_assignment_process",
"cancelled_at": null,
"created_at": "2024-07-19T09:00:29+00:00",
"updated_at": "2024-07-19T09:00:31+00:00"
}
#POST
Assign a disposition order of given order id = x to a production.
#Example of assigning disposition order completely
Request
POST /disposition-orders/by-order/191/production-orders HTTP/1.1
{
"productions": [
{
"handle": "production-2"
}
]
}
Response
{
"id": 181,
"order": 191,
"state": "assigned",
"cancelled_at": null,
"created_at": "2024-07-19T09:00:29+00:00",
"updated_at": "2024-07-19T09:09:07+00:00"
}
#Example of assigning disposition order in detail
Request
POST /disposition-orders/by-order/191/production-orders HTTP/1.1
{
"productions": [
{
"handle": "production-2",
"order_items": [
{
"external_identifier": "item-1"
}
]
},
{
"handle": "production-3",
"order_items": [
{
"external_identifier": "item-2"
}
]
}
]
}
Response
{
"id": 181,
"order": 191,
"state": "partly_assigned",
"cancelled_at": null,
"created_at": "2024-07-19T09:00:29+00:00",
"updated_at": "2024-07-19T09:09:07+00:00"
}