Get shipping rate quotes for an order's shipment; buy the label for a selected rate under Labels. Merge 2 to 25 Draft or Created orders going to the same recipient, from the same source, into one shipment that is bought with one label; the orders stay separate orders. While no label covers a merged shipment, add an order to it, change its address or parcel, or take it apart again. Live carrier tracking is not part of the public API — a shipment's `status` field reflects this and stays `Unknown` after a label purchase.
Operations
POST /api/v1/shipments/merge
Merge orders into one shipment
Puts 2 to 25 Draft or Created orders going to the same recipient, from the same source, into one new shipment that is bought with one label. The orders stay separate orders; each one's shipment becomes the merged shipment. Rates and the label are then requested on the returned shipmentId. Sending the same merge again answers with the same shipment.
Authentication: JWTBearerAuth, Bearer http, JWT
Parameters
| Name | In | Type | Required | Description |
|---|
X-SubAccount-Id | header | string (uuid) | optional | Optional. If present, every order must belong to this sub-account; a shipment never mixes sub-accounts. Example: 3a7d9e21-6b48-4c15-9f2e-7d0c5b83a614 |
|---|
Idempotency-Key | header | string | optional | Optional. Identifies one merge action. Repeating the request with the same value returns the first answer instead of acting again, even if the shipment changed since. The same value with a different request or another merge action is refused with 422 Idempotency.KeyReused. A request that failed stores nothing and may be repeated with the same value. Scoped to the account, and a repeat must carry the same X-SubAccount-Id as the first request. Maximum 200 characters. Constraints: max length 200 Example: order-2026-09-07-0001 |
|---|
Request body (required)
application/json — MergeOrdersRequest
{
"anchorOrderId": "5f2c1a10-2b3d-4e5f-8a9b-0c1d2e3f4a5b",
"orderIds": [
"5f2c1a10-2b3d-4e5f-8a9b-0c1d2e3f4a5b",
"114f6a6a-4b16-410a-9007-5086de668065"
]
}
Responses
| Status | Description | Body |
|---|
200 | The merged shipment and its orders, anchor first | application/json — MergedShipmentEnvelope
|
|---|
400 | The request could not be read as sent — for example an `X-SubAccount-Id` header that is not a GUID. | application/json — ErrorEnvelope
|
|---|
401 | Not authenticated | application/json — ErrorEnvelope
|
|---|
403 | Authenticated, but not with an Open API integration token. Sent without a body. | No response body. |
|---|
404 | An order was not found | application/json — ErrorEnvelope
|
|---|
409 | Order.MergeRefused: metadata lists each refused order with its reason. Shipment.MergeChangedConcurrently: the orders changed meanwhile; send it again | application/json — ErrorEnvelope
|
|---|
415 | The request was sent with a `Content-Type` other than `application/json`. Answered by middleware ahead of authentication, so it is reachable on every write operation. | application/json — ErrorEnvelope
|
|---|
422 | Invalid request: order count, anchor missing, parcel, or Idempotency.KeyReused | application/json — ErrorEnvelope
|
|---|
500 | The request could not be completed because of an unexpected server-side failure. | application/json — ErrorEnvelope
|
|---|
PUT /api/v1/shipments/{shipmentId}
Change a merged shipment's address or parcel
Edits the recipient address (US only) and the parcel that the merged shipment owns, while no label covers it. Send either or both. The orders keep their own addresses and parcels. Quoted rates are dropped.
Authentication: JWTBearerAuth, Bearer http, JWT
Parameters
| Name | In | Type | Required | Description |
|---|
shipmentId | path | string (guid) | required | Example: b91a2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d |
|---|
X-SubAccount-Id | header | string (uuid) | optional | Optional. If present, the shipment must belong to this sub-account. Example: 3a7d9e21-6b48-4c15-9f2e-7d0c5b83a614 |
|---|
Idempotency-Key | header | string | optional | Optional. Identifies one merge action. Repeating the request with the same value returns the first answer instead of acting again, even if the shipment changed since. The same value with a different request or another merge action is refused with 422 Idempotency.KeyReused. A request that failed stores nothing and may be repeated with the same value. Scoped to the account, and a repeat must carry the same X-SubAccount-Id as the first request. Maximum 200 characters. Constraints: max length 200 Example: order-2026-09-07-0001 |
|---|
Request body (required)
Responses
| Status | Description | Body |
|---|
200 | The merged shipment and its orders, anchor first | application/json — MergedShipmentEnvelope
|
|---|
400 | The request could not be read as sent — for example an `X-SubAccount-Id` header that is not a GUID. | application/json — ErrorEnvelope
|
|---|
401 | Not authenticated | application/json — ErrorEnvelope
|
|---|
403 | Authenticated, but not with an Open API integration token. Sent without a body. | No response body. |
|---|
404 | Not a merged shipment of this account (Shipment.NotMerged) | application/json — ErrorEnvelope
|
|---|
409 | Shipment.MergeHasActiveLabel, Shipment.MergePurchaseInProgress or Shipment.MergeChangedConcurrently | application/json — ErrorEnvelope
|
|---|
415 | The request was sent with a `Content-Type` other than `application/json`. Answered by middleware ahead of authentication, so it is reachable on every write operation. | application/json — ErrorEnvelope
|
|---|
422 | Invalid address or parcel, nothing to change, or Idempotency.KeyReused | application/json — ErrorEnvelope
|
|---|
500 | The request could not be completed because of an unexpected server-side failure. | application/json — ErrorEnvelope
|
|---|
POST /api/v1/shipments/{shipmentId}/orders
Add an order to a merged shipment
Puts one more Draft or Created order into a merged shipment that has no label. The order must go to the merged shipment's own recipient address. Its weight is added to the shipment's parcel and quoted rates are dropped. Adding an order already in the shipment answers with the shipment unchanged.
Authentication: JWTBearerAuth, Bearer http, JWT
Parameters
| Name | In | Type | Required | Description |
|---|
shipmentId | path | string (guid) | required | Example: b91a2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d |
|---|
X-SubAccount-Id | header | string (uuid) | optional | Optional. If present, the shipment and the order must belong to this sub-account. Example: 3a7d9e21-6b48-4c15-9f2e-7d0c5b83a614 |
|---|
Idempotency-Key | header | string | optional | Optional. Identifies one merge action. Repeating the request with the same value returns the first answer instead of acting again, even if the shipment changed since. The same value with a different request or another merge action is refused with 422 Idempotency.KeyReused. A request that failed stores nothing and may be repeated with the same value. Scoped to the account, and a repeat must carry the same X-SubAccount-Id as the first request. Maximum 200 characters. Constraints: max length 200 Example: order-2026-09-07-0001 |
|---|
Request body (required)
Responses
| Status | Description | Body |
|---|
200 | The merged shipment and its orders, anchor first | application/json — MergedShipmentEnvelope
|
|---|
400 | The request could not be read as sent — for example an `X-SubAccount-Id` header that is not a GUID. | application/json — ErrorEnvelope
|
|---|
401 | Not authenticated | application/json — ErrorEnvelope
|
|---|
403 | Authenticated, but not with an Open API integration token. Sent without a body. | No response body. |
|---|
404 | The order was not found, or the shipment is not a merged shipment of this account (Shipment.NotMerged) | application/json — ErrorEnvelope
|
|---|
409 | Order.MergeRefused with the reason in metadata, Shipment.MergeHasActiveLabel, Shipment.MergePurchaseInProgress or Shipment.MergeChangedConcurrently | application/json — ErrorEnvelope
|
|---|
415 | The request was sent with a `Content-Type` other than `application/json`. Answered by middleware ahead of authentication, so it is reachable on every write operation. | application/json — ErrorEnvelope
|
|---|
422 | Invalid request, or Idempotency.KeyReused | application/json — ErrorEnvelope
|
|---|
500 | The request could not be completed because of an unexpected server-side failure. | application/json — ErrorEnvelope
|
|---|
POST /api/v1/shipments/{shipmentId}/unmerge
Take a merged shipment apart
Puts every order of the merged shipment back on the shipment it had before, with its own address and parcel. Allowed whatever the orders' status while no label covers the shipment and none is being bought. Taking apart a shipment that was already taken apart answers with an empty list.
Authentication: JWTBearerAuth, Bearer http, JWT
Parameters
| Name | In | Type | Required | Description |
|---|
shipmentId | path | string (guid) | required | Example: b91a2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d |
|---|
X-SubAccount-Id | header | string (uuid) | optional | Optional. If present, the shipment must belong to this sub-account. Example: 3a7d9e21-6b48-4c15-9f2e-7d0c5b83a614 |
|---|
Idempotency-Key | header | string | optional | Optional. Identifies one merge action. Repeating the request with the same value returns the first answer instead of acting again, even if the shipment changed since. The same value with a different request or another merge action is refused with 422 Idempotency.KeyReused. A request that failed stores nothing and may be repeated with the same value. Scoped to the account, and a repeat must carry the same X-SubAccount-Id as the first request. Maximum 200 characters. Constraints: max length 200 Example: order-2026-09-07-0001 |
|---|
Responses
| Status | Description | Body |
|---|
200 | Each order and the shipment it is back on | application/json — UnmergeShipmentResponseEnvelope
|
|---|
400 | The request could not be read as sent — for example an `X-SubAccount-Id` header that is not a GUID. | application/json — ErrorEnvelope
|
|---|
401 | Not authenticated | application/json — ErrorEnvelope
|
|---|
403 | Authenticated, but not with an Open API integration token. Sent without a body. | No response body. |
|---|
404 | Not a merged shipment of this account (Shipment.NotMerged) | application/json — ErrorEnvelope
|
|---|
409 | Shipment.MergeHasActiveLabel, Shipment.MergePurchaseInProgress or Shipment.MergeChangedConcurrently | application/json — ErrorEnvelope
|
|---|
415 | The request was sent with a `Content-Type` other than `application/json`. Answered by middleware ahead of authentication, so it is reachable on every write operation. | application/json — ErrorEnvelope
|
|---|
422 | Invalid request, or Idempotency.KeyReused | application/json — ErrorEnvelope
|
|---|
500 | The request could not be completed because of an unexpected server-side failure. | application/json — ErrorEnvelope
|
|---|
POST /api/v1/shipments/{shipmentId}/rates
Get shipment rates
Gets shipping rate quotes from all available carriers for a shipment using a bearer token. For a merged shipment, rating is refused while another of its orders is cancelled, on hold, fulfilled or returned: the error keeps that refusal's own code and names the order in its metaData (orderId, orderNumber, reason).
Authentication: JWTBearerAuth, Bearer http, JWT
Parameters
| Name | In | Type | Required | Description |
|---|
shipmentId | path | string | required | Example: b91a2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d |
|---|
X-SubAccount-Id | header | string (uuid) | optional | Optional. Evaluates the request against the sub-account's carrier availability, which can narrow the carriers returned to those enabled for that sub-account. Does not change rate pricing, and does not restrict which shipments can be rated — that is enforced by account ownership alone. Example: 3a7d9e21-6b48-4c15-9f2e-7d0c5b83a614 |
|---|
Responses
| Status | Description | Body |
|---|
200 | Rates retrieved successfully | application/json — GetRatesResponseEnvelope
|
|---|
400 | Invalid request | application/json — ErrorEnvelope
|
|---|
401 | Not authenticated | application/json — ErrorEnvelope
|
|---|
403 | Authenticated, but not with an Open API integration token. Sent without a body. | No response body. |
|---|
404 | Shipment not found | application/json — ErrorEnvelope
|
|---|
409 | Shipment.Superseded: a merge replaced this shipment, or the merged shipment was taken apart. Read the order again and rate its current shipment. Also `SubAccount.Inactive` when `X-SubAccount-Id` names an inactive sub-account | application/json — ErrorEnvelope
|
|---|
415 | The request was sent with a `Content-Type` other than `application/json`. Answered by middleware ahead of authentication, so it is reachable on every write operation. | application/json — ErrorEnvelope
|
|---|
422 | The shipment exists but is missing the address or parcel information rating needs | application/json — ErrorEnvelope
|
|---|
500 | The request could not be completed because of an unexpected server-side failure. | application/json — ErrorEnvelope
|
|---|
503 | The carrier is temporarily unavailable. Nothing to correct; retry later | application/json — ErrorEnvelope
|
|---|
Schemas
The public schemas that the operations above reference. Each is listed once; a type name in the tables above links to its fields here.AddOrderToShipmentRequest
| Field | Type | Required | Description |
|---|
orderId | string (guid) | required | Format: guid |
|---|
ApiError
One thing that went wrong.
| Field | Type | Required | Description |
|---|
code | string | required | Machine-readable error identifier, dotted and stable — for example Order.NotFound. Branch
on this rather than on message. |
|---|
message | string | required | Readable explanation of the failure. Wording may change; do not parse it. |
|---|
metaData | object nullable | optional | Extra detail about this particular failure. Its shape depends on code. |
|---|
CarrierRateResult
Public-contract mirror of CarrierRateResponse.
Intentionally omits the nested Provider diagnostics object (raw upstream-carrier HTTP status
and an opaque provider-specific "parameter" string): that is support's material, not the caller's.
ErrorField is carried, because naming which field a carrier objected to is the
difference between a caller highlighting one input and re-presenting the whole form.
| Field | Type | Required | Description |
|---|
carrier | string | required | The carrier that was asked for rates. |
|---|
errorCode | string nullable | required | Machine-readable reason the carrier returned no rates. |
|---|
errorField | string nullable | required | Which part of the request the carrier objected to, from the shared field vocabulary — sender or
recipient, address or phone. Null, not omitted, where the carrier names no field; direct UPS never does. |
|---|
errorMessage | string nullable | required | Readable explanation of why the carrier returned no rates. |
|---|
success | boolean | required | Whether that carrier returned rates. |
|---|
ErrorEnvelope
The envelope every JSON operation answers with: a success flag and either a result or errors.
| Field | Type | Required | Description |
|---|
data | object nullable | required | The operation's result. Absent when the call failed. |
|---|
errors | ApiError[] | required | What went wrong. Absent when the call succeeded. |
|---|
success | boolean | required | Whether the operation succeeded. When false, read errors. |
|---|
GetRatesResponse
The shipping options available for a shipment, and how each carrier answered.
| Field | Type | Required | Description |
|---|
carrierCount | integer (int32) | required | Number of carriers that returned at least one rate. Format: int32 |
|---|
carrierResponses | CarrierRateResult[] | required | One entry per carrier that was asked, including the ones that returned nothing, so a carrier
that declined can be told apart from a carrier that was never contacted. |
|---|
rates | RateQuote[] | required | Every rate available for the shipment, across all carriers that answered. Buy one by sending
its id to the label operation. |
|---|
totalCount | integer (int32) | required | Number of entries in rates. Format: int32 |
|---|
GetRatesResponseEnvelope
The envelope every JSON operation answers with: a success flag and either a result or errors.
| Field | Type | Required | Description |
|---|
data | GetRatesResponse nullable | required | The operation's result. Absent when the call failed. |
|---|
errors | ApiError[] nullable | required | What went wrong. Absent when the call succeeded. |
|---|
success | boolean | required | Whether the operation succeeded. When false, read errors. |
|---|
MergedShipment
A merged shipment and its orders, anchor first.
| Field | Type | Required | Description |
|---|
orderIds | string[] | required | |
|---|
shipmentId | string (guid) | required | Format: guid |
|---|
MergedShipmentEnvelope
The envelope every JSON operation answers with: a success flag and either a result or errors.
| Field | Type | Required | Description |
|---|
data | MergedShipment nullable | required | The operation's result. Absent when the call failed. |
|---|
errors | ApiError[] nullable | required | What went wrong. Absent when the call succeeded. |
|---|
success | boolean | required | Whether the operation succeeded. When false, read errors. |
|---|
MergeOrdersRequest
| Field | Type | Required | Description |
|---|
anchorOrderId | string (guid) | required | The order the merge starts from; its addresses are copied onto the merged shipment. Format: guid |
|---|
orderIds | string[] | required | Every order to merge, the anchor included: from 2 to 25. |
|---|
parcel | OrderParcelRequest nullable | optional | The box. When omitted it has the anchor's size and the orders' weights added together. |
|---|
OrderAddressRequest
A postal address supplied on an order.
| Field | Type | Required | Description |
|---|
carrierFacility | string nullable | optional | Carrier facility this address refers to, when the shipment is dropped at or collected from a
named facility rather than the street address. |
|---|
city | string | required | City or locality. Constraints: min length 1 |
|---|
company | string nullable | optional | Company name at the address. |
|---|
country | string | required | Two-letter ISO 3166-1 alpha-2 country code, for example US. Constraints: min length 1 |
|---|
email | string nullable | optional | Contact email address. |
|---|
federalTaxId | string nullable | optional | Federal tax identifier of the party at this address, used on customs paperwork for
international shipments. |
|---|
name | string nullable | optional | Contact name at the address. |
|---|
phone | string | required | Contact phone number. FedEx and DHL reject shipments whose addresses carry no phone
number, so supply one whenever those carriers may be used. Constraints: min length 1 |
|---|
residential | boolean nullable | optional | Whether the address is residential. Carriers price residential delivery differently, so an
incorrect value can change the rates you are quoted. |
|---|
state | string | required | State, province or region. For US addresses, the two-letter state code. Constraints: min length 1 |
|---|
stateTaxId | string nullable | optional | State tax identifier of the party at this address, used on customs paperwork for
international shipments. |
|---|
street1 | string | required | First street line — house or building number and street. Constraints: min length 1 |
|---|
street2 | string nullable | optional | Second street line: apartment, suite, unit or floor. |
|---|
zip | string | required | Postal or ZIP code. Constraints: min length 1 |
|---|
OrderParcelRequest
The physical package. Give explicit dimensions, or name a carrier predefinedPackage.
| Field | Type | Required | Description |
|---|
height | number (decimal) nullable | optional | Shortest side of the package, in inches. Format: decimal |
|---|
length | number (decimal) nullable | optional | Longest side of the package, in inches. Supply length, width and height together, or supply
predefinedPackage instead. Dimensions are sent to every carrier in inches. Format: decimal |
|---|
predefinedPackage | string nullable | optional | Carrier-defined packaging to use instead of explicit dimensions, for example a flat-rate box.
The accepted values depend on the carrier. |
|---|
weight | number (decimal) | required | Package weight in pounds. Format: decimal |
|---|
width | number (decimal) nullable | optional | Second-longest side of the package, in inches. Format: decimal |
|---|
RateQuote
One priced shipping option for a package: which carrier and service, what it costs and how fast it
is expected to be. Returned by the rate and combined create-and-rate operations.
| Field | Type | Required | Description |
|---|
billingType | string nullable | required | How the carrier bills this rate, in the carrier's own vocabulary. |
|---|
carrier | string | required | The carrier offering the rate, for example USPS or UPS. |
|---|
carrierCode | string nullable | required | The carrier's own account or brand code, when the carrier supplies one. |
|---|
currency | string | required | Currency of rate, as an ISO 4217 three-letter code. The set of codes a carrier may return
is not constrained by this contract. |
|---|
deliveryDateGuaranteed | boolean | required | Whether the carrier guarantees the delivery date rather than estimating it. |
|---|
deliveryDays | integer (int32) | required | Carrier-supplied transit estimate, in days. This is not a commitment: every carrier integration
fills deliveryDays and estDeliveryDays from one quantity, so the two always carry
the same number on a given rate. 0 means the carrier supplied no transit time for this
rate, not same-day delivery. The day basis is the carrier's own — UPS reports business days in
transit, USPS a span derived from its quoted delivery window — so do not compare the number
across carriers. Read deliveryDateGuaranteed for whether anything is guaranteed. Format: int32 |
|---|
destinationEntryFacilityType | string nullable | required | USPS destination entry facility the price assumes, when the carrier is USPS. |
|---|
estDeliveryDays | integer (int32) | required | Carrier-supplied transit estimate, in days. Currently always equal to deliveryDays: both
are filled from the same carrier quantity on every integration, and neither is a separate
estimated-versus-committed figure. 0 means the carrier supplied no transit time. Format: int32 |
|---|
estimatedDeliveryDate | string (date-time) nullable | required | Date the carrier expects to deliver on. null when the carrier supplied no date, which is
the common case for carriers that report transit days instead. The label-purchase response
republishes this same value under the name selectedRate.deliveryDate. Format: date-time |
|---|
id | string (guid) nullable | required | Identifier of this rate. Send it as rate.id to the label operation to buy this exact
option; a rate cannot be reconstructed from its other fields. Format: guid |
|---|
listCurrency | string nullable | required | Currency of listRate, as an ISO 4217 three-letter code. |
|---|
listRate | number (decimal) nullable | required | The carrier's published list price for the same service, when the carrier publishes one. Like
retailRate, a comparison figure rather than the charged amount. Format: decimal |
|---|
mailClass | string nullable | required | USPS mail class for the rate, when the carrier is USPS. |
|---|
processingCategory | string nullable | required | USPS processing category for the package, when the carrier is USPS. |
|---|
rate | number (decimal) | required | The amount your account is charged if this rate is bought. Format: decimal |
|---|
rateIndicator | string nullable | required | USPS rate indicator describing how the price was derived, when the carrier is USPS. |
|---|
retailCurrency | string nullable | required | Currency of retailRate, as an ISO 4217 three-letter code. |
|---|
retailRate | number (decimal) nullable | required | The carrier's over-the-counter retail price for the same service, when the carrier publishes one.
It is a comparison figure, not what you are charged. Format: decimal |
|---|
serviceCode | string | required | The carrier's own code for the service, for example GroundAdvantage. This is the machine
value; serviceName is the readable one. |
|---|
serviceName | string | required | Readable name of the service, for example USPS Ground Advantage. Suitable for display;
match on serviceCode rather than on this. |
|---|
sku | string nullable | required | The carrier's own product code for this rate, when it supplies one. |
|---|
zone | string nullable | required | Carrier delivery zone between origin and destination, when the carrier reports one. |
|---|
UnmergedOrder
| Field | Type | Required | Description |
|---|
orderId | string (guid) | required | Format: guid |
|---|
shipmentId | string (guid) | required | Format: guid |
|---|
UnmergeShipmentResponse
| Field | Type | Required | Description |
|---|
orders | UnmergedOrder[] | required | Each order and the shipment it is back on. Empty when the shipment was already taken apart. |
|---|
UnmergeShipmentResponseEnvelope
The envelope every JSON operation answers with: a success flag and either a result or errors.
| Field | Type | Required | Description |
|---|
data | UnmergeShipmentResponse nullable | required | The operation's result. Absent when the call failed. |
|---|
errors | ApiError[] nullable | required | What went wrong. Absent when the call succeeded. |
|---|
success | boolean | required | Whether the operation succeeded. When false, read errors. |
|---|
UpdateMergedShipmentRequest
Required: one of these field sets — toAddress; or parcel.
| Field | Type | Required | Description |
|---|
parcel | OrderParcelRequest nullable | optional | The new box; unchanged when omitted. |
|---|
toAddress | OrderAddressRequest nullable | optional | The new recipient address, in the shape orders are created with; unchanged when omitted. |
|---|