Orders

Get all orders

get

This method retrieves a list of all external orders along with their details, such as order numbers, priority, client information, and timestamps.

Authorizations
x-api-keystringRequired
Header parameters
x-tenant-idstring Β· uuidOptional

Tenant id (uuid v4)

Responses
200Success
application/json
get
/api/v1/public/orders

Create order

post

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_id is not provided in the request, HESH generates it and includes it in the response.

  • If the line_item_id is provided, HESH uses it and includes the same ID in the response.

How to check transfered data in HESH

Register in Hesh

  1. Go to your success manager and provide registration email

  2. Receive invitation on the email

  3. Create a password and log in

Open Production Page

  1. If you don't have "Production" page in the sidebar or don't have access contact your success manager

Filter Productions

  1. Choose "Source" filter

  2. Filter productions by External type

Sort Productions

Sort productions by date, deadline and so on

Authorizations
x-api-keystringRequired
Header parameters
x-tenant-idstring Β· uuidOptional

Tenant id (uuid v4)

Body
external_order_numberstringRequired

A unique string used in the UI and controlled by the user

Example: ON-12345
external_order_idstringRequired

A unique identifier for each order

Example: b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e
marketplace_order_numberstringOptional

A unique string used in the UI and controlled by the user

Example: MON-986-456
commentstringOptional

Additional comments or info for the order

Example: needs extra packing
deadline_atstring Β· date-timeOptional

The date when the order should be produced (ISO 8601 format)

Example: 2024-05-17T11:21:47.898Z
external_created_atstring Β· date-timeOptional

The date when the order was created in an external system (ISO 8601 format)

Example: 2024-05-14T11:21:47.898Z
to_stockbooleanOptional

Indicates if this is an internal company order (e.g., to replenish warehouse stocks)

Example: false
Responses
post
/api/v1/public/orders

Update order

put

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.

Authorizations
x-api-keystringRequired
Path parameters
external_order_idstringRequired

The unique identifier of the order

Example: b86fa12a-76fc-46f5-8a3e-bf39e7be4c4e
Header parameters
x-tenant-idstring Β· uuidOptional

Tenant id (uuid v4)

Body
external_order_numberstringOptional

A unique string used in the UI and controlled by the user

Example: ON-12345
marketplace_order_numberstringOptional

A unique string used in the UI and controlled by the user

Example: MON-986-456
commentstringOptional

Additional comments or info for the order

Example: extra packaging
deadline_atstring Β· date-timeOptional

The date when the order should be produced (ISO 8601 format)

Example: 2025-01-22T16:48:25.617Z
external_created_atstring Β· date-timeOptional

The date when the order was created in an external system (ISO 8601 format)

Example: 2025-01-22T16:48:25.618Z
to_stockbooleanOptional

Indicates if this is an internal company order (e.g., to replenish warehouse stocks)

Example: true
Responses
200Success
application/json
put
/api/v1/public/orders/{external_order_id}

Cancel external order

post

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

Authorizations
x-api-keystringRequired
Path parameters
idstringRequired
Header parameters
x-tenant-idstring Β· uuidOptional

Tenant id (uuid v4)

Responses
post
/api/v1/public/orders/{id}

Delete order

delete

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.

Authorizations
x-api-keystringRequired
Path parameters
idstringRequired
Header parameters
x-tenant-idstring Β· uuidOptional

Tenant id (uuid v4)

Responses
200Success
application/json
delete
/api/v1/public/orders/{id}

Last updated