Get shipping rate quotes for an order's shipment and purchase a label from a selected rate. 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/{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.
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
|
|---|
POST /api/v1/shipments/{shipmentId}/rates
Get shipment rates
Gets shipping rate quotes from all available carriers for a shipment using a bearer token.
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 | The sub-account given in `X-SubAccount-Id` is not active. | 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 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. |
|---|
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. |
|---|
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. |
|---|
CarrierRateResult
The outcome of asking one carrier for rates. Present for every carrier that was asked, so a carrier
that returned nothing can be told apart from a carrier that was never contacted.
| 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. |
|---|
errorMessage | string nullable | required | Readable explanation of why the carrier returned no rates. |
|---|
success | boolean | required | Whether that carrier returned rates. |
|---|
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. |
|---|
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. |
|---|
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. |
|---|
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. |
|---|
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. |
|---|
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. |
|---|
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. |
|---|