# Create a shipment When a you ship items for an order, create that shipment in Onward. Endpoint: POST /shipments 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_shipment_id` (string, required) Your ID for the Shipment Example: "3712" - `shop_order_id` (string, required) Your ID for the Order this Shipment relates to Example: "18282" - `tracking_number` (string, required) Courier tracking number Example: "780371515850" - `tracking_url` (string) URL to courier tracking page Example: "https://www.fedex.com/wtrk/track/?trknbr=780371515850" - `tracking_company` (string, required) Courier name Example: "DHL Express" - `line_items` (array, required) The order line items included in this shipment - `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"} - `created_at` (string, required) When the shipment was created in your e-comm platform Example: "2024-11-26T17:32:28Z" ## Response 201 fields (application/json): - `shop_shipment_id` (string, required) Your ID for the Shipment Example: "3712" - `shop_order_id` (string, required) Your ID for the Order this Shipment relates to Example: "18282" - `tracking_number` (string, required) Courier tracking number Example: "780371515850" - `tracking_url` (string) URL to courier tracking page Example: "https://www.fedex.com/wtrk/track/?trknbr=780371515850" - `tracking_company` (string, required) Courier name Example: "DHL Express" - `line_items` (array, required) The order line items included in this shipment - `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"} - `created_at` (string, required) When the shipment was created in your e-comm platform Example: "2024-11-26T17:32:28Z" ## 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