Skip to content

katana_public_api_client.models.create_sales_order_request

katana_public_api_client.models.create_sales_order_request

Classes

CreateSalesOrderRequest

Request payload for creating a new sales order with customer information, order lines, and delivery details

Example

{'order_no': 'SO-2024-002', 'customer_id': 1501, 'sales_order_rows': [{'quantity': 3, 'variant_id': 2101, 'tax_rate_id': 301, 'location_id': 1, 'price_per_unit': 599.99, 'total_discount': 50.0, 'attributes': [{'key': 'engrave_text', 'value': 'Professional Kitchen'}, {'key': 'rush_order', 'value': 'true'}]}], 'tracking_number': None, 'tracking_number_url': None, 'addresses': [{'entity_type': 'billing', 'first_name': 'David', 'last_name': 'Wilson', 'company': "Wilson's Catering", 'line_1': '456 Commerce Ave', 'city': 'Seattle', 'state': 'WA', 'zip': '98101', 'country': 'US'}, {'entity_type': 'shipping', 'first_name': 'David', 'last_name': 'Wilson', 'company': "Wilson's Catering", 'line_1': '789 Industrial Blvd', 'city': 'Seattle', 'state': 'WA', 'zip': '98102', 'country': 'US'}], 'order_created_date': '2024-01-16T09:00:00Z', 'delivery_date': '2024-01-23T15:00:00Z', 'currency': 'USD', 'location_id': 1, 'status': 'PENDING', 'additional_info': 'Customer prefers morning delivery', 'customer_ref': 'WC-ORDER-2024-003', 'ecommerce_order_type': 'wholesale', 'ecommerce_store_name': 'B2B Portal', 'ecommerce_order_id': 'B2B-7891-2024'}

Attributes:

  • customer_id (int) –

    ID of the customer placing the order

  • sales_order_rows (list[CreateSalesOrderRequestSalesOrderRowsItem]) –

    List of products and quantities being ordered

  • order_no (str | Unset) –

    Unique order number for tracking and reference. Optional — Katana auto-generates a sequential SO-N value when omitted.

  • tracking_number (None | str | Unset) –

    Shipping tracking number if already known

  • tracking_number_url (None | str | Unset) –

    URL for tracking shipment status

  • addresses (list[CreateSalesOrderRequestAddressesItem] | Unset) –

    Billing and shipping addresses for the order. Inline-create shape — sales_order_id is implicit (set by the parent sales-order create) and server-assigned fields (id / sales_order_id) are rejected by the live API on this endpoint. For the standalone create endpoint (POST /sales_order_addresses) see CreateSalesOrderAddressRequest.

  • order_created_date (datetime | None | Unset) –

    Date when the order was originally created (defaults to current time)

  • delivery_date (datetime | None | Unset) –

    Requested delivery date

  • currency (None | str | Unset) –

    Currency code for the order (defaults to company base currency)

  • location_id (int | Unset) –

    Primary fulfillment location for the order

  • status (CreateSalesOrderStatus | Unset) –

    Initial status when creating a sales order

  • additional_info (None | str | Unset) –

    Additional notes or instructions for the order

  • customer_ref (None | str | Unset) –

    Customer's internal reference number

  • ecommerce_order_type (None | str | Unset) –

    Type of ecommerce order if applicable

  • ecommerce_store_name (None | str | Unset) –

    Name of the ecommerce store if order originated from online

  • ecommerce_order_id (None | str | Unset) –

    Original order ID from the ecommerce platform

  • custom_fields (CreateSalesOrderRequestCustomFieldsType0 | None | Unset) –

    Custom field values for the sales order, keyed by the definition id (UUID) — the id returned by GET /custom_field_definitions, not the field label. Each value matches the definition's field_type: string for shortText / url, number for number, boolean for boolean, a YYYY-MM-DD string for date, or the integer choice id for singleSelect. Example (keys are definition UUIDs): {"0c8f1d6e-…": "EMEA", "7a21b4c2-…": 2} — a shortText value and a singleSelect choice id. Keys are tenant-specific, so the schema declares additionalProperties: true rather than enumerating them.