CreateOrder
CreateOrderCreates a new sales order record from scratch.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | OrderInput! | All order data. |
Example Query:
mutation CreateOrder($input: OrderInput!) {
CreateOrder(input: $input) {
id
label
status
dated_at
}
}CreateOrderFrom
CreateOrderFromCreates a sales order by copying data from existing Estimates.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | OrderFromInput! | IDs of source documents. |
UpdateOrder
UpdateOrderUpdates an existing sales order record.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | Int! | ID of the order document. |
input | OrderInput! | Fields to update. |
DeleteOrder / DeleteOrders
DeleteOrder / DeleteOrdersDeletes one or multiple sales orders.
DuplicateOrder
DuplicateOrderCreates a full copy of an existing sales order.
GenerateOrderNumber
GenerateOrderNumberGenerates the next available sequence label for a new sales order.
| Parameter | Type | Description |
|---|---|---|
location_id | ID | Optional location to use for sequence prefix. |
GenerateOrdersPdfs
GenerateOrdersPdfsGenerates PDF documents for multiple sales orders.
TransformIntoShippingOrder
TransformIntoShippingOrderConverts a sales order into a Shipping Order for delivery.
TransformIntoProductReturn
TransformIntoProductReturnConverts a sales order into a Product Return for goods reversal.
Input Data Types
OrderInput
OrderInput| Field | Type | Description |
|---|---|---|
id | Int | ID for updates. |
label | String | Order number. |
notes | String | Public notes. |
status | OrderStatus | Initial or updated status. |
update_on_hand | Boolean | Impact on-hand stock immediately. |
dated_at | Date | Sales order date. |
shipping_at | Date | Target shipping date. |
customer | CustomerInput | Linked customer. |
line_items | [LineItemOrderInput] | List of items ordered. |
shipping_address | AddressInput | Delivery address link. |
automatically_assign_batch_numbers | Boolean | Auto-pick batch numbers if applicable. |
automatically_assign_serial_numbers | Boolean | Auto-pick serial numbers if applicable. |
total_units | Float | Total units for the order. |
payment_status | PaymentStatus | Manual status override. |
shipping_status | ShippingStatus | Manual status override. |
exchange_rate | Float | Currency exchange rate. |
tax_type | TaxType | "exclusive" or "inclusive". |
internal_notes | String | Private office notes. |
billing_address | AddressInput | Billing address link. |
pdf_template | PdfTemplateInput | PDF template link. |
source | String | Origin of the order. |
account_representative | AccountRepresentativeInput | Representative link. |
external_reference | String | Customer reference. |
for_the_attention_of | String | Contact name on PDF. |
season_id | Int | Season link ID. |
season | SeasonInput | Season link data. |
payment_information | PaymentInformationInput | Bank details link. |
default_discount | Float | Global discount value. |
discount_type | DiscountType | "percentage" or "amount". |
currency | CurrencyInput | Currency link data. |
price_level | PriceLevelInput | Price list link. |
files | [FileInput] | Attachments. |
custom_fields | [EntityCustomFieldInput] | Custom fields for this entity. |
OrderFromInput
OrderFromInput| Field | Type | Description |
|---|---|---|
Estimate | [Int] | Source Estimate IDs array. |
status | OrderStatus | Status for the resulting order. |
Enums
OrderStatus
OrderStatus| Value | Description |
|---|---|
unpublished | Draft status (hidden). |
pending_validation | Awaiting approval. |
active | Confirmed and in progress. |
completed | Fulfilled and closed. |
archived | Moved to history. |
cancelled | Document voided. |
ShippingStatus
ShippingStatus| Value | Description |
|---|---|
not_shipped | No goods sent yet. |
partially_shipped | Some goods documented for shipping. |
shipped | All goods documented for shipping. |
PaymentStatus
PaymentStatus| Value | Description |
|---|---|
unpaid | No payment received. |
partially_paid | Partial payment received. |
paid | Total value fully settled. |
DiscountType
DiscountType| Value | Description |
|---|---|
amount | Fixed discount amount. |
percentage | Percentage-based discount. |
TaxType
TaxType| Value | Description |
|---|---|
exclusive | Tax calculated on top of the net price. |
inclusive | Tax included in the displayed price. |
