Create Sales Order

Beta
POST/v1/sales/sales-orders

Idempotent 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_address

Sub-objects to expand in the response. When omitted, sub-objects are returned as null.

buyer_account_idstring

ID of the customer account the order is for.

customer_purchase_order_numberoptional string

The customer's own purchase order number, for cross-referencing.

Must be unique among your orders for this customer.

noteoptional string

Order note.

carrier_idoptional string

Carrier ID.

service_level_idoptional string

Service level ID.

carrier_billing_typeoptional stringenumValues:senderthird_party

Who 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 string

Carrier billing account number.

priority_codestring

Fulfillment priority used to rank the order on the shop floor.

sales_rep_idoptional string

Sales 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 string

Shipping term ID.

payment_term_idoptional string

Payment term ID.

order_discount_idoptional string

Order discount ID.

When supplied, a discount line is added to the order automatically.

promised_atoptional string (date-time)

Promised delivery date.

bill_to_address_idstring

Bill-to address ID. Must reference an existing address on the order's owner or buyer account.

ship_to_address_idstring

Ship-to address ID. Must reference an existing address on the order's owner or buyer account.

linesarray of object

Order lines to create.

product_idstring

ID of the product being ordered.

quantityobject

Quantity ordered.

valuestring (decimal)

Decimal value, as a string to preserve precision.

unit_idstring

ID of the unit of measure for the value.

product_skuoptional string

SKU recorded on the line. Defaults to the product's SKU when omitted.

product_descriptionoptional string

Description recorded on the line. Defaults to the product's description when omitted.

unit_priceoptional object

Unit 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_idstring

ID of the unit for the rate's numerator (e.g. the currency of a price).

denominator_unit_idstring

ID of the unit for the rate's denominator (the per-unit basis).

edi_line_item_idoptional string

EDI line item ID.

acknowledgement_email_contactsoptional array of object

Account users who should receive order acknowledgement emails.

account_user_idstring

Account user ID to receive the notification.

invoice_email_contactsoptional array of object

Account users who should receive invoice emails.

account_user_idstring

Account user ID to receive the notification.

idstring

Sales order ID.

objectstringenumValues:sales_order

Resource type identifier.

numberstring

Human-readable order number, e.g. SO-001.

Assigned automatically when the order is created; unique within your account.

customer_purchase_order_numberstringnullable

The customer's own purchase order number, for cross-referencing.

Unique among this customer's orders.

notestringnullable

Order note.

statusstringenumValues:estimateissuedfulfilled

Order 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:lownormalhigh

Fulfillment priority, used to rank orders on the shop floor.

payment_statusstringenumValues:unpaidpartially_paidpaid

Payment state of the order.

Payment tracking is not yet wired up, so this currently always reports unpaid.

acknowledgment_statusstringenumValues:not_sentsent

Whether an order acknowledgment has been sent to the customer.

customerobjectExpandablenullable

Associated customer.

idstring

Customer ID.

objectstringenumValues:customer

Resource type identifier.

namestring

The customer's business name, as shown throughout the app and on documents.

numberstring

Human-readable customer number used to identify the account, distinct from the id.

statusstringenumValues:normalpreferredhold_shipment

Account 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:enableddisabled

Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.

relationship_typestringenumValues:standaloneparentchild

The customer's position in the account hierarchy.

  • standalone: no parent or child accounts.
  • parent: has one or more child accounts (see child_accounts).
  • child: belongs to a parent account (see parent_account).
commission_policystringenumValues:commission_appliedcommission_exempt

How 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.
notestringnullable

Free-form note about the customer.

credit_limitobjectnullable

Maximum credit extended to this customer.

Always returned as null in this endpoint.
contact_infoobjectnullable

Contact information.

Always returned as null in this endpoint.
freight_preferencesobjectnullable

Freight and carrier preferences applied to this customer's shipments.

Always returned as null in this endpoint.
defaultsobjectnullable

Default settings applied to new orders for this customer.

