# Set Orders Creates or updates orders based on the externalId of the order. If an order with the externalId does not exist a new order with status OPEN will be created. This status changes when the order is processed during the fulfillment process. The order date won't be modified when updating the order. Orders can only be updated as long as their status is OPEN. Be aware that you can only submit 50 orders at once. Endpoint: POST /mrp.order.setOrders Security: oauth2 ## Request fields (application/json): - `data` (array) Defines the data required for the operation, including all mandatory and optional fields. - `data.externalId` (string, required) Represents the unique identifier of the imported order in an external system (e.g. ERP) Example: "PRC-ORD-101" - `data.orderDate` (string, required) Order date of the imported order. The date must be provided in ISO 8601 format (YYYY-MM-DDTHH:mm:ssZ). Example: "2026-01-01T01:11:00Z" - `data.customer` (string) Name of the customer/company of the order. Example: "John Doe" - `data.customerType` (string) Tells if the order is from a retail or wholesale customer. Enum: "RETAIL", "WHOLESALE" - `data.orderItems` (array, required) List of order item of the imported order, cannot be empty. - `data.orderItems.sku` (string, required) Stock keeping unit of the ordered variant. Example: "ETH-250G-WB" - `data.orderItems.quantity` (integer, required) Specifies the number of the ordered variant, must be larger than zero. Example: 1 ## Response 200 fields (application/json): - `ok` (boolean) Indicates whether the request was successful. Example: true - `result` (object) Contains the response data of a successful request. - `result.syncedOrders` (array) - `result.syncedOrders.id` (string) The unique identifier of the order. Example: "550e8400-e29b-41d4-a716-446655440000" - `result.syncedOrders.externalId` (string) Represents the unique identifier of the imported order in an external system (e.g. ERP) Example: "PRC-ORD-101" ## Response 400 fields (application/json): - `ok` (boolean) Indicates whether the request was successful or not - `error` (object) - `error.code` (string) Specifies error code that can be handled programmatically. Example: "invalid_parameter" - `error.message` (string) A detailed description of the occurred error. Example: "Invalid parameter provided" ## Response 401 fields (application/json): - `ok` (boolean) Indicates whether the request was successful or not - `error` (object) - `error.code` (string) Specifies error code that can be handled programmatically. Example: "invalid_parameter" - `error.message` (string) A detailed description of the occurred error. Example: "Invalid parameter provided" ## Response 403 fields (application/json): - `ok` (boolean) Indicates whether the request was successful or not - `error` (object) - `error.code` (string) Specifies error code that can be handled programmatically. Example: "invalid_parameter" - `error.message` (string) A detailed description of the occurred error. Example: "Invalid parameter provided" ## Response 422 fields (application/json): - `ok` (boolean) Indicates whether the request was successful or not - `error` (object) - `error.code` (string) Indicates that one or multiple items are invalid and no changes were saved. Example: "bulk_operation_failed" - `error.message` (string) A detailed description of the occurred error. Example: "One or multiple items are invalid. No changes were saved." - `error.data` (object) Defines additional information about the error. - `error.data.details` (array) A detailed list of issues detected in the request. - `error.data.details.code` (string) Specifies error code that can be handled programmatically. Example: "invalid_parameter" ## Response 500 fields (application/json): - `ok` (boolean) Indicates whether the request was successful or not - `error` (object) - `error.code` (string) Specifies error code that can be handled programmatically. Example: "invalid_parameter" - `error.message` (string) A detailed description of the occurred error. Example: "Invalid parameter provided"