Admin API / Types

PurchaseShipmentLabelInput

Input

The shipment, the rate and the card.

input PurchaseShipmentLabelInput

Input fields

FieldTypeDescription
expectedRateExpectedLabelRateInputThe rate that the caller read for rateToken. When the rate has another cost in cents, another currency or another service token at the purchase, the call returns ShippingRateUnavailableError and charges nothing. Omitted or null: no check.
idempotencyKeyString!A client-generated key, 1 to 200 characters after trim. A repeat with the same key and input within 24 hours returns the first result. The card charge uses the key too, so a key whose attempt failed after a card charge cannot buy a label.
providerPaymentMethodIdStringA saved card of the caller, from Viewer.labelPaymentMethods. Accepted only from a client that can read saved cards, when the caller is the shipment's seller and labels bill to a card. Null uses the seller's default card when labels bill to a card.
rateTokenString!A ShippingLabelRate.token from quoteShipmentLabelRates for this shipment, less than 7 days old and quoted after the last change to the shipment's addresses, parcel, hazardous-material flag, insurance or sold items.
shipmentIdID!The shipment. Its seller must be the caller or the owner of a store that the caller staffs.