# Create an order When a customer places an order in your e-comm platform, create that order with its details in Onward. Endpoint: POST /orders Version: 1.0.0 Security: api_key ## Header parameters: - `Content-Type` (string, required) Content-Type must be application/json Example: "application/json" - `Accept` (string, required) Accept must be application/json Example: "application/json" ## Request fields (application/json): - `shop_order_id` (string, required) Your ID for the Order Example: "18282" - `shop_order_number` (string, required) The Order Number as presented to the customer Example: "W-94713" - `subtotal_price` (any, required) Order subtotal in shop's currency Example: {"cents":1999,"currency":"USD"} - `subtotal_price_presentment` (any) Order subtotal in customer's currency Example: {"cents":1999,"currency":"USD"} - `total_discounts_price` (any, required) Sum of applied discounts in shop's currency Example: {"cents":599,"currency":"USD"} - `total_discounts_price_presentment` (any) Sum of applied discounts in customer's currency Example: {"cents":599,"currency":"USD"} - `total_shipping_price` (any, required) Shipping amount in shop's currency Example: {"cents":299,"currency":"USD"} - `total_shipping_price_presentment` (any) Shipping amount in customer's currency Example: {"cents":299,"currency":"USD"} - `total_tax_price` (any, required) Total tax in shop's currency Example: {"cents":143,"currency":"USD"} - `total_tax_price_presentment` (any) Total tax in customer's currency Example: {"cents":143,"currency":"USD"} - `total_price` (any, required) Order total in shop's currency Example: {"cents":2499,"currency":"USD"} - `total_price_presentment` (any) Order total in customer's currency Example: {"cents":2499,"currency":"USD"} - `amount_insured` (any) Sum of shippable line items that are being insured in shop's currency Example: {"cents":1200,"currency":"USD"} - `amount_insured_presentment` (any) Sum of shippable line items that are being insured in customer's currency Example: {"cents":1200,"currency":"USD"} - `purchased_quote_token` (string) The quote being purchased, as received from Onward's Quote API Example: "c0740f7e3d4718a64fd9ce18101961d210d1c61c8c8afd62f95d62d8c433347b$$qkJClv/+sWfpOfPqp4sI46PxzBuBCW4eEDKsL4q87aFhRT9mdCpIuEWwuRuvbkX4BS8=--AUnUz8WgunyUiZ4o--nnYz0Lj5WsxSqsUxtBpIIQ==" - `created_at` (string, required) When the order was placed in your e-comm platform Example: "2024-11-26T17:32:28Z" - `financial_status` (string, required) Enum: "pending", "paid", "refunded", "voided" - `customer` (object, required) - `customer.shop_customer_id` (string, required) Your ID for the Customer Example: "7461" - `customer.first_name` (string, required) Example: "Sally" - `customer.last_name` (string, required) Example: "Loo" - `customer.email` (string) Example: "sally@example.com" - `customer.phone_number` (string) Example: "+13105551234" - `shipping_address` (object, required) - `shipping_address.address1` (string, required) Example: "123 Main St" - `shipping_address.address2` (string) Example: "Unit 50" - `shipping_address.province_code` (string, required) Subdivision code (ISO-3166) Example: "CA" - `shipping_address.city` (string, required) Example: "Los Angeles" - `shipping_address.postal_code` (string, required) Example: "90210" - `shipping_address.country_code` (string, required) Alpha-2 country code (ISO-3166) Example: "US" - `line_items` (array, required) - `line_items.shop_line_item_id` (string, required) Your ID for the Line Item Example: "816721" - `line_items.shop_product_id` (string, required) Your ID for the product Example: "142" - `line_items.shop_variant_id` (string, required) Your ID or SKU for the variant Example: "7261" - `line_items.name` (string, required) Name for the product and variant purchased Example: "Cool T-shirt - Red" - `line_items.unit_price` (any, required) Item price in order's currency Example: {"cents":500,"currency":"USD"} - `line_items.total_price` (any, required) Line item total in order's currency Example: {"cents":1000,"currency":"USD"} - `line_items.total_price_presentment` (any) Line item total in customer's currency Example: {"cents":1000,"currency":"USD"} - `line_items.quantity` (integer, required) Example: 2 - `line_items.image_url` (string, required) URL to an image of the item Example: "https://placecats.com/neo/300/200.png" - `line_items.grams` (integer, required) Weight of the item in grams Example: 24 - `line_items.is_insured` (boolean, required) Whether the item should be insured by Onward (generally you should set this to true for shippable items and false for digital items). Requires purchase token and amount insured in the Order. Example: true - `line_items.refunded_quantity` (integer) Number of items refunded (for full or partial refunds) Example: 1 - `line_items.refunded_price` (any) Total refunded amount in order's currency Example: {"cents":500,"currency":"USD"} - `line_items.refunded_price_presentment` (any) Total refunded amount in customer's currency Example: {"cents":500,"currency":"USD"} ## Response 201 fields (application/json): - `shop_order_id` (string, required) Your ID for the Order Example: "18282" - `shop_order_number` (string, required) The Order Number as presented to the customer Example: "W-94713" - `subtotal_price` (any, required) Order subtotal in shop's currency Example: {"cents":1999,"currency":"USD"} - `subtotal_price_presentment` (any) Order subtotal in customer's currency Example: {"cents":1999,"currency":"USD"} - `total_discounts_price` (any, required) Sum of applied discounts in shop's currency Example: {"cents":599,"currency":"USD"} - `total_discounts_price_presentment` (any) Sum of applied discounts in customer's currency Example: {"cents":599,"currency":"USD"} - `total_shipping_price` (any, required) Shipping amount in shop's currency Example: {"cents":299,"currency":"USD"} - `total_shipping_price_presentment` (any) Shipping amount in customer's currency Example: {"cents":299,"currency":"USD"} - `total_tax_price` (any, required) Total tax in shop's currency Example: {"cents":143,"currency":"USD"} - `total_tax_price_presentment` (any) Total tax in customer's currency Example: {"cents":143,"currency":"USD"} - `total_price` (any, required) Order total in shop's currency Example: {"cents":2499,"currency":"USD"} - `total_price_presentment` (any) Order total in customer's currency Example: {"cents":2499,"currency":"USD"} - `insurance_paid` (any) Insurance paid for this order by the customer Example: {"cents":2499,"currency":"USD"} - `amount_insured` (any) Sum of shippable line items that are being insured in shop's currency Example: {"cents":1200,"currency":"USD"} - `amount_insured_presentment` (any) Sum of shippable line items that are being insured in customer's currency Example: {"cents":1200,"currency":"USD"} - `created_at` (string, required) When the order was placed in your e-comm platform Example: "2024-11-26T17:32:28Z" - `financial_status` (string, required) Enum: "pending", "paid", "refunded", "voided" - `customer` (object, required) - `customer.shop_customer_id` (string, required) Your ID for the Customer Example: "7461" - `customer.first_name` (string, required) Example: "Sally" - `customer.last_name` (string, required) Example: "Loo" - `customer.email` (string) Example: "sally@example.com" - `customer.phone_number` (string) Example: "+13105551234" - `shipping_address` (object, required) - `shipping_address.address1` (string, required) Example: "123 Main St" - `shipping_address.address2` (string) Example: "Unit 50" - `shipping_address.province_code` (string, required) Subdivision code (ISO-3166) Example: "CA" - `shipping_address.city` (string, required) Example: "Los Angeles" - `shipping_address.postal_code` (string, required) Example: "90210" - `shipping_address.country_code` (string, required) Alpha-2 country code (ISO-3166) Example: "US" - `line_items` (array, required) - `line_items.shop_line_item_id` (string, required) Your ID for the Line Item Example: "816721" - `line_items.shop_product_id` (string, required) Your ID for the product Example: "142" - `line_items.shop_variant_id` (string, required) Your ID or SKU for the variant Example: "7261" - `line_items.name` (string, required) Name for the product and variant purchased Example: "Cool T-shirt - Red" - `line_items.unit_price` (any, required) Item price in order's currency Example: {"cents":500,"currency":"USD"} - `line_items.total_price` (any, required) Line item total in order's currency Example: {"cents":1000,"currency":"USD"} - `line_items.total_price_presentment` (any) Line item total in customer's currency Example: {"cents":1000,"currency":"USD"} - `line_items.quantity` (integer, required) Example: 2 - `line_items.image_url` (string, required) URL to an image of the item Example: "https://placecats.com/neo/300/200.png" - `line_items.grams` (integer, required) Weight of the item in grams Example: 24 - `line_items.is_insured` (boolean, required) Whether the item should be insured by Onward (generally you should set this to true for shippable items and false for digital items). Requires purchase token and amount insured in the Order. Example: true - `line_items.refunded_quantity` (integer) Number of items refunded (for full or partial refunds) Example: 1 - `line_items.refunded_price` (any) Total refunded amount in order's currency Example: {"cents":500,"currency":"USD"} - `line_items.refunded_price_presentment` (any) Total refunded amount in customer's currency Example: {"cents":500,"currency":"USD"} ## Response 422 fields (application/json): - `error` (array) Array of errors. Each error contains the field in the beginning followed by the issue found. Example: ["Name is required"] ## Response 409 fields