Shipments

Create shipment

Create a new shipment with a tracking code for a specific payment within a company.

Required permissions:

  • shipment:create
  • payment:basic:read
post/shipments

Request body

company_idstring required

The unique identifier of the company to create the shipment for, starting with 'biz_'.

payment_idstring required

The unique identifier of the payment to associate the shipment with.

tracking_codestring required

The carrier tracking code for the shipment, such as a USPS, UPS, or FedEx tracking number.

Example request

{
  "company_id": "biz_xxxxxxxxxxxxxx",
  "payment_id": "pay_xxxxxxxxxxxxxx"
}

Response

A successful response

created_atstring date-time required

The datetime the shipment was created.

delivery_estimatestring date-time nullable required

The estimated delivery date for this shipment. Null if the carrier has not provided an estimate.

idstring required

The unique identifier for the shipment.

servicestring nullable required

The shipping service level used for this shipment. Null if the carrier does not specify a service tier.

status'unknown' | 'pre_transit' | 'in_transit' | 'out_for_delivery' | 'delivered' | 'available_for_pickup' | 'return_to_sender' | 'failure' | 'cancelled' | 'error' required

The status of a shipment

substatus'address_correction' | 'arrived_at_destination' | 'arrived_at_facility' | 'arrived_at_pickup_location' | 'awaiting_information' | 'substatus_cancelled' | 'damaged' | 'delayed' | 'delivery_exception' | 'departed_facility' | 'departed_origin_facility' | 'expired' | 'substatus_failure' | 'held' | 'substatus_in_transit' | 'label_created' | 'lost' | 'missorted' | 'substatus_out_for_delivery' | 'received_at_destination_facility' | 'received_at_origin_facility' | 'refused' | 'return' | 'status_update' | 'transferred_to_destination_carrier' | 'transit_exception' | 'substatus_unknown' | 'weather_delay' required

The substatus of a shipment

tracking_codestring required

The carrier-assigned tracking number used to look up shipment progress.

updated_atstring date-time required

The datetime the shipment was last updated.

Example response

{
  "created_at": "2023-12-01T05:00:00.401Z",
  "delivery_estimate": "2023-12-01T05:00:00.401Z",
  "id": "ship_xxxxxxxxxxxxx",
  "payment": {
    "id": "pay_xxxxxxxxxxxxxx"
  },
  "service": "Priority",
  "tracking_code": "9400111899223456789012",
  "updated_at": "2023-12-01T05:00:00.401Z"
}

Changes