Create Sales Order
Beta/v1/sales/sales-ordersIdempotent with Idempotency-Key header. Learn more
Creates a sales order in estimate status.
The order number is assigned automatically, and a sales rep is auto-assigned when none is provided. A shipping line is always added to the order, plus a discount line when an order discount is supplied.
include[]optional arrayenumValues:customersales_repbill_to_addressSub-objects to expand in the response. When omitted, sub-objects are returned as null.
buyer_account_idstringID of the customer account the order is for.
customer_purchase_order_numberoptional stringThe customer's own purchase order number, for cross-referencing.
Must be unique among your orders for this customer.
noteoptional stringOrder note.
carrier_idoptional stringCarrier ID.
service_level_idoptional stringService level ID.
carrier_billing_typeoptional stringenumValues:senderthird_partyWho is billed for freight.
sender: the sender pays for shipping.third_party: a third party pays for shipping, using the carrier billing account number.
carrier_billing_account_numberoptional stringCarrier billing account number.
priority_codestringFulfillment priority used to rank the order on the shop floor.
sales_rep_idoptional stringSales rep ID.
When omitted, a rep is assigned automatically: the customer's default sales rep first, then the sales territory matching the ship-to postal code, then the ship-to state.
shipping_term_idoptional stringShipping term ID.
payment_term_idoptional stringPayment term ID.
order_discount_idoptional stringOrder discount ID.
When supplied, a discount line is added to the order automatically.
promised_atoptional string (date-time)Promised delivery date.
bill_to_address_idstringBill-to address ID. Must reference an existing address on the order's owner or buyer account.
ship_to_address_idstringShip-to address ID. Must reference an existing address on the order's owner or buyer account.
linesarray of objectOrder lines to create.
product_idstringID of the product being ordered.
quantityobjectQuantity ordered.
valuestring (decimal)Decimal value, as a string to preserve precision.
unit_idstringID of the unit of measure for the value.
product_skuoptional stringSKU recorded on the line. Defaults to the product's SKU when omitted.
product_descriptionoptional stringDescription recorded on the line. Defaults to the product's description when omitted.
unit_priceoptional objectUnit price override. Honored only for internal users; for customer accounts it is ignored and the price is calculated server-side.
valuestring (decimal)Decimal value of the rate, expressed as the amount of the numerator unit per one denominator unit.
numerator_unit_idstringID of the unit for the rate's numerator (e.g. the currency of a price).
denominator_unit_idstringID of the unit for the rate's denominator (the per-unit basis).
edi_line_item_idoptional stringEDI line item ID.
acknowledgement_email_contactsoptional array of objectAccount users who should receive order acknowledgement emails.
account_user_idstringAccount user ID to receive the notification.
invoice_email_contactsoptional array of objectAccount users who should receive invoice emails.
account_user_idstringAccount user ID to receive the notification.
idstringSales order ID.
objectstringenumValues:sales_orderResource type identifier.
numberstringHuman-readable order number, e.g. SO-001.
Assigned automatically when the order is created; unique within your account.
customer_purchase_order_numberstringnullableThe customer's own purchase order number, for cross-referencing.
Unique among this customer's orders.
notestringnullableOrder note.
statusstringenumValues:estimateissuedfulfilledOrder lifecycle status.
estimate: a draft quote that has not yet been committed; not counted as a real order.issued: the order has been issued and is being fulfilled.fulfilled: the order has been completed and closed.
Status changes are made through the issue, unissue, close, and reopen action endpoints rather than by updating this field.
prioritystringenumValues:lownormalhighFulfillment priority, used to rank orders on the shop floor.
payment_statusstringenumValues:unpaidpartially_paidpaidPayment state of the order.
Payment tracking is not yet wired up, so this currently always reports unpaid.
acknowledgment_statusstringenumValues:not_sentsentWhether an order acknowledgment has been sent to the customer.
customerobjectExpandablenullableAssociated customer.
idstringCustomer ID.
objectstringenumValues:customerResource type identifier.
namestringThe customer's business name, as shown throughout the app and on documents.
numberstringHuman-readable customer number used to identify the account, distinct from the id.
statusstringenumValues:normalpreferredhold_shipmentAccount status code, controlling whether the customer can transact.
normal: standard active account with no restrictions.preferred: active account flagged as preferred.hold_shipment: orders can be placed, but shipments are held.hold_all: all activity is on hold.
edi_statusstringenumValues:enableddisabledWhether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.
relationship_typestringenumValues:standaloneparentchildThe customer's position in the account hierarchy.
standalone: no parent or child accounts.parent: has one or more child accounts (seechild_accounts).child: belongs to a parent account (seeparent_account).
commission_policystringenumValues:commission_appliedcommission_exemptHow sales commission applies to this customer's orders.
commission_exempt: this customer's orders are exempt from sales commission.commission_applied: sales commission is calculated on this customer's orders.
notestringnullableFree-form note about the customer.
credit_limitobjectnullableMaximum credit extended to this customer.
null in this endpoint.contact_infoobjectnullableContact information.
null in this endpoint.freight_preferencesobjectnullableFreight and carrier preferences applied to this customer's shipments.
null in this endpoint.defaultsobjectnullableDefault settings applied to new orders for this customer.
null in this endpoint.notification_preferencesobjectnullableNotification preferences.
null in this endpoint.bill_to_addressobjectExpandablenullableDefault billing address.
null in this endpoint.ship_to_addressobjectExpandablenullableDefault shipping address.
null in this endpoint.typeobjectnullableThe account group of type type_group that categorizes this customer (for example "Distributors").
null in this endpoint.price_groupsobjectnullableAccount groups of type pricing_group that this customer belongs to, used to apply pricing rules.
null in this endpoint.parent_accountobjectnullableParent account.
Present if this is a child account.
null in this endpoint.child_accountsobjectnullableChild accounts.
Present if this is a parent account.
null in this endpoint.created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
sales_repobjectExpandablenullableSales representative.
idstringActor ID.
objectstringenumValues:actorResource type identifier.
typestringenumValues:userapi_keyagentActor type.
user: a human user account.api_key: a programmatic caller authenticating with an API key.agent: an automated agent acting on the account's behalf.
namestringnullableThe actor's display name.
handlestringnullableHuman-readable handle identifying the actor.
- For
useractors: the user's email address. - For
api_keyactors: the redacted key value.
Agent actors carry no handle.
roleobjectnullableAssigned role.
null in this endpoint.created_byobjectnullableWho created this order, and their relation (internal/customer/system).
bill_to_addressobjectExpandablenullableBilling address.
idstringAddress ID.
objectstringenumValues:addressResource type identifier.
namestringDisplay name of the address.
phonestringnullablePhone number associated with the address.
emailstringnullableEmail address associated with the address.
typestringenumValues:standarddrop_shipAddress type.
standard: a normal shipping or billing address.drop_ship: an address an order is shipped to directly, typically a third party or end customer rather than the account itself.
geolocationobjectnullableGeolocation details for the address.
null in this endpoint.created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
ship_to_addressobjectExpandablenullableShipping address.
idstringAddress ID.
objectstringenumValues:addressResource type identifier.
namestringDisplay name of the address.
phonestringnullablePhone number associated with the address.
emailstringnullableEmail address associated with the address.
typestringenumValues:standarddrop_shipAddress type.
standard: a normal shipping or billing address.drop_ship: an address an order is shipped to directly, typically a third party or end customer rather than the account itself.
geolocationobjectnullableGeolocation details for the address.
null in this endpoint.created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
freightobjectExpandablenullableCarrier selection and freight billing for this order.
objectstringenumValues:freightResource type identifier.
policystringnullableenumValues:free_freightbilled_freightFreight policy (who arranges and pays for freight).
Populated where a policy applies, such as customer defaults; null otherwise.
free_freight: no shipping cost to the buyer.billed_freight: freight is billed to the buyer.
carrierobjectnullableCarrier.
null in this endpoint.service_levelobjectnullableService level.
null in this endpoint.billing_typestringnullableenumValues:senderthird_partyWhich party the carrier bills for the shipment.
sender: the shipper (your account) is billed.third_party: a third party is billed viabilling_account_number.
billing_account_numberstringnullableCarrier account number to bill, used when billing_type is third_party.
payment_termobjectExpandablenullablePayment term.
idstringPayment term ID.
objectstringenumValues:payment_termResource type identifier.
namestringDisplay name (e.g. Net 30).
statusstringenumValues:activeinactiveLifecycle status of the payment term.
ownerobjectnullableOwner of this resource, indicating whether it is an Augno-provided system default or was created by your account.
null in this endpoint.created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last-updated timestamp.
shipping_termobjectExpandablenullableShipping term.
idstringShipping term ID.
objectstringenumValues:shipping_termResource type identifier.
namestringHuman-readable name for the shipping term, used to identify it when assigning shipping terms to customers and orders.
typestringenumValues:free_freightflat_rate_freightcarrier_rate_freightFreight pricing model applied by this shipping term.
free_freight: no shipping cost to the buyer.flat_rate_freight: a fixed shipping cost regardless of order details (seeflat_rate).carrier_rate_freight: shipping cost is determined by the carrier's quoted rate.
ownerobjectnullableProvenance of this shipping term.
System-owned shipping terms are platform-provided defaults shared across all accounts and cannot be updated or deleted; account-owned shipping terms are custom to your account.
null in this endpoint.flat_rateobjectnullableFixed shipping charge applied to the order.
Applied only when type is flat_rate_freight; ignored for other freight pricing models.
null in this endpoint.minimum_order_valueobjectnullableOrder subtotal a buyer must reach before this term's free-shipping rules apply.
null in this endpoint.free_shipping_service_levelsobjectnullableService levels that ship for free under this term (typically once minimum_order_value is met).
null in this endpoint.created_atstring (date-time)When this shipping term was created.
updated_atstring (date-time)When this shipping term was last updated.
order_discountobjectExpandablenullableOrder discount.
idstringOrder discount ID.
objectstringenumValues:order_discountResource type identifier.
namestringDisplay name.
codestringThe code entered to apply this discount to an order.
Must be unique within the account.
percentagestring (decimal)Percent off as a decimal string (e.g. 10 for 10%).
Applies when discount_type is percentage; otherwise 0.
amountstring (decimal)Fixed amount off as a decimal string.
Applies when discount_type is amount; otherwise 0.
discount_typestringenumValues:percentageamountHow the discount is calculated, determining whether percentage or amount is used.
percentage: the discount is a percent off, taken frompercentage.amount: the discount is a fixed amount off, taken fromamount.
order_countintegerNumber of orders currently using this discount.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
linesobjectExpandablenullableOrder lines.
objectstringenumValues:listResource type identifier.
page_infoobjectPagination metadata.
next_page_urlstringnullableRelative URL that fetches the next page of results.
null when the last page has been reached.
previous_page_urlstringnullableRelative URL that fetches the previous page of results.
null while on the first page.
has_next_pagebooleanWhether more results exist after this page.
has_prev_pagebooleanWhether results exist before this page.
dataarray of objectResources in this page.
idstringSales order line ID.
objectstringenumValues:sales_order_lineResource type identifier.
line_item_numberintegerPosition of the line on the order.
Assigned automatically in sequence, starting at 1.
product_skustringProduct SKU.
product_descriptionstringnullableProduct description.
productobjectnullableAssociated product.
null in this endpoint.quantity_orderedobjectnullableQuantity ordered.
null in this endpoint.unit_priceobjectnullablePrice charged per unit.
null in this endpoint.unit_costobjectnullableInternal cost per unit, used to derive line profitability rather than what the customer is charged.
null in this endpoint.totalsobjectnullableDerived monetary totals for this line.
null in this endpoint.created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
line_countintegerNumber of order lines on this order, returned even when the lines list itself is not expanded.
totalsobjectExpandablenullableDerived monetary totals.
objectstringenumValues:sales_order_totalsResource type identifier.
orderedstring (decimal)Total ordered amount as a decimal string (unit price x quantity ordered).
packedstring (decimal)Total packed amount as a decimal string (unit price x quantity packed).
invoicedstring (decimal)Total invoiced amount as a decimal string (unit price x quantity invoiced).
relatedobjectnullableRecords related to this order (pick, production run, shipments).
objectstringenumValues:sales_order_relatedResource type identifier.
pickobjectExpandablenullableAssociated pick, as a lightweight record reference.
idstringRecord ID.
objectstringenumValues:recordResource type identifier.
typestringenumValues:sales_orderpurchase_orderreceiving_orderThe kind of business record referenced.
Determines how to resolve the record and which status and metadata keys may appear.
sales_order: a customer order.purchase_order: an order placed with a supplier.receiving_order: an inbound order being received into inventory.pick: a warehouse pick task.shipment: an outbound shipment.delivery: a delivery of one or more shipments to a destination.production_run: a manufacturing production run.invoice: a customer invoice.transaction: a payment or financial transaction.settlement: a settlement reconciling transactions against invoices.
numberstringnullableHuman-readable record number, when the record has one.
statusstringnullableType-specific status code, when applicable.
metadataobjectType-specific metadata.
The set of keys varies by record type.
production_runobjectExpandablenullableAssociated production run, as a lightweight record reference.
idstringRecord ID.
objectstringenumValues:recordResource type identifier.
typestringenumValues:sales_orderpurchase_orderreceiving_orderThe kind of business record referenced.
Determines how to resolve the record and which status and metadata keys may appear.
sales_order: a customer order.purchase_order: an order placed with a supplier.receiving_order: an inbound order being received into inventory.pick: a warehouse pick task.shipment: an outbound shipment.delivery: a delivery of one or more shipments to a destination.production_run: a manufacturing production run.invoice: a customer invoice.transaction: a payment or financial transaction.settlement: a settlement reconciling transactions against invoices.
numberstringnullableHuman-readable record number, when the record has one.
statusstringnullableType-specific status code, when applicable.
metadataobjectType-specific metadata.
The set of keys varies by record type.
shipmentsobjectExpandablenullableAssociated shipments, as lightweight record references.
objectstringenumValues:listResource type identifier.
page_infoobjectPagination metadata.
next_page_urlstringnullableRelative URL that fetches the next page of results.
null when the last page has been reached.
previous_page_urlstringnullableRelative URL that fetches the previous page of results.
null while on the first page.
has_next_pagebooleanWhether more results exist after this page.
has_prev_pagebooleanWhether results exist before this page.
dataarray of objectResources in this page.
idstringRecord ID.
objectstringenumValues:recordResource type identifier.
typestringenumValues:sales_orderpurchase_orderreceiving_orderThe kind of business record referenced.
Determines how to resolve the record and which status and metadata keys may appear.
sales_order: a customer order.purchase_order: an order placed with a supplier.receiving_order: an inbound order being received into inventory.pick: a warehouse pick task.shipment: an outbound shipment.delivery: a delivery of one or more shipments to a destination.production_run: a manufacturing production run.invoice: a customer invoice.transaction: a payment or financial transaction.settlement: a settlement reconciling transactions against invoices.
numberstringnullableHuman-readable record number, when the record has one.
statusstringnullableType-specific status code, when applicable.
metadataobjectType-specific metadata.
The set of keys varies by record type.
contactsobjectExpandablenullableEmail recipients grouped by notification purpose.
objectstringenumValues:order_contactResource type identifier.
invoicearray of stringEmail addresses that receive invoices for this order.
acknowledgementarray of stringEmail addresses that receive order acknowledgements for this order.
issued_atstring (date-time)nullableWhen the order was issued (moved out of estimate).
completed_atstring (date-time)nullableWhen the order was fulfilled and closed.
first_ship_atstring (date-time)nullableWhen the first shipment against this order went out.
expired_atstring (date-time)nullableWhen this estimate expires, if an expiration was set.
promised_atstring (date-time)nullableDate promised to the customer for delivery, if one was committed.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
Responses
Successful response for Create Sales Order