Orders
This method retrieves a list of all external orders along with their details, such as order numbers, priority, client information, and timestamps.
Tenant id (uuid v4)
GET /api/v1/public/orders HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
x-tenant-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
[
{
"id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"external_order_number": "external-order-number",
"marketplace_order_number": "marketplace_order_number",
"external_order_id": "external-order-id",
"order_key": "order-key-123",
"comment": "fragile",
"to_stock": false,
"is_deleted": false,
"priority": "Medium",
"client_id": "string",
"counterparty_id": "string",
"created_at": "2025-01-23T17:01:31.692Z"
}
]This method allows creating a new order, setting order properties, and adding order items. Production items are automatically generated based on the order items' quantity.
Notes
If the
line_item_idis not provided in the request, HESH generates it and includes it in the response.If the
line_item_idis provided, HESH uses it and includes the same ID in the response.
How to check transfered data in HESH
Register in Hesh
Go to your success manager and provide registration email
Receive invitation on the email
Create a password and log in
Open Production Page
If you don't have "Production" page in the sidebar or don't have access contact your success manager
Filter Productions
Choose "Source" filter
Filter productions by External type
Sort Productions
Sort productions by date, deadline and so on
Tenant id (uuid v4)
A unique string used in the UI and controlled by the user
ON-12345A unique identifier for each order
b86fa12a-76fc-46f5-8a3e-bf39e7be4c4eA unique string used in the UI and controlled by the user
MON-986-456Additional comments or info for the order
needs extra packingThe date when the order should be produced (ISO 8601 format)
2024-05-17T11:21:47.898ZThe date when the order was created in an external system (ISO 8601 format)
2024-05-14T11:21:47.898ZIndicates if this is an internal company order (e.g., to replenish warehouse stocks)
falseClient information
Primary client information
POST /api/v1/public/orders HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
x-tenant-id: 123e4567-e89b-12d3-a456-426614174000
Content-Type: application/json
Accept: */*
Content-Length: 893
{
"external_order_number": "ON-12345",
"external_order_id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"marketplace_order_number": "MON-986-456",
"comment": "needs extra packing",
"deadline_at": "2024-05-17T11:21:47.898Z",
"external_created_at": "2024-05-14T11:21:47.898Z",
"to_stock": false,
"client": {
"name": "Client name",
"external_client_id": "123456",
"phone": "937-99-92",
"email": "[email protected]",
"company": "Client company"
},
"primary_client": {
"name": "Client name",
"external_client_id": "123456",
"phone": "937-99-92",
"email": "[email protected]",
"company": "Client company"
},
"line_items": [
{
"line_item_id": "557657-8654-89i76",
"barcode": "13465678767",
"deadline_at": "2024-05-17T11:21:47.898Z",
"planned_start_date": "2025-04-08T16:56:27.640Z",
"external_created_at": "2025-04-08T16:56:27.640Z",
"shipping_deadline": "2025-04-08T16:56:27.640Z",
"quantity": 3,
"line_item_note": "Should be smooth",
"tags": [
"urgent",
"fragile"
]
}
]
}{
"id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"external_order_number": "external-order-number",
"order_key": "O-EX-1",
"external_order_id": "external-order-id",
"marketplace_order_number": "marketplace_order_number",
"marketplace_note": "extra packaging",
"line_items": [
{
"id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"line_item_id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"barcode": "453454334234",
"sku": "product-84620",
"name": "Super product",
"quantity": 10,
"line_item_note": "extra packaging",
"productions": [
{
"production_key": "new-production-key",
"created_at": "2025-01-22T16:48:25.616Z"
}
]
}
]
}This method allows to cancel all productions in specified order.
Notes
Productions, additional productions and tasks are not in finished states (not “Done”, “Cancelled”, “From Stock”):
the system cancels all productions, tasks and additional components from this order with specified barcodes
updates the deadline for the whole order according to the most short term deadline of the item in it
Tenant id (uuid v4)
POST /api/v1/public/orders/{id} HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
x-tenant-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
{
"id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"external_order_number": "external-order-number",
"marketplace_order_number": "marketplace_order_number",
"external_order_id": "external-order-id",
"order_key": "order-key-123",
"comment": "fragile",
"to_stock": false,
"is_deleted": false,
"priority": "Medium",
"client_id": "string",
"counterparty_id": "string",
"created_at": "2025-01-23T17:01:31.692Z"
}This method allows to update order properties and separate order lines with new values. Any property not provided will be left unchanged.
Scenarios for processing the received data
📝 Amount updated
the quantity is increased (past quantity>new quantity)
The system counts by how many units the quantity of the product has increased and adds a separate production item to the order for each unit of the difference
the number is decreased (past quantity<new quantity)
The system counts by how many units the quantity of the product has decreased and selects difference number with non-started productions among all in the specified order and cancels them
If decreased difference more than number of non-started productions then system find not finished productions with low production priority and then the smallest progress bar and stops them.
📝 Quantity is zero
If you enter zero in the quantity value in the body of the query, the system will cancel all productions in To Do status and stop all productions in In Progress status of this line item with the specified characteristic. This way, a certain number of created productions with the specified parameters are canceled/stopped within one order.
📝 Line item is missed in request body
Productions are not in finished states - the system cancels all productions from this order with specified barcodes. Updates the deadline for the whole order according to the most short term deadline of the item in it.
📝 Deadline updated
System checks deadlines for each production item with the same barcode in specified order and rewrites them, saving the history and marks that changes were made by external system Updates deadline for the whole order according to the most short term deadline of the item in it.
The unique identifier of the order
b86fa12a-76fc-46f5-8a3e-bf39e7be4c4eTenant id (uuid v4)
A unique string used in the UI and controlled by the user
ON-12345A unique string used in the UI and controlled by the user
MON-986-456Additional comments or info for the order
extra packagingThe date when the order should be produced (ISO 8601 format)
2025-01-22T16:48:25.617ZThe date when the order was created in an external system (ISO 8601 format)
2025-01-22T16:48:25.618ZIndicates if this is an internal company order (e.g., to replenish warehouse stocks)
trueClient information
Primary client information
PUT /api/v1/public/orders/{id} HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
x-tenant-id: 123e4567-e89b-12d3-a456-426614174000
Content-Type: application/json
Accept: */*
Content-Length: 821
{
"external_order_number": "ON-12345",
"marketplace_order_number": "MON-986-456",
"comment": "extra packaging",
"deadline_at": "2025-01-22T16:48:25.617Z",
"external_created_at": "2025-01-22T16:48:25.618Z",
"to_stock": true,
"client": {
"name": "Client name",
"external_client_id": "123456",
"phone": "937-99-92",
"email": "[email protected]",
"company": "Client company"
},
"primary_client": {
"name": "Client name",
"external_client_id": "123456",
"phone": "937-99-92",
"email": "[email protected]",
"company": "Client company"
},
"line_items": [
{
"line_item_id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"barcode": "453454334234",
"deadline_at": "2025-01-22T16:48:25.616Z",
"planned_start_date": "2025-04-08T16:56:27.640Z",
"external_created_at": "2025-04-08T16:56:27.640Z",
"shipping_deadline": "2025-04-08T16:56:27.640Z",
"quantity": 10,
"line_item_note": "extra packaging"
}
]
}{
"id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"external_order_number": "external-order-number",
"order_key": "O-EX-1",
"external_order_id": "external-order-id",
"marketplace_order_number": "marketplace_order_number",
"marketplace_note": "extra packaging",
"line_items": [
{
"id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"line_item_id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"barcode": "453454334234",
"sku": "product-84620",
"name": "Super product",
"quantity": 10,
"line_item_note": "extra packaging",
"productions": [
{
"production_key": "new-production-key",
"created_at": "2025-01-22T16:48:25.616Z"
}
]
}
]
}This method allows to delete a single order by its id.
Notes
Productions, additional productions and tasks are not in finished states (not “Done”, “Cancelled”, “From Stock”):
the system cancels all productions, tasks, additional tasks and additional components from this order with specified barcodes
Payment for task that are in “In progress” status should be calculated
Add flag “is deleted” to order info in all canceled productions.
Updates the deadline for the whole order according to the most short term deadline of the item in it.
Removes order details assosiated with this order from the list in “New production” and “Change order for production” pop-ups.
Productions, additional productions and tasks that are in finished states (not “Done”, “Cancelled”, “From Stock”) remain in the same status.
Tenant id (uuid v4)
DELETE /api/v1/public/orders/{id} HTTP/1.1
Host:
x-api-key: YOUR_API_KEY
x-tenant-id: 123e4567-e89b-12d3-a456-426614174000
Accept: */*
{
"id": "b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e",
"external_order_number": "external-order-number",
"marketplace_order_number": "marketplace_order_number",
"external_order_id": "external-order-id",
"order_key": "order-key-123",
"comment": "fragile",
"to_stock": false,
"is_deleted": false,
"priority": "Medium",
"client_id": "string",
"counterparty_id": "string",
"created_at": "2025-01-23T17:01:31.692Z"
}Last updated