Skip to main content

Create Repair Shipment

POST 

/api/repairs/:repair/shipments

Creates a shipment: a draft to buy a label for later, or a label bought elsewhere (manual entry). With a tracking_number it starts at label_created and fills the matching draft the resolution opened for the same units instead of creating a second one. A cost above zero is added to the repair as an inbound or outbound freight cost. Setting in_transit or delivered applies the custody effects (see Update Repair Shipment Status); shipping units back to the customer requires them to be resolved first. Tracking numbers are registered for tracking updates when a tracking integration is connected.

Required scope: repairs:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Fields:

  • direction (string, required) — customer_to_brand, brand_to_customer, brand_to_vendor or vendor_to_brand.
  • line_ids (integer[], optional) — the repair units in the parcel; defaults to every unit on the repair. Every ID must belong to the repair.
  • carrier (string, optional, max 60), service (string, optional, max 80), tracking_number (string, optional, max 100).
  • cost (number, optional, ≥ 0) — what the label cost.
  • bill_to (string, optional) — warranty, goodwill, customer or supplier for the freight cost.
  • status (string, optional) — draft, label_created, in_transit or delivered.
  • vendor_dispatch_id (integer, optional) — the vendor dispatch this shipment belongs to.
  • package (object, optional) — weight (number > 0), weight_unit (lb, oz, kg, g), length, width, height (numbers > 0), dimension_unit (in, cm). Without a weight the tenant's default package is used (a small padded mailer unless configured), and missing dimensions are filled from it.

When the repair's warehouse is a 3PL and the shipment goes to the customer, the response carries a top-level warnings list and HTTP status 299 (OK With Warning).

Authentication: Bearer token with the repairs:write scope.

Request​

Responses​

OK

Response Headers
    Content-Type