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

address

Returns the shipping address for this shipment.

carrier

Returns the carrier name.

carrier_product

Returns the carrier product name.

created_at

Returns the date when this shipment was created.

description

Returns the description for this shipment, if any.

packages

Returns information about shipment packages, including:

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

pickup_address

Returns the pickup address if any.

title

Returns the title for this shipment, usually carrier name and product name combined.

tracking_code

Returns the tracking code for this shipment. For multiparcel shipments, the first available package tracking code is returned.

tracking_url

Returns the tracking URL for this shipment. For multiparcel shipments, the first available package tracking URL is returned.

Last updated on