Skip to content
Get started

Create Customer Orders

POST/api/v2/public/stores/{store_number}/orders/customerorders

Creates customer orders and their lines for one store. Every product_number must already exist in the catalogue; an unknown one rejects the whole request. Setting flush to true first deletes all existing customer orders and lines for the stores in the request, so only use it when you are sending the complete set.

Path ParametersExpand Collapse
store_number: string
Query ParametersExpand Collapse
flush: optional boolean

Deletes all existing customer orders for the stores in the request before inserting.

Body ParametersJSONExpand Collapse
orders: optional array of object { order_number, customer_city, customer_country, 23 more }
order_number: string
minLength1
customer_city: optional string
customer_country: optional string
customer_email: optional string
customer_name: optional string
customer_number: optional string
customer_phone: optional string
customer_street: optional string
customer_zipcode: optional string
delivery_city: optional string
delivery_country: optional string
delivery_street: optional string
delivery_zipcode: optional string
description: optional string
file_name: optional string
is_active: optional boolean
is_picked: optional boolean
is_rejected: optional boolean
order_comment: optional string
order_lines: optional array of object { line_number, product_number, quantity, 14 more }
line_number: number
formatint64
product_number: string
minLength1
quantity: number
formatdouble
barcode: optional string
delivery_date: optional string
formatdate-time
description: optional string
full_fillment_status: optional string
is_picked: optional boolean
is_picked_from_warehouse: optional boolean
ordering_datetime: optional string
formatdate-time
picked_quantity: optional number
formatdouble
picking_stock_pool_array: optional array of string
pickup_date: optional string
formatdate-time
preferred_location_code: optional string
price: optional number
formatdouble
reference: optional string
stock_pool: optional number
formatint32
order_type: optional string
order_type_code: optional string
order_type_description: optional string
reference: optional string
sales_order_id: optional string
status_id: optional number
formatint32
ReturnsExpand Collapse
success: boolean

Indicates whether the operation completed successfully.

data: optional string

Optional data payload returned by the operation.

message: optional string

Human-readable message describing the result.

Create Customer Orders

curl https://api.colleqtive.net/api/v2/public/stores/$STORE_NUMBER/orders/customerorders \
    -X POST \
    -H "Authorization: $COLLEQTIVE_BEARER_TOKEN"
{
  "success": true,
  "data": "data",
  "message": "message"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}
Returns Examples
{
  "success": true,
  "data": "data",
  "message": "message"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}