Always returned as null in this endpoint.
notification_preferencesobjectnullable

Notification preferences.

Always returned as null in this endpoint.
bill_to_addressobjectExpandablenullable

Default billing address.

Always returned as null in this endpoint.
ship_to_addressobjectExpandablenullable

Default shipping address.

Always returned as null in this endpoint.
typeobjectnullable

The account group of type type_group that categorizes this customer (for example "Distributors").

Always returned as null in this endpoint.
price_groupsobjectnullable

Account groups of type pricing_group that this customer belongs to, used to apply pricing rules.

Always returned as null in this endpoint.
parent_accountobjectnullable

Parent account.

Present if this is a child account.

Always returned as null in this endpoint.
child_accountsobjectnullable

Child accounts.

Present if this is a parent account.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

sales_repobjectExpandablenullable

Sales representative.

idstring

Actor ID.

objectstringenumValues:actor

Resource type identifier.

typestringenumValues:userapi_keyagent

Actor 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.
namestringnullable

The actor's display name.

handlestringnullable

Human-readable handle identifying the actor.

  • For user actors: the user's email address.
  • For api_key actors: the redacted key value.

Agent actors carry no handle.

roleobjectnullable

Assigned role.

Always returned as null in this endpoint.
created_byobjectnullable

Who created this order, and their relation (internal/customer/system).

bill_to_addressobjectExpandablenullable

Billing address.

idstring

Address ID.

objectstringenumValues:address

Resource type identifier.

namestring

Display name of the address.

phonestringnullable

Phone number associated with the address.

emailstringnullable

Email address associated with the address.

typestringenumValues:standarddrop_ship

Address 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.
geolocationobjectnullable

Geolocation details for the address.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

ship_to_addressobjectExpandablenullable

Shipping address.

idstring

Address ID.

objectstringenumValues:address

Resource type identifier.

namestring

Display name of the address.

phonestringnullable

Phone number associated with the address.

emailstringnullable

Email address associated with the address.

typestringenumValues:standarddrop_ship

Address 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.
geolocationobjectnullable

Geolocation details for the address.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

freightobjectExpandablenullable

Carrier selection and freight billing for this order.

objectstringenumValues:freight

Resource type identifier.

policystringnullableenumValues:free_freightbilled_freight

Freight 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.
carrierobjectnullable

Carrier.

Always returned as null in this endpoint.
service_levelobjectnullable

Service level.

Always returned as null in this endpoint.
billing_typestringnullableenumValues:senderthird_party

Which party the carrier bills for the shipment.

  • sender: the shipper (your account) is billed.
  • third_party: a third party is billed via billing_account_number.
billing_account_numberstringnullable

Carrier account number to bill, used when billing_type is third_party.

payment_termobjectExpandablenullable

Payment term.

idstring

Payment term ID.

objectstringenumValues:payment_term

Resource type identifier.

namestring

Display name (e.g. Net 30).

statusstringenumValues:activeinactive

Lifecycle status of the payment term.

ownerobjectnullable

Owner of this resource, indicating whether it is an Augno-provided system default or was created by your account.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last-updated timestamp.

shipping_termobjectExpandablenullable

Shipping term.

idstring

Shipping term ID.

objectstringenumValues:shipping_term

Resource type identifier.

namestring

Human-readable name for the shipping term, used to identify it when assigning shipping terms to customers and orders.

typestringenumValues:free_freightflat_rate_freightcarrier_rate_freight

Freight 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 (see flat_rate).
  • carrier_rate_freight: shipping cost is determined by the carrier's quoted rate.
ownerobjectnullable

Provenance 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.

Always returned as null in this endpoint.
flat_rateobjectnullable

Fixed shipping charge applied to the order.

Applied only when type is flat_rate_freight; ignored for other freight pricing models.

Always returned as null in this endpoint.
minimum_order_valueobjectnullable

Order subtotal a buyer must reach before this term's free-shipping rules apply.

Always returned as null in this endpoint.
free_shipping_service_levelsobjectnullable

