Admin API / Types

Shipment

Object

A parcel that holds one seller's orders to one address. Readable when all its orders have one seller and the caller can read every order on it.

Requires a client key with one of these scopes: admin:shipments:read

The requirement applies to every field of Shipment unless that field declares its own scopes.

type Shipment implements Node

Fields

FieldTypeDescription
bundlingEndsAtDateTime
When later paid orders of the same buyer stop joining this shipment. Null when no end is set.
buyerUser
The buyer of the oldest order on the shipment. Null when that order has no buyer account or the account is not visible to the caller. Reading the buyer's fields needs the admin:account:read scope.
containsHazmatBoolean!
True when the parcel holds hazardous material. A label bought for the shipment declares it to the carrier.
createdAtDateTime!
When the shipment was created.
estimatedParcelParcel!
A parcel estimated from the shipping details of the listings on the purchased orders, in inches and pounds. An item with no shipping details adds 0.5 lb. With no item dimensions the box is 6 × 6 × 6 in. Use it when parcel is null.
firstPurchasedItemOrderItem
The first item of the purchased orders of the shipment that the caller can read, oldest order first. With no such item, the first item of its refunded orders that the caller can read. Null when neither exists.Requires a client key with one of these scopes: admin:orders:read
fulfillmentMethods[FulfillmentMethod!]!
How the items of the shipment's orders reach the buyer, as OrderItem.deliveryMethod gives them. Holds both values for a mix of digital and physical items.
hasRefundBoolean!
True when an order on the shipment has a recorded refund. A full refund and a partial refund each count. A refund counts from the moment that it is recorded, and it has no pending state. An order that the caller cannot read does not count.
hasSoldOrdersBoolean!
True when an order on the shipment is purchased: paid, ready to ship, shipped or delivered.
holdShipmentHold
A reason not to ship. Null when none applies.
idID!
A globally unique ID. Treat this value as an opaque string.
insuranceShipmentInsurance
Declared insurance. Null when none is declared.
itemQuantityNonNegativeInt!
Units across the shipment's purchased orders: orders that are paid, ready to ship, shipped or delivered.
labelShippingLabel
The shipping label bought through District for the shipment. Null when the shipment has none.
labelFundingRequirementLabelFundingRequirement
Who funds a new label for this shipment at cost. BILLED_TO_MARKETPLACE: the marketplace bills labels to its own Shippo account; the seller pays nothing, and purchaseShipmentLabel refuses a providerPaymentMethodId with PaymentMethodNotAcceptedError. The answer does not depend on the account's health: a purchase on an unavailable account returns ShippoAccountUnavailableError. WALLET: the seller's wallet pays. CARD: a saved card pays; purchaseShipmentLabel returns PaymentMethodRequiredError when the seller has no default card. The answer is for the shipment's seller, whoever calls, and purchaseShipmentLabel decides again. cost is a USD amount of zero or more; zero answers who bills before a rate is selected. Another currency or a negative amount gives a VALIDATION_ERROR. Null, with a FORBIDDEN error with requiredRole: null, unless the seller is the caller or the owner of a store that the caller staffs. Additional values may be added.Requires a client key with one of these scopes: admin:shipments:readArguments:
cost: MoneyInput! — The label cost to fund, in USD.
ordersShipmentOrderConnection!
The shipment's orders that are visible to the caller, oldest first. totalCount counts every order on the shipment. Offsets stop at 1,000 orders (1,000,000 for Soho).Arguments:
after: String — Returns the orders after this cursor.
first: Int — The number of orders to return, 1 to 100 (1 to 10,000 for Soho). The default is 20.
originPostalAddress
The ship-from name, address and phone. Null when no complete address is stored. 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. A caller who is not the seller also needs the admin:contactDetails:read scope, else the field gives a FORBIDDEN error.
parcelParcel
The parcel stored for the label: the seller's entry, else the estimate that checkout stored when an order was paid. Null when no complete parcel is stored.
recipientContactContact
The ship-to name and address. email, phone and address.phone are always null: read the buyer's email and phone on Order.buyerContact. Null when no name and no address is stored. 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. Reading its fields needs the admin:contactDetails:read scope.
sellerUser
The seller of the shipment's orders. For a store order, the store owner. Null when the seller is not a user of this marketplace. Reading the seller's fields needs the admin:account:read scope.
shippedAtDateTime
When the shipment was first marked as shipped, or null before dispatch.
shippingFeeMoney!
Sum of shippingFee of the shipment's purchased orders. Zero when no order is purchased.
statusShipmentStatus!
The shipment's current fulfilment status.
statusUpdatedAtDateTime!
When status last changed.
subtotalMoney!
Sum of subtotal of the shipment's purchased orders. Zero when no order is purchased.
trackingShipmentTracking
Tracking added without a label bought through District, for example by the seller or by a warehouse. Null when none. A label bought through District has its tracking on label.
updatedAtDateTime!
Time of the latest change to the shipment record: a status change, a label, a parcel change or the end of bundling. A new order that joins the shipment and a change to an order do not count. The recorded time is the start of the write: when you read changes in consecutive updatedAt ranges, overlap each range with the previous one.

Returned by