Skip to Content

Shipment

The shipment object represents a shipment for an order, including addresses, carrier, packages, and tracking information.

Usage Example

{%- comment -%} Show shipment details and tracking {%- endcomment -%} <h2>Shipment: {{ shipment.title }}</h2> <p>Carrier: {{ shipment.carrier }} ({{ shipment.carrier_product }})</p> <p>Created at: {{ shipment.created_at | date: '%Y-%m-%d' }}</p> <p>Tracking: {% if shipment.tracking_url %}<a href="{{ shipment.tracking_url }}">{{ shipment.tracking_code }}</a>{% else %}N/A{% endif %}</p> <ul> {% for package in shipment.packages %} <li>{{ package.description }} ({{ package.weight }}g, {{ package.length }}x{{ package.width }}x{{ package.height }} cm)</li> {% endfor %} </ul>

Properties

title

Title for this shipment, usually carrier name and product name combined.

carrier

Carrier name

carrier_product

Carrier product name

description

Description for this shipment if any

address

Shipping address

pickup_address

Pickup address address if any.

packages

Returns information about shipment packages, following properties are available for the package:

  • description
  • width (in cm)
  • height (in cm)
  • length (in cm)
  • weight (in grams)
  • items
    • shipped_quantity
    • line_item
    • width
    • height
    • length
    • weight
  • tracking_url (if defined)
  • tracking_code (if defined)

tracking_url

Tracking url for this shipment. If this is multiparcel shipment, the first available package tracking url is returned.

tracking_code

Tracking code for this shipment. If this is multiparcel shipment, the first available package tracking code is returned.

created_at

Date when this shipment was created