Admin API / Types
ShippingLabel
ObjectA shipping label bought through District.
type ShippingLabelFields
| Field | Type | Description |
|---|---|---|
billedToMarketplace | Boolean! | True when the marketplace's own Shippo account bought the label. cost is null, surcharges is empty and surchargeDisputeEndsAt is null: Shippo bills the marketplace, and the marketplace disputes with Shippo. |
carrier | ShipmentCarrier | The label's carrier. Null when the API does not recognize the carrier. |
carrierStatus | CarrierTrackingStatus! | The carrier's latest report for the parcel. UNKNOWN when the carrier has sent no report, or a report that the API does not recognize. |
cost | Money | What the seller paid for the label, in USD. Null when no cost is recorded. Null for a label bought on the marketplace's own Shippo account: the seller paid nothing. Gives a FORBIDDEN error with requiredRole: null unless the seller is the caller or the owner of a store that the caller staffs; the other fields still resolve. |
createdAt | DateTime! | When the label was bought. |
documents | [ShippingLabelDocument!] | The label file and, for an international parcel, the commercial invoice, label first. Each file shows the recipient's name and address, so this field needs the admin:contactDetails:read scope. For a shipment whose seller is not the caller and not the owner of a store that the caller staffs, requires the OWNER role; a lower role gets a FORBIDDEN error with requiredRole: OWNER. Null after a denial; the other fields still resolve. Each URL is a Shippo link that opens without sign-in until 365 days after the purchase. Do not show it to other people.Requires a client key with one of these scopes: admin:contactDetails:read |
providerTransactionId | String! | The label's transaction ID at Shippo. Another label of the same shipment has another ID. Pass it to voidShipmentLabel as expectedLabel.providerTransactionId, so the void refuses a label that changed after this read. |
serviceLevel | ShippingServiceLevel | The carrier service. Null when the label record has no service. |
surchargeDisputeEndsAt | DateTime | When the period to dispute a surcharge with the carrier ends: 90 days after the shipment was created for UPS, and the start of the 11th day of the next month, US Eastern time, for USPS. Null for other carriers, and for a label bought on the marketplace's own Shippo account. |
surcharges | [LabelSurcharge!] | Carrier charges and credits on the label after purchase that District settled with the seller, oldest first. Empty when there are none. Empty for a label bought on the marketplace's own Shippo account: Shippo invoices the marketplace. Same gate as cost. |
trackingNumber | String | The carrier's tracking number. Null until the carrier issues one. |
trackingUrl | URL | The carrier's tracking page, as Shippo gave it. Null when Shippo gave none. |
voidInProgress | Boolean! | True while an earlier voidShipmentLabel call holds the label for a void that has not completed: the shipment is REFUNDED and an order of the shipment is still PAID or READY_TO_SHIP. A repeat of that call with its idempotencyKey, or a void with a new key 15 minutes after the earlier call, completes the void and the refund. |
voidable | Boolean! | True while the label can be voided: the shipment is NOT_STARTED or READY_TO_SHIP, and the carrier has not scanned the parcel. |