Admin API / Types
PurchaseShipmentLabelPayload
UnionThe result of purchaseShipmentLabel. ShipmentNotFoundError: the caller reads no shipment with the ID. ShipmentNotLabelableError: the shipment is not NOT_STARTED, has no parcel, has a label, holds an order that was placed in test mode, or has an earlier purchase on a marketplace's own Shippo account with an unknown outcome (PURCHASE_UNCONFIRMED). UnauthorizedError: the caller is below SELLER with no open seller obligations (requiredRole: SELLER); or the caller reads the shipment but its seller is not the caller or the owner of a store that the caller staffs, or the caller or the seller cannot buy labels (requiredRole: null). ShippoAccountUnavailableError: the marketplace bills labels to its own Shippo account, and none is available or the shipment's seller is not an owner of the marketplace. Every error member charged nothing, except as LabelPurchaseFailedError describes.
union PurchaseShipmentLabelPayload = CardDeclinedError | IdempotencyConflictError | LabelPurchaseFailedError | PaymentMethodNotAcceptedError | PaymentMethodRequiredError | PurchaseShipmentLabelSuccess | ShipmentNotFoundError | ShipmentNotLabelableError | ShippingRateUnavailableError | ShippoAccountUnavailableError | UnauthorizedErrorMembers
CardDeclinedErrorIdempotencyConflictErrorLabelPurchaseFailedErrorPaymentMethodNotAcceptedErrorPaymentMethodRequiredErrorPurchaseShipmentLabelSuccessShipmentNotFoundErrorShipmentNotLabelableErrorShippingRateUnavailableErrorShippoAccountUnavailableErrorUnauthorizedError