Skip to content

Shipments

Physical shipments of items within an order and their tracking events.

Create a shipment

Request

When a you ship items for an order, create that shipment in Onward.

Security
api_key
Headers
Content-Typestringrequired

Content-Type must be application/json

Example:application/json
Acceptstringrequired

Accept must be application/json

Example:application/json
Bodyapplication/jsonrequired
shop_shipment_idstringrequired

Your unique identifier for the Shipment. Must be unique across your shipments and stable over time — Onward uses it to look up and de-duplicate shipments, so the same value must always refer to the same shipment.

Example:"3712"
shop_order_idstringrequired

Your ID for the Order this Shipment relates to. Must match the shop_order_id of an existing Order.

Example:"18282"
tracking_numberstringrequired

Courier tracking number

Example:"780371515850"
tracking_urlstring

URL to courier tracking page

Example:"https://www.fedex.com/wtrk/track/?trknbr=780371515850"
tracking_companystringrequired

Courier name

Example:"DHL Express"
line_itemsArray of objects(LineItem)required

The order line items included in this shipment

created_atstring, (date-time)required

When the shipment was created in your e-comm platform. Must be a valid ISO 8601 / RFC 3339 timestamp. Send it in UTC with a trailing Z (as in the example); timezone offsets such as -08:00 are also accepted.

Example:"2024-11-26T17:32:28Z"
curl -i -X POST \
  https://app.useonward.com/api/v1/shipments \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "shop_shipment_id": "3712",
    "shop_order_id": "18282",
    "tracking_number": "780371515850",
    "tracking_url": "https://www.fedex.com/wtrk/track/?trknbr=780371515850",
    "tracking_company": "DHL Express",
    "line_items": [
      {
        "shop_line_item_id": "816721",
        "shop_product_id": "142",
        "shop_variant_id": "7261",
        "name": "Cool T-shirt - Red",
        "unit_price": {
          "cents": 1299,
          "currency": "USD"
        },
        "total_price": {
          "cents": 1299,
          "currency": "USD"
        },
        "total_price_presentment": {
          "cents": 1299,
          "currency": "USD"
        },
        "quantity": 2,
        "image_url": "https://placecats.com/neo/300/200.png",
        "grams": 24,
        "is_protected": true,
        "requires_shipping": true,
        "refunded_quantity": 1,
        "refunded_price": {
          "cents": 1299,
          "currency": "USD"
        },
        "refunded_price_presentment": {
          "cents": 1299,
          "currency": "USD"
        }
      }
    ],
    "created_at": "2024-11-26T17:32:28Z"
  }'

Responses

Shipment created successfully

Bodyapplication/json
shop_shipment_idstringrequired

Your unique identifier for the Shipment. Must be unique across your shipments and stable over time — Onward uses it to look up and de-duplicate shipments, so the same value must always refer to the same shipment.

Example:"3712"
shop_order_idstringrequired

Your ID for the Order this Shipment relates to. Must match the shop_order_id of an existing Order.

Example:"18282"
tracking_numberstringrequired

Courier tracking number

Example:"780371515850"
tracking_urlstring

URL to courier tracking page

Example:"https://www.fedex.com/wtrk/track/?trknbr=780371515850"
tracking_companystringrequired

Courier name

Example:"DHL Express"
line_itemsArray of objects(LineItem)required

The order line items included in this shipment

created_atstring, (date-time)required

When the shipment was created in your e-comm platform. Must be a valid ISO 8601 / RFC 3339 timestamp. Send it in UTC with a trailing Z (as in the example); timezone offsets such as -08:00 are also accepted.

Example:"2024-11-26T17:32:28Z"
Response
{ "shop_shipment_id": "3712", "shop_order_id": "18282", "tracking_number": "780371515850", "tracking_url": "https://www.fedex.com/wtrk/track/?trknbr=780371515850", "tracking_company": "DHL Express", "line_items": [ { … } ], "created_at": "2024-11-26T17:32:28Z" }