Skip to main content
POST
Create order

Authorizations

Authorization
string
header
required

An API token from Sign in, sent as Authorization: Bearer <token>. Tokens last 30 days.

Body

application/json
partner_id
integer
required

Customer (partner) ID. The id of an existing record in the partners_partners table.

Example:

1

payment_term_id
integer
required

Payment term ID. The id of an existing record in the accounts_payment_terms table.

Example:

1

date_order
string
required

Order date in YYYY-MM-DD format. Must be a valid date.

Example:

"2026-02-18"

lines
object[]
required

Array of order line items with writable fields from the quotation form. Must have at least 1 items.

Example:
validity_date
string | null

Quotation validity date in YYYY-MM-DD format. Must be a valid date.

Example:

"2026-02-28"

commitment_date
string | null

Must be a valid date.

Example:

"2026-03-03T04:25:46"

client_order_ref
string | null

Must not be greater than 255 characters.

Example:

"b"

origin
string | null

Must not be greater than 255 characters.

Example:

"n"

note
string | null

Terms and conditions or internal note.

Example:

"Delivery within 7 business days."

user_id
integer | null

The id of an existing record in the users table.

Example:

16

company_id
integer | null

Company ID. The id of an existing record in the companies table.

Example:

1

currency_id
integer | null

Currency ID. The id of an existing record in the currencies table.

Example:

1

campaign_id
integer | null

The id of an existing record in the utm_campaigns table.

Example:

16

utm_source_id
integer | null

The id of an existing record in the utm_sources table.

Example:

16

medium_id
integer | null

The id of an existing record in the utm_mediums table.

Example:

16

sales_order_tags
integer[]

The id of an existing record in the sales_tags table.

Example:

Response

Created