Service levels that ship for free under this term (typically once minimum_order_value is met).

Always returned as 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_discountobjectExpandablenullable

Order discount.

idstring

Order discount ID.

objectstringenumValues:order_discount

Resource type identifier.

namestring

Display name.

codestring

The 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:percentageamount

How the discount is calculated, determining whether percentage or amount is used.

  • percentage: the discount is a percent off, taken from percentage.
  • amount: the discount is a fixed amount off, taken from amount.
order_countinteger

Number of orders currently using this discount.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

linesobjectExpandablenullable

Order lines.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

null when the last page has been reached.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

null while on the first page.

has_next_pageboolean

Whether more results exist after this page.

has_prev_pageboolean

Whether results exist before this page.

dataarray of object

Resources in this page.

idstring

Sales order line ID.

objectstringenumValues:sales_order_line

Resource type identifier.

line_item_numberinteger

Position of the line on the order.

Assigned automatically in sequence, starting at 1.

product_skustring

Product SKU.

product_descriptionstringnullable

Product description.

productobjectnullable

Associated product.

Always returned as null in this endpoint.
quantity_orderedobjectnullable

Quantity ordered.

Always returned as null in this endpoint.
unit_priceobjectnullable

Price charged per unit.

Always returned as null in this endpoint.
unit_costobjectnullable

Internal cost per unit, used to derive line profitability rather than what the customer is charged.

Always returned as null in this endpoint.
totalsobjectnullable

Derived monetary totals for this line.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

line_countinteger

Number of order lines on this order, returned even when the lines list itself is not expanded.

totalsobjectExpandablenullable

Derived monetary totals.

objectstringenumValues:sales_order_totals

Resource 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).

relatedobjectnullable

Records related to this order (pick, production run, shipments).

objectstringenumValues:sales_order_related

Resource type identifier.

pickobjectExpandablenullable

Associated pick, as a lightweight record reference.

idstring

Record ID.

objectstringenumValues:record

Resource type identifier.

typestringenumValues:sales_orderpurchase_orderreceiving_order

The 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.
numberstringnullable

Human-readable record number, when the record has one.

statusstringnullable

Type-specific status code, when applicable.

metadataobject

Type-specific metadata.

The set of keys varies by record type.

production_runobjectExpandablenullable

Associated production run, as a lightweight record reference.

idstring

Record ID.

objectstringenumValues:record

Resource type identifier.

typestringenumValues:sales_orderpurchase_orderreceiving_order

The 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.
numberstringnullable

Human-readable record number, when the record has one.

statusstringnullable

Type-specific status code, when applicable.

metadataobject

Type-specific metadata.

The set of keys varies by record type.

shipmentsobjectExpandablenullable

Associated shipments, as lightweight record references.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

null when the last page has been reached.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

null while on the first page.

has_next_pageboolean

Whether more results exist after this page.

has_prev_pageboolean

Whether results exist before this page.

dataarray of object

Resources in this page.

idstring

Record ID.

objectstringenumValues:record

Resource type identifier.

typestringenumValues:sales_orderpurchase_orderreceiving_order

The 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.
numberstringnullable

Human-readable record number, when the record has one.

statusstringnullable

Type-specific status code, when applicable.

metadataobject

Type-specific metadata.

The set of keys varies by record type.

contactsobjectExpandablenullable

Email recipients grouped by notification purpose.

objectstringenumValues:order_contact

Resource type identifier.

invoicearray of string

Email addresses that receive invoices for this order.

acknowledgementarray of string

Email addresses that receive order acknowledgements for this order.

issued_atstring (date-time)nullable

When the order was issued (moved out of estimate).

completed_atstring (date-time)nullable

When the order was fulfilled and closed.

first_ship_atstring (date-time)nullable

When the first shipment against this order went out.

expired_atstring (date-time)nullable

When this estimate expires, if an expiration was set.

promised_atstring (date-time)nullable

Date promised to the customer for delivery, if one was committed.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

Responses

201

Successful response for Create Sales Order