Buy a label for a shipment from a selected rate, download its file, and cancel a label that is no longer needed. If a label purchase returns `202` or its response is lost, read the order for the outcome — repeating the same effective purchase request replays that purchase operation instead of buying a second label. Cancellation carries no equivalent guarantee: it declares no idempotency key and no replay contract, so do not blindly repeat a cancellation whose outcome is unclear.
Operations
POST /api/v1/shipments/{shipmentId}/labels
Buy label
Creates a shipping label for a shipment using a bearer token. The request body is unchanged and carries no idempotency token: repeated requests are recognized server-side from the shipment's durable purchase operation and its effective request. Returns 200 when the purchase has completed — a repeat of the same effective request replays the original result, including one started on the standard surface — 202 when the purchase is still running when the wait window ends, and 409 when a different purchase is already in progress or a label already exists for the shipment. After a 202 the client observes completion through GET v1/orders/{id}; there is no operation-status endpoint to poll. Label files may still be generated asynchronously: when label assets are still processing, postageLabel.labelProcessingStatus will be 'processing' and label URLs may be null or empty.
**Label URLs are temporary.** Every URL in postageLabel — the flat labelUrl/labelPdfUrl/labelZpl*Url fields and postageLabel.labelAssets[].url alike — is a pre-signed storage link that downloads the file directly, with no API token. Each one expires (24 hours by default) and cannot be revoked before it does, so treat it as a credential: do not store it, log it, or share it. Once a link has expired, call GET v1/orders/{id} to obtain fresh ones; there is no refresh call, and re-purchasing is never required. The proxy download endpoint remains available and is unchanged. A merged shipment's label covers every order in it (orderIds); a refusal by another of its orders keeps that refusal's own code and names the order in 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 purchase against the sub-account's carrier availability, which can narrow the carriers available to those enabled for that sub-account. Does not change the label's charged price, and does not restrict which shipments/rates can be used to purchase a label — that is enforced by account ownership alone. Example: 3a7d9e21-6b48-4c15-9f2e-7d0c5b83a614 |
|---|
Request body (required)
application/json — BuyLabelRequest
{
"rate": {
"id": "c4a1b2d3-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
}
}
Responses
| Status | Description | Body |
|---|
200 | Label created successfully | application/json — BuyLabelResponseEnvelope
|
|---|
202 | Label purchase accepted and still in progress | application/json — BuyLabelAcceptedEnvelope
|
|---|
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 | The rate, its shipment, or the order behind it does not exist for your account | application/json — ErrorEnvelope
|
|---|
409 | A label purchase is already in progress, or a label already exists for this shipment | 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 cannot become a label for a reason the caller can correct. Either the carrier rejected it — address, phone, customs, parcel or a stale rate — or it was refused before the carrier was called: `Order.NotReadyForPurchase` (a sender or recipient field is missing or invalid, most often a phone number), `Order.ClosedAtSource` (the connected store already shipped or cancelled the order), `Order.CustomsRequired` (the destination is outside the US and no customs declaration is available yet), `Order.NotLoaded` or `Order.MetadataUnreadable` (the order behind the shipment could not be read). The pre-carrier reasons apply to orders imported from a connected store; an order created purely through this API carries no completeness metadata and is not held to them. | application/json — ErrorEnvelope
|
|---|
500 | Internal server error | application/json — ErrorEnvelope
|
|---|
503 | The carrier is temporarily unavailable. Nothing to correct; retry later | application/json — ErrorEnvelope
|
|---|
GET /api/v1/labels/{labelId}/download
Download label
Downloads the shipping label file by label ID. When `format` is omitted, the account's preferred LabelPrintingTechnology is used, falling back to PDF. PDF and ZPL files can be generated asynchronously, so the endpoint may return 202 while the requested file is still being processed. Errors come from two producers, and which one answered decides the shape. The endpoint's own responses — the pending 202 and its 404, 409, 500 and 503 failures — are a flat JSON error object (`code`, `description`, `category`, `metadata`). Failures raised around the endpoint — authentication, `X-SubAccount-Id` validation, request binding and unexpected server errors — use the standard `{success, data, errors}` JSON envelope. 404, 409 and 500 have both producers and are published as `oneOf` of the two; 400 and 401 are always the envelope, 202 and 503 always the flat object. 403 is the one response with no body at all: authorization refuses a non-integration token before anything can write one.
Authentication: JWTBearerAuth, Bearer http, JWT
Parameters
| Name | In | Type | Required | Description |
|---|
labelId | path | string (guid) | required | Example: f6c7d8e9-0a1b-4c2d-8e3f-4a5b6c7d8e9f |
|---|
format | query | LabelFormat | optional | Label file format: PDF (1), ZPL300DPI (2), ZPL203DPI (3), ZPL600DPI (4). When omitted, falls back to the account's LabelPrintingTechnology, then to PDF. Example: 1 |
|---|
X-SubAccount-Id | header | string (uuid) | optional | Optional but has no effect on this operation: the label is looked up by account only, regardless of which sub-account it (or its shipment) is tagged with or which sub-account this header specifies. Example: 3a7d9e21-6b48-4c15-9f2e-7d0c5b83a614 |
|---|
Responses
| Status | Description | Body |
|---|
200 | Label file | application/pdf — string (binary)
application/zpl — string (binary)
|
|---|
202 | Requested label file is pending or still being generated Header Retry-After (integer (int32)) — Number of seconds to wait before retrying this label-file download. | application/json — LabelFileError
|
|---|
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 | Label not found or requested format not generated | application/json — LabelFileError or ErrorEnvelope
|
|---|
409 | Label generation conflicts with current state | application/json — LabelFileError or ErrorEnvelope
|
|---|
500 | Label generation failed or internal server error | application/json — LabelFileError or ErrorEnvelope
|
|---|
503 | The carrier is temporarily unavailable. Nothing to correct; retry later | application/json — LabelFileError
|
|---|
DELETE /api/v1/labels/{labelId}
Cancel label
Cancels a shipping label by label ID. The label of a merged shipment covers every order in it: they all return to Packed and stay merged, ready for a new label.
Authentication: JWTBearerAuth, Bearer http, JWT
Parameters
| Name | In | Type | Required | Description |
|---|
labelId | path | string (guid) | required | Example: f6c7d8e9-0a1b-4c2d-8e3f-4a5b6c7d8e9f |
|---|
X-SubAccount-Id | header | string (uuid) | optional | Optional but has no effect on this operation: the label is looked up and cancelled by account only, regardless of which sub-account it (or its shipment) is tagged with or which sub-account this header specifies. Example: 3a7d9e21-6b48-4c15-9f2e-7d0c5b83a614 |
|---|
Responses
| Status | Description | Body |
|---|
200 | Label canceled successfully | application/json — CancelLabelResponseEnvelope
|
|---|
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 | The label, its shipment, or its carrier does not exist for your account | application/json — ErrorEnvelope
|
|---|
409 | The sub-account given in `X-SubAccount-Id` is not active. | application/json — ErrorEnvelope
|
|---|
422 | The label cannot be cancelled as it stands — its shipment has no tracking code to cancel against | application/json — ErrorEnvelope
|
|---|
500 | The request could not be completed because of an unexpected server-side failure. | 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.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. |
|---|
BuyLabelAccepted
The 202 Accepted body for a label purchase that was still running when the wait window
closed. The label is still being bought; poll the order to see it appear.
| Field | Type | Required | Description |
|---|
correlationId | string nullable | required | Correlation identifier for the purchase, filled in once it has been dispatched for processing.
Diagnostic only, like operationId. |
|---|
errorCode | string nullable | required | The carrier's last reported failure code when the purchase is unresolved; null while the
carrier has not answered. Lets a seller or support read the reason without opening logs. |
|---|
errorMessage | string nullable | required | The carrier's words for ErrorCode. |
|---|
operationId | string | required | Identifier of the in-flight purchase. Diagnostic only: it is never sent back, and there is no
public operation-status endpoint to poll it against. |
|---|
rateId | string | required | Identifier of the rate being bought. |
|---|
shipmentId | string | required | Identifier of the shipment the label is being bought for. |
|---|
status | string | required | Where the purchase had got to when the wait window closed. One of Claimed (accepted by
Mailhub, not yet sent to the carrier), Processing (sent and running), or
OutcomeUnknown (the carrier may have created a label; the purchase is retained and
resolved later, never automatically retried). A completed purchase answers 200 and a
confirmed failure answers an error, so neither appears here. Allowed values: Claimed, Processing, OutcomeUnknown |
|---|
BuyLabelAcceptedEnvelope
The envelope every JSON operation answers with: a success flag and either a result or errors.
| Field | Type | Required | Description |
|---|
data | BuyLabelAccepted 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. |
|---|
BuyLabelRequest
Names the rate to buy a label for.
BuyLabelResponse
A purchased shipping label and the shipment it belongs to: the addresses it prints, the package it
covers, the rate that was charged and the label files to download.
| Field | Type | Required | Description |
|---|
createdAt | string | required | UTC instant the label was created, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
customsInfo | CustomsInfo nullable | required | Customs declaration for an international shipment. This operation does not populate it today. |
|---|
fromAddress | LabelAddress | required | |
|---|
id | string | required | Identifier of the shipment the label was bought for. |
|---|
isReturn | boolean | required | Whether the shipment is a return back to the sender. |
|---|
object | string | required | Type discriminator; always Shipment. |
|---|
orderId | string nullable | required | Identifier of the order the shipment belongs to, when it belongs to one. |
|---|
orderIds | string[] | required | Every order this label covers, anchor first: several when orders were merged into one shipment. orderId is
the first of them. |
|---|
parcel | LabelParcel | required | |
|---|
postageLabel | PostageLabel | required | |
|---|
returnAddress | LabelAddress nullable | required | Address returns are sent to, when one differs from the sender's address. |
|---|
selectedRate | SelectedRate | required | |
|---|
status | string | required | Shipment status as the enum member name. Values are Unknown, PreTransit,
InTransit, OutForDelivery, Delivered, AvailableForPickup,
ReturnToSender, Failure, Cancelled and Error. Carrier tracking is not
yet wired in, so in practice this reads Unknown — it is not a label-generation status. For
that, read postageLabel.labelProcessingStatus. Allowed values: Unknown, PreTransit, InTransit, OutForDelivery, Delivered, AvailableForPickup, ReturnToSender, Failure, Cancelled, Error |
|---|
toAddress | LabelAddress | required | |
|---|
trackingCode | string | required | Carrier tracking number printed on the label. |
|---|
updatedAt | string | required | UTC instant the label was last modified, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
uspsZone | integer (int32) nullable | required | USPS delivery zone between origin and destination, when USPS reported one. Format: int32 |
|---|
BuyLabelResponseEnvelope
The envelope every JSON operation answers with: a success flag and either a result or errors.
| Field | Type | Required | Description |
|---|
data | BuyLabelResponse 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. |
|---|
CancelLabelResponse
The outcome of cancelling a label.
| Field | Type | Required | Description |
|---|
isSuccess | boolean | required | Whether the carrier accepted the cancellation. A cancelled label can no longer be
downloaded. |
|---|
CancelLabelResponseEnvelope
The envelope every JSON operation answers with: a success flag and either a result or errors.
| Field | Type | Required | Description |
|---|
data | CancelLabelResponse 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. |
|---|
CustomsInfo
Customs declaration accompanying an international shipment.
| Field | Type | Required | Description |
|---|
contentsExplanation | string | required | Free-text description of the contents, required by some carriers for certain content types. |
|---|
contentsType | string | required | What the parcel contains, in the carrier's vocabulary — merchandise, a gift, documents and so on. |
|---|
createdAt | string | required | UTC instant the declaration was created, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
customsCertify | boolean | required | Whether the signer certified the declaration as accurate. |
|---|
customsItems | CustomsItem[] | required | The individual line items being declared. |
|---|
customsSigner | string | required | Name of the person certifying the declaration. |
|---|
declaration | string nullable | required | Additional declaration text the carrier requires. |
|---|
eelPfc | string | required | US Electronic Export Information exemption or Proof of Filing Citation carried on the declaration. |
|---|
id | string | required | Identifier of the customs declaration. |
|---|
nonDeliveryOption | string | required | What the carrier should do if the parcel cannot be delivered — return it or abandon it. |
|---|
object | string | required | Type discriminator; always CustomsInfo. |
|---|
restrictionComments | string nullable | required | Free-text detail about the restriction named in restrictionType. |
|---|
restrictionType | string | required | Any export or import restriction that applies to the contents. |
|---|
updatedAt | string | required | UTC instant the declaration was last modified, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
CustomsItem
One declared line on a customs declaration.
| Field | Type | Required | Description |
|---|
code | string | required | Your own product or SKU code for the item. |
|---|
createdAt | string | required | UTC instant the line item was created, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
currency | string nullable | required | Currency of value, as an ISO 4217 three-letter code. The set of codes accepted here is not
constrained by this contract. |
|---|
description | string | required | What the item is, in plain words, for the customs authority. |
|---|
eccn | string nullable | required | Export Control Classification Number, when the item is export-controlled. |
|---|
hsTariffNumber | string | required | Harmonized System tariff code classifying the item. |
|---|
id | string | required | Identifier of the declared line item. |
|---|
manufacturer | string nullable | required | Who made the item. |
|---|
object | string | required | Type discriminator; always CustomsItem. |
|---|
originCountry | string | required | Country the item was made in, as a two-letter ISO 3166-1 alpha-2 code. |
|---|
quantity | integer (int32) | required | How many of this item are in the parcel. Format: int32 |
|---|
updatedAt | string | required | UTC instant the line item was last modified, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
value | string | required | Declared value of the line, in currency. |
|---|
weight | number (decimal) | required | Weight of the line in pounds. Format: decimal |
|---|
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. |
|---|
LabelAddress
A postal address as Mailhub stored it.
| Field | Type | Required | Description |
|---|
carrierFacility | string nullable | required | Carrier facility this address refers to, when one was supplied. |
|---|
city | string | required | City or locality. |
|---|
company | string nullable | required | Company name at the address. |
|---|
country | string | required | Two-letter ISO 3166-1 alpha-2 country code, for example US. |
|---|
createdAt | string | required | UTC instant the address record was created, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
email | string | required | Contact email address. |
|---|
federalTaxId | string nullable | required | Federal tax identifier recorded for customs paperwork. |
|---|
id | string | required | Identifier of the stored address record. |
|---|
name | string | required | Contact name at the address. |
|---|
object | string | required | Type discriminator; always Address. |
|---|
phone | string | required | Contact phone number. |
|---|
residential | boolean nullable | required | Whether the address is residential. |
|---|
state | string | required | State, province or region. For US addresses, the two-letter state code. |
|---|
stateTaxId | string nullable | required | State tax identifier recorded for customs paperwork. |
|---|
street1 | string | required | First street line — house or building number and street. |
|---|
street2 | string | required | Second street line: apartment, suite, unit or floor. |
|---|
updatedAt | string | required | UTC instant the address record was last modified, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
zip | string | required | Postal or ZIP code. |
|---|
LabelAsset
One rendering of the label, in a single file format.
| Field | Type | Required | Description |
|---|
format | string | required | The label file format this entry describes: PDF, ZPL203DPI, ZPL300DPI or
ZPL600DPI. Allowed values: PDF, ZPL300DPI, ZPL203DPI, ZPL600DPI |
|---|
status | string | required | completed when the file exists and url is filled in, processing while it is
still being rendered. Every listed format is eventually produced, so processing means
"come back", not "unavailable". Allowed values: completed, processing |
|---|
url | string nullable | required | Time-limited link that downloads the file directly, without an API token. It expires; buy-time
links can be replaced by requesting the order again. |
|---|
LabelFileError
The flat error body the label file operations produce themselves. A file download is not a JSON
operation, so its own failures are reported flat rather than inside the success/errors envelope
the JSON operations use. Failures raised around the endpoint — authentication, sub-account
validation, request binding, unexpected server errors — still use that envelope, so a status can
be published as either shape.
| Field | Type | Required | Description |
|---|
category | string | required | Broad class the failure falls into, which is what the HTTP status is derived from — for example
Validation, NotFound, Conflict or Upstream. Allowed values: General, Validation, Authorization, NotFound, Conflict, Infrastructure, Upstream |
|---|
code | string | required | Machine-readable error identifier, dotted and stable — for example Label.Processing. Branch
on this rather than on description. |
|---|
description | string | required | Readable explanation of the failure. Wording may change; do not parse it. |
|---|
metadata | object nullable | required | Extra detail about this particular failure. Its shape depends on code. |
|---|
LabelFormat
Label file format. ZPL members are resolution-specific: a label is generated and stored
separately for each supported printer resolution. Published as the numeric value:
1 = Pdf.
2 = Zpl300Dpi.
3 = Zpl203Dpi.
4 = Zpl600Dpi.
2 and 3 are deliberately not in resolution order: 2 predates the split and already meant 300 dpi.
Allowed values: 1, 2, 3, 4
Type integer.
LabelParcel
The physical package the label covers.
| Field | Type | Required | Description |
|---|
createdAt | string | required | UTC instant the parcel record was created, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
height | number (decimal) | required | Shortest side of the package, in inches. Reads 0 when the order named a predefined package. Format: decimal |
|---|
id | string | required | Identifier of the stored parcel record. |
|---|
length | number (decimal) | required | Longest side of the package, in inches. Reads 0 when the order named a predefined package instead. Format: decimal |
|---|
object | string | required | Type discriminator; always Parcel. |
|---|
predefinedPackage | string nullable | required | Carrier-defined packaging named on the order, when dimensions were not given. |
|---|
updatedAt | string | required | UTC instant the parcel record was last modified, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
weight | number (decimal) | required | Package weight in pounds. Format: decimal |
|---|
width | number (decimal) | required | Second-longest side of the package, in inches. Reads 0 when the order named a predefined package. Format: decimal |
|---|
PostageLabel
The label itself and the files it can be downloaded as.
| Field | Type | Required | Description |
|---|
createdAt | string | required | UTC instant the label was created, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
dateAdvance | integer (int32) | required | Not populated by Mailhub; always 0. Format: int32 |
|---|
id | string | required | Identifier of the label. Use it on the label download and cancel operations. |
|---|
integratedForm | string | required | Not populated by Mailhub; always empty. |
|---|
labelAssets | LabelAsset[] | required | One entry per printable format, each with its own status and link. The flat label*Url
fields above carry the same links. |
|---|
labelDate | string | required | Date the label is mailed on, as yyyy-MM-ddTHH:mm:ssZ, falling back to the label's creation
instant when the carrier supplied no mailing date. |
|---|
labelFile | string nullable | required | Not populated by Mailhub. Label files are served through the time-limited links above. |
|---|
labelFileType | string | required | File type of labelUrl; always PDF. |
|---|
labelPdfUrl | string nullable | required | Time-limited link to the PDF rendering. |
|---|
labelProcessingStatus | string | required | completed once every listed format has been rendered, processing while any is still
being produced. This is the field to poll on after buying a label — not the shipment's
status. Allowed values: completed, processing |
|---|
labelResolution | integer (int32) | required | Not populated by Mailhub; always 0. Resolution is carried by the per-format asset entries. Format: int32 |
|---|
labelSize | string | required | Not populated by Mailhub; always empty. |
|---|
labelType | string | required | Not populated by Mailhub; always empty. |
|---|
labelUrl | string | required | Time-limited link to the PDF rendering — the general-purpose "the label file" link. Same value as
labelPdfUrl. Links expire; request the order again for fresh ones. |
|---|
labelZpl203Url | string nullable | required | Time-limited link to the 203 dpi ZPL rendering. |
|---|
labelZpl300Url | string nullable | required | Time-limited link to the 300 dpi ZPL rendering. |
|---|
labelZpl600Url | string nullable | required | Time-limited link to the 600 dpi ZPL rendering. |
|---|
object | string | required | Type discriminator; always PostageLabel. |
|---|
updatedAt | string | required | UTC instant the label was last modified, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
RateReference
A reference to a previously quoted rate.
| Field | Type | Required | Description |
|---|
id | string | required | The id of the rate to buy, taken from a rate returned by the rate or combined
create-and-rate operation. Constraints: min length 1 |
|---|
SelectedRate
The rate that was bought, and what it cost.
| Field | Type | Required | Description |
|---|
billingType | string | required | How the carrier bills this rate, in the carrier's own vocabulary. |
|---|
carrier | string | required | The carrier the label was bought from. |
|---|
createdAt | string | required | UTC instant the rate was quoted, as yyyy-MM-ddTHH:mm:ssZ. |
|---|
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. |
|---|
deliveryDate | string nullable | required | Date the carrier expects to deliver on, as yyyy-MM-ddTHH:mm:ssZ. This is the same value
the rate operation publishes as estimatedDeliveryDate, renamed on this response only.
null when the carrier supplied no date, which is the common case for carriers that
report transit days instead. |
|---|
deliveryDateGuaranteed | boolean | required | Whether the carrier guarantees the delivery date rather than estimating it. |
|---|
deliveryDays | integer (int32) | required | Carrier-supplied transit estimate, in days, carried over from the rate that was bought. Not a
commitment, and always equal to estDeliveryDays: both are filled from one carrier
quantity. Reads 0 when the carrier supplied no transit time. The day basis is the
carrier's own, so do not compare the number across carriers. Format: int32 |
|---|
estDeliveryDays | integer (int32) | required | Carrier-supplied transit estimate, in days. Currently always equal to deliveryDays:
both are filled from the same carrier quantity. Reads 0 when the carrier supplied none. Format: int32 |
|---|
id | string | required | Identifier of the rate that was bought. |
|---|
listCurrency | string | required | Currency of listRate. Falls back to currency when the carrier published no list
price. |
|---|
listRate | number (decimal) | required | The carrier's published list price for the same service. When the carrier published none, this
repeats the charged rate, on the same terms as retailRate. Format: decimal |
|---|
object | string | required | Type discriminator; always Rate. |
|---|
rate | number (decimal) | required | The amount charged to your account for this label, in currency. Format: decimal |
|---|
retailCurrency | string | required | Currency of retailRate. Falls back to currency when the carrier published no retail
price. |
|---|
retailRate | number (decimal) | required | The carrier's over-the-counter retail price for the same service. When the carrier published no
retail price, this repeats the charged rate rather than being omitted — so an equal value
does not by itself mean the carrier quoted the same figure. Format: decimal |
|---|
service | string | required | The carrier's own service code for the bought rate, for example GroundAdvantage. This is
the same value the rate operation publishes as serviceCode; no readable service name is
returned here. |
|---|
shipmentId | string | required | Identifier of the shipment this rate was quoted for. |
|---|
updatedAt | string | required | UTC instant the rate was last modified, as yyyy-MM-ddTHH:mm:ssZ. |
|---|