Skip to content

List the lines of a shipment

Open .md

GET/v2/api/store/{team_slug}/v2/shipment/{unique_key}/item

v2Operation ID v2_public_shipment_item_index

Returns every line of a shipment: shipped order lines and shipping cost lines. Not paged; sort by position.

product.type What it is
order_item Ships a quantity of a line of the same order (any kind of product line, or a fee).
shipment_cost A shipping cost line (Shipping Cost in the web app), with its own price, optionally tied to a package or an estimate.

Permission

Any member of the team.

Path parameters

  • team_slugstringrequired

    Your team slug, shown as Team ID next to your API key in Profile.

    • Example your-team
  • unique_keystringrequired

    The shipment's id (a hash id), as its answers show it. Its unique key (shp_...) also works, but API answers don't include it.

    • Example MQyJUnd3oty75h

Request body

This operation takes no request body.

Response

200Successful response.

  • dataarray of objectsrequired
    Fields of each item (16)
    • _metaobject

      Read-only details of the line.

    • billable_fee_totaldecimal pair

      Shipping cost lines only: what is billed (after override, markup or margin); pricing.product_cost.total is the cost. A decimal pair: the amount is value ÷ 10^dp ({ "value": 1250, "dp": 2 } is 12.50). Read dp every time: it can differ between fields and records.

    • external_idsarray of objects

      Links to external systems; usually empty.

    • external_typestring | null
    • idstring

      The shipment line.

    • Returned but not checked on shipment lines.

    • positioninteger
    • pricingobject

      For system, _meta.unit_price is the order line's unit price and _meta.subtotal is that price × this shipment line's quantity (_meta.total is always 0); for shipment_cost, product_cost has override (always true for lines saved through the API), total (the cost), pricing_mode and pricing_mode_total (decimal pairs at 6 decimal places).

      Child fields (1)
      • typestring
        • One of: "system", "shipment_cost"
    • productobject
      Child fields (3)
      • _metaobject

        Read-only details; for order_item, parent describes the order line.

      • For order_item, id is the order line; for shipment_cost, name, description, shipment_package_id, shipment_estimate_id.

      • typestring
        • One of: "order_item", "shipment_cost"
    • quantityobject
      Child fields (2)
      • typestring
        • Always "unit"
      • totaldecimal pair

        The quantity. A decimal pair: the amount is value ÷ 10^dp ({ "value": 1250, "dp": 2 } is 12.50). Read dp every time: it can differ between fields and records.

    • The shipment.

    • typestring

      Same as product.type.

    • weightobject

      The order line's weight (_meta.total, _meta.unit).

  • statusintegerrequired
  • successbooleanrequired

Errors

  • 401The API key is missing or wrong (unauthenticated).

  • 403You are not allowed to do this. api_access_not_in_plan: your team's plan doesn't include API access (Pro and above, with an active subscription or trial), so every request answers this until the team upgrades. When your role lacks the permission the operation needs, the body is only {"message": "Insufficient Permission"}. Other refusals use the error envelope, with unauthorized or user_is_not_authorized.

  • 404Not found. page_not_found: the team slug is unknown, you are not a member of the team, or an id in the path is not one of this team's. code: null, with a message that starts "No query results for": there is no record with that id.

    When
    The shipment isn't your team's.
    Fix
    Check the id.