Skip to main content

SalesOrder

A customer order for finished products.

orderNumberstring

Human-readable sales order number displayed in Keychain OS.

Example: SO-2025-0189
customerIdstring

Reference to the customer who placed this order.

customerNamestring

Display name of the customer.

Example: Sunrise Craft Beverages
orderDatestring<date>

Date the sales order was placed (ISO 8601).

Example: 2025-02-18
expectedDeliveryDatestring<date>

Agreed delivery date for the order (ISO 8601).

Example: 2025-03-15
statusstring

Current status of the sales order:

  • draft — created but not yet confirmed with the customer.
  • confirmed — customer has confirmed the order.
  • scheduled — production has been planned or is in progress.
  • completed — order fulfilled and shipped.
  • cancelled — order was cancelled.

Possible values: [draft, confirmed, scheduled, completed, cancelled]

Example: confirmed
subtotalnumber

Sum of all line item totals before discounts, tax, and shipping.

Example: 6250
discountAmountnumber

Total discount applied to the order. A value of 0 means no discount.

Example: 0
taxAmountnumber

Total tax applied to the order.

Example: 500
shippingChargesnumber

Shipping charges for the order.

Example: 275
totalAmountnumber

Final amount due (subtotal - discount + tax + shipping).

Example: 7025
paymentTermsstring

Payment terms for this order (e.g., "Net 30"). Defaults from the customer record unless overridden.

Example: Net 30
referenceNumberstring

An external reference number (e.g., the customer's own PO number).

notesstring

Free-text notes attached to the order.

lineItems object[]

The products ordered, with SKU references, quantities, and pricing.

  • Array [
  • skuIdstring

    Reference to the SKU being ordered.

    Example: 1042
    skuNamestring

    Display name of the SKU.

    Example: Roasted Garlic Hummus
    quantitynumber

    Quantity ordered.

    Example: 500
    unitstring

    Unit of measure.

    Example: lbs
    unitPricenumber

    Price per unit charged to the customer.

    Example: 12.5
    subtotalnumber

    Line total (quantity x unit price).

    Example: 6250
  • ]
  • SalesOrder
    {
    "orderNumber": "SO-2025-0189",
    "customerId": "string",
    "customerName": "Sunrise Craft Beverages",
    "orderDate": "2025-02-18",
    "expectedDeliveryDate": "2025-03-15",
    "status": "confirmed",
    "subtotal": 6250,
    "discountAmount": 0,
    "taxAmount": 500,
    "shippingCharges": 275,
    "totalAmount": 7025,
    "paymentTerms": "Net 30",
    "referenceNumber": "string",
    "notes": "string",
    "lineItems": [
    {
    "skuId": "1042",
    "skuName": "Roasted Garlic Hummus",
    "quantity": 500,
    "unit": "lbs",
    "unitPrice": 12.5,
    "subtotal": 6250
    }
    ]
    }