Order Execution Plan Services
All services related to Order Execution Plans are listed in this page.
GET
Order Execution Plan List
This method is used to get a list of order execution plans.
Path: /api/v1/oms/orderexecutionplans/
Example Request
To get list of order execution plans, a GET request should be sent to /api/v1/oms/orderexecutionplans/
endpoint.
No query parameters are required, and the request body should remain empty.
import requests
url = "https://{oms_base_url}/api/v1/oms/orderexecutionplans/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"
headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token)
}
response = requests.request("GET", url, headers=headers)
print(response.json())
Example Response (200 OK)
In a successful response with a status code of 200 OK, the API returns list of order execution plans.
Parameter | Data Type | Description |
---|---|---|
id | integer | The primary key of the order execution plan |
state | string | Indicates the current state of the plan (start, pending, cancelled, completed) |
order | object | The order info of the execution plan |
commands | string | List of state transitions that can be applied on the plan |
created_date | date | The creation date of the order execution plan |
modified_date | date | The modified date of the order execution plan |
orderexecutionplanitem_set | object list | Order execution plan items for each order item |
context | object | Stock data for each stock location during every attempt at fulfillment |
This example response serves as a reference to understand the structure and data format of order execution plan list response.
{
"count": 800,
"next": "https://{customer_omnitron_url}/api/v1/oms/orderexecutionplans/?limit=1&page=2",
"previous": null,
"results": [
{
"id": 7888,
"state": {
"id": 88,
"created_date": "2021-06-30T14:43:27.357522Z",
"modified_date": "2022-10-14T10:39:33.430192Z",
"translations": {
"en-us": {
"name": "Pending"
},
"tr-tr": {
"name": "Bekliyor"
}
},
"name": "Pending",
"config": {},
"enum_class": "OrderExecutionPlanStatus",
"enum_value": "pending",
"content_type": 8
},
"commands": [],
"order": {
"id": 8813,
"state": {
"id": 6,
"created_date": "2021-06-30T14:43:26.601899Z",
"modified_date": "2022-10-14T10:39:33.629710Z",
"translations": {
"en-us": {
"name": "Approved"
},
"tr-tr": {
"name": "Onaylanmış"
}
},
"name": "Approved",
"config": {},
"enum_class": "OrderStatus",
"enum_value": "400",
"content_type": 2
},
"commands": [],
"payment_type": "funds_transfer",
"delivery_range": null,
"client_type": "default",
"delivery_type": "standard",
"created_date": "2023-11-10T12:16:39.873093Z",
"modified_date": "2023-11-10T12:16:39.873113Z",
"omnitron_id": 65805,
"number": "2443965524311922",
"date_placed": "2023-11-10T12:16:15.009609Z",
"tracking_number": null,
"has_gift_box": false,
"gift_box_note": null,
"notes": null,
"segment": null,
"channel": 1,
"customer": 1124,
"shipping_address": 1817,
"billing_address": 1817,
"cargo_company": 925,
"retail_store": null
},
"orderexecutionplanitem_set": [
{
"id": 9241,
"state": {
"id": 92,
"created_date": "2021-06-30T14:43:27.397783Z",
"modified_date": "2022-10-14T10:39:33.419220Z",
"translations": {
"en-us": {
"name": "Pending"
},
"tr-tr": {
"name": "Bekliyor"
}
},
"name": "Pending",
"config": {},
"enum_class": "OrderExecutionPlanItemStatus",
"enum_value": "pending",
"content_type": 9
},
"item_type": "packing",
"created_date": "2023-11-10T12:17:20.264790Z",
"modified_date": "2023-11-10T12:17:20.338557Z",
"context": {
"items": [
{
"orderitem": 8714,
"snapshots": [],
"packaging_rule": 366,
"stock_location": 4
}
],
"scenario": 167
},
"is_active": true,
"order_execution_plan": 7888
}
],
"created_date": "2023-11-10T12:17:20.249108Z",
"modified_date": "2023-11-10T12:17:20.368821Z",
"context": {
"2023-11-10T12:17:20.246905Z": [
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "-23.00",
"unit_type": "quantity",
"stock_count": "1.00",
"reservation_count": "24.00"
}
}
],
"stock_location": {
"name": "New Vegas",
"engine": {
"id": 166,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "single_items"
}
},
"name": "Single Item Stock Engine",
"is_active": true,
"created_date": "2023-03-15T11:33:57.021922Z",
"modified_date": "2023-03-15T11:33:57.021953Z"
},
"erp_code": "new-vegas",
"priority": 1,
"is_active": true,
"is_pickup_location": true,
"is_return_available": true,
"is_delivery_location": true,
"is_fulfillment_center": false,
"is_fast_delivery_available": true
}
},
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "5000.00",
"unit_type": "quantity",
"stock_count": "5000.00",
"reservation_count": "0.00"
}
}
],
"stock_location": {
"name": "Pz Store 3",
"engine": {
"id": 1,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "fully_loaded_high_stock_number"
}
},
"name": "Fully Loaded High Stock Number Engine",
"is_active": true,
"created_date": "2021-07-06T14:39:49.299419Z",
"modified_date": "2023-09-20T09:54:01.079418Z"
},
"erp_code": "3",
"priority": 9,
"is_active": true,
"is_pickup_location": true,
"is_return_available": true,
"is_delivery_location": true,
"is_fulfillment_center": false,
"is_fast_delivery_available": false
}
},
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "1.00",
"unit_type": "quantity",
"stock_count": null,
"reservation_count": null
}
}
],
"stock_location": {
"name": "Test Lokasyonu",
"engine": {
"id": 166,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "single_items"
}
},
"name": "Single Item Stock Engine",
"is_active": true,
"created_date": "2023-03-15T11:33:57.021922Z",
"modified_date": "2023-03-15T11:33:57.021953Z"
},
"erp_code": "test-lokasyonu",
"priority": 10,
"is_active": true,
"is_pickup_location": true,
"is_return_available": false,
"is_delivery_location": true,
"is_fulfillment_center": true,
"is_fast_delivery_available": false
}
},
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "4994.00",
"unit_type": "quantity",
"stock_count": "5000.00",
"reservation_count": "6.00"
}
}
],
"stock_location": {
"name": "PZ Store 1",
"engine": {
"id": 1,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "fully_loaded_high_stock_number"
}
},
"name": "Fully Loaded High Stock Number Engine",
"is_active": true,
"created_date": "2021-07-06T14:39:49.299419Z",
"modified_date": "2023-09-20T09:54:01.079418Z"
},
"erp_code": "1",
"priority": 10,
"is_active": true,
"is_pickup_location": true,
"is_return_available": true,
"is_delivery_location": true,
"is_fulfillment_center": true,
"is_fast_delivery_available": true
}
},
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "4972.00",
"unit_type": "quantity",
"stock_count": "5000.00",
"reservation_count": "28.00"
}
}
],
"stock_location": {
"name": "Pz Store 4",
"engine": {
"id": 34,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "fully_loaded_high_stock_number"
}
},
"name": "Fully Loaded Stock Engine",
"is_active": true,
"created_date": "2021-09-28T08:23:52.695266Z",
"modified_date": "2023-10-30T22:09:24.333323Z"
},
"erp_code": "4",
"priority": 10,
"is_active": true,
"is_pickup_location": false,
"is_return_available": false,
"is_delivery_location": true,
"is_fulfillment_center": true,
"is_fast_delivery_available": true
}
},
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "4999.00",
"unit_type": "quantity",
"stock_count": "5000.00",
"reservation_count": "1.00"
}
}
],
"stock_location": {
"name": "PZ Store 2",
"engine": {
"id": 1,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "fully_loaded_high_stock_number"
}
},
"name": "Fully Loaded High Stock Number Engine",
"is_active": true,
"created_date": "2021-07-06T14:39:49.299419Z",
"modified_date": "2023-09-20T09:54:01.079418Z"
},
"erp_code": "2",
"priority": 10,
"is_active": true,
"is_pickup_location": true,
"is_return_available": true,
"is_delivery_location": true,
"is_fulfillment_center": false,
"is_fast_delivery_available": false
}
}
]
},
"is_active": true
}
]
}
GET
Order Execution Plan Detail
This method is used to retrieve details of the order execution plan for given ID parameter.
Path: /api/v1/oms/orderexecutionplans/{id}/
Example Request
To retrieve order execution plan detail, a GET request should be sent to /api/v1/oms/orderexecutionplans/{id}/
endpoint. No query parameters or body are required.
import requests
url = "https://{oms_base_url}/api/v1/oms/orderexecutionplans/1/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"
headers = {
'Accept': 'application/json',
'Authorization': 'Token {}'.format(api_token)
}
response = requests.request("GET", url, headers=headers)
print(response.json())
Example Response (200 OK)
In a successful response with a status code of 200 OK, the API returns order execution plan detail in the JSON format.
Parameter | Data Type | Description |
---|---|---|
id | integer | The primary key of the order execution plan |
state | string | Indicates the current state of the plan (start, pending, cancelled, completed) |
order | object | The order info of the execution plan |
commands | string | List of state transitions that can be applied on the plan |
created_date | date | The creation date of the order execution plan |
modified_date | date | The modified date of the order execution plan |
orderexecutionplanitem_set | object list | Order execution plan items for each order item |
context | object | Stock data for each stock location during every attempt at fulfillment |
This example response serves as a reference to understand the structure and data format of order execution plan.
{
"id": 7888,
"state": {
"id": 88,
"created_date": "2021-06-30T14:43:27.357522Z",
"modified_date": "2022-10-14T10:39:33.430192Z",
"translations": {
"en-us": {
"name": "Pending"
},
"tr-tr": {
"name": "Bekliyor"
}
},
"name": "Pending",
"config": {},
"enum_class": "OrderExecutionPlanStatus",
"enum_value": "pending",
"content_type": 8
},
"commands": [],
"order": {
"id": 8813,
"state": {
"id": 6,
"created_date": "2021-06-30T14:43:26.601899Z",
"modified_date": "2022-10-14T10:39:33.629710Z",
"translations": {
"en-us": {
"name": "Approved"
},
"tr-tr": {
"name": "Onaylanmış"
}
},
"name": "Approved",
"config": {},
"enum_class": "OrderStatus",
"enum_value": "400",
"content_type": 2
},
"commands": [],
"payment_type": "funds_transfer",
"delivery_range": null,
"client_type": "default",
"delivery_type": "standard",
"created_date": "2023-11-10T12:16:39.873093Z",
"modified_date": "2023-11-10T12:16:39.873113Z",
"omnitron_id": 65805,
"number": "2443965524311922",
"date_placed": "2023-11-10T12:16:15.009609Z",
"tracking_number": null,
"has_gift_box": false,
"gift_box_note": null,
"notes": null,
"segment": null,
"channel": 1,
"customer": 1124,
"shipping_address": 1817,
"billing_address": 1817,
"cargo_company": 925,
"retail_store": null
},
"orderexecutionplanitem_set": [
{
"id": 9241,
"state": {
"id": 92,
"created_date": "2021-06-30T14:43:27.397783Z",
"modified_date": "2022-10-14T10:39:33.419220Z",
"translations": {
"en-us": {
"name": "Pending"
},
"tr-tr": {
"name": "Bekliyor"
}
},
"name": "Pending",
"config": {},
"enum_class": "OrderExecutionPlanItemStatus",
"enum_value": "pending",
"content_type": 9
},
"item_type": "packing",
"created_date": "2023-11-10T12:17:20.264790Z",
"modified_date": "2023-11-10T12:17:20.338557Z",
"context": {
"items": [
{
"orderitem": 8714,
"snapshots": [],
"packaging_rule": 366,
"stock_location": 4
}
],
"scenario": 167
},
"is_active": true,
"order_execution_plan": 7888
}
],
"created_date": "2023-11-10T12:17:20.249108Z",
"modified_date": "2023-11-10T12:17:20.368821Z",
"context": {
"2023-11-10T12:17:20.246905Z": [
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "-23.00",
"unit_type": "quantity",
"stock_count": "1.00",
"reservation_count": "24.00"
}
}
],
"stock_location": {
"name": "New Vegas",
"engine": {
"id": 166,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "single_items"
}
},
"name": "Single Item Stock Engine",
"is_active": true,
"created_date": "2023-03-15T11:33:57.021922Z",
"modified_date": "2023-03-15T11:33:57.021953Z"
},
"erp_code": "new-vegas",
"priority": 1,
"is_active": true,
"is_pickup_location": true,
"is_return_available": true,
"is_delivery_location": true,
"is_fulfillment_center": false,
"is_fast_delivery_available": true
}
},
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "5000.00",
"unit_type": "quantity",
"stock_count": "5000.00",
"reservation_count": "0.00"
}
}
],
"stock_location": {
"name": "Pz Store 3",
"engine": {
"id": 1,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "fully_loaded_high_stock_number"
}
},
"name": "Fully Loaded High Stock Number Engine",
"is_active": true,
"created_date": "2021-07-06T14:39:49.299419Z",
"modified_date": "2023-09-20T09:54:01.079418Z"
},
"erp_code": "3",
"priority": 9,
"is_active": true,
"is_pickup_location": true,
"is_return_available": true,
"is_delivery_location": true,
"is_fulfillment_center": false,
"is_fast_delivery_available": false
}
},
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "1.00",
"unit_type": "quantity",
"stock_count": null,
"reservation_count": null
}
}
],
"stock_location": {
"name": "Test Lokasyonu",
"engine": {
"id": 166,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "single_items"
}
},
"name": "Single Item Stock Engine",
"is_active": true,
"created_date": "2023-03-15T11:33:57.021922Z",
"modified_date": "2023-03-15T11:33:57.021953Z"
},
"erp_code": "test-lokasyonu",
"priority": 10,
"is_active": true,
"is_pickup_location": true,
"is_return_available": false,
"is_delivery_location": true,
"is_fulfillment_center": true,
"is_fast_delivery_available": false
}
},
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "4994.00",
"unit_type": "quantity",
"stock_count": "5000.00",
"reservation_count": "6.00"
}
}
],
"stock_location": {
"name": "PZ Store 1",
"engine": {
"id": 1,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "fully_loaded_high_stock_number"
}
},
"name": "Fully Loaded High Stock Number Engine",
"is_active": true,
"created_date": "2021-07-06T14:39:49.299419Z",
"modified_date": "2023-09-20T09:54:01.079418Z"
},
"erp_code": "1",
"priority": 10,
"is_active": true,
"is_pickup_location": true,
"is_return_available": true,
"is_delivery_location": true,
"is_fulfillment_center": true,
"is_fast_delivery_available": true
}
},
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "4972.00",
"unit_type": "quantity",
"stock_count": "5000.00",
"reservation_count": "28.00"
}
}
],
"stock_location": {
"name": "Pz Store 4",
"engine": {
"id": 34,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "fully_loaded_high_stock_number"
}
},
"name": "Fully Loaded Stock Engine",
"is_active": true,
"created_date": "2021-09-28T08:23:52.695266Z",
"modified_date": "2023-10-30T22:09:24.333323Z"
},
"erp_code": "4",
"priority": 10,
"is_active": true,
"is_pickup_location": false,
"is_return_available": false,
"is_delivery_location": true,
"is_fulfillment_center": true,
"is_fast_delivery_available": true
}
},
{
"order_items": [
{
"order_item": {
"pk": 8714,
"sku": "AKN-009",
"omnitron_id": 72537,
"order_number": "2443965524311922"
},
"stock_data": {
"quantity": "4999.00",
"unit_type": "quantity",
"stock_count": "5000.00",
"reservation_count": "1.00"
}
}
],
"stock_location": {
"name": "PZ Store 2",
"engine": {
"id": 1,
"conf": {
"auth": {
"type": "anonymous"
},
"service": {
"url": "",
"type": "fully_loaded_high_stock_number"
}
},
"name": "Fully Loaded High Stock Number Engine",
"is_active": true,
"created_date": "2021-07-06T14:39:49.299419Z",
"modified_date": "2023-09-20T09:54:01.079418Z"
},
"erp_code": "2",
"priority": 10,
"is_active": true,
"is_pickup_location": true,
"is_return_available": true,
"is_delivery_location": true,
"is_fulfillment_center": false,
"is_fast_delivery_available": false
}
}
]
},
"is_active": true
}