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.
repairs:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Fields:
direction(string, required) —customer_to_brand,brand_to_customer,brand_to_vendororvendor_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,customerorsupplierfor the freight cost.status(string, optional) —draft,label_created,in_transitordelivered.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
- 200
- 299
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
OK With Warning
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.