Skip to main content

Export production orders

The export production orders API can be used to export production orders into another system

caution

If you have not already read the Introduction to Export APIs then it's recommended to start there to understand how to use the export APIs. The Export APIs is designed to keep track of what has already been exported. If you are looking for a normal API, refer to the Core Production Orders API instead.

Get production orders that have not been exported

Endpoint: GET /v10/production-orders/export

You can add a date+time to the query string using the parameter not_exported_since in production order to re-export production orders that have already been exported

Available properties for filtering: created_at, updated_at (NOTE: These filters have to be added using our Filters Syntax, however system_id and not_export_since should be added as a normal query string parameter)

Available nested resources for including: deliveryNotes, lines, lines.product, lines.variant, salesOrders, salesOrders.delivery, salesOrders.lines, salesOrders.lines.product, salesOrders.lines.variant, salesOrders.shop, supplier

The endpoint will fetch all production orders that have not been exported yet

Available query parameters

ParameterData typeRequiredDefaultDescription
system_idstringYesA string identifying the system the production orders should be exported to. This is used so production orders can be exported to multiple systems.
not_exported_sincedatetime (UTC)Current timeAdd this to re-export production orders that have already been exported. Note the timezone should be UTC
include_openinteger0Export draft production orders. 0 = only export non-draft production orders. 1 = also include draft production orders in export
include_closedinteger0Export closed production orders. 0 = only export non-closed production orders. 1 = also include closed production orders in export
filter_groupsArray<Filters>Optional filters to add. See which filters are available above

Data of response

ParameterRequiredDefaultDescription
production_orders.*YesAn array of object production order

Mark production orders as exported

Endpoint: POST /v10/production-orders/mark-as-exported

ParameterData typeRequiredDefaultDescription
production ordersArray<Production orders that have been exported>Yes[Production orders that have been exported](#production orders-that-have-been-exported). You can at a max mark 10 production orders at a time

Production orders that have been exported

ParameterData typeRequiredDefaultDescription
production_order_idintYesThe ID of the production order that has been exported
system_idstringYesA string identifying the system the production orders should be exported to. This is used so production orders can be exported to multiple systems.
notestringAny notes regarding the sync you want to add. These will be displayed in the timeline of the production order