Skip to main content

ShippingItemInput

Individual item in a shipment with its own measurements and pricing. UNIT EXPECTATIONS: weight in grams (g), dimensions in centimeters (cm), volume in cubic centimeters (cm³). Pricing is per unit (before multiplication by quantity). If shipment-level totals are not provided, they will be aggregated from items.

input ShippingItemInput {
productId: String
weight: Int
dimensions: ShippingDimensionsInput
volume: Int
quantity: Int!
price: PriceInput!
attributes: [MapInput!]
}

Fields

productId ● String

Unique identifier for the product (for logging and reference)

weight ● Int

Weight of this item in grams (g). Used for shipping cost and carrier calculations.

dimensions ● ShippingDimensionsInput

Dimensions of this item in centimeters (cm). Used to calculate volume if not provided explicitly.

volume ● Int

Volume of this item in cubic centimeters (cm³). If not provided, calculated from dimensions.

quantity ● Int!

Quantity of this item in the shipment (for multiplying weight, volume, and price).

price ● PriceInput!

Pricing information for this item per unit (before multiplication by quantity).

attributes ● [MapInput!]

Custom item-specific metadata as key-value pairs. This can be used for gateway- or carrier-specific attributes (e.g., shipping class IDs) or internal processing.

Example

{
"dimensions": {},
"price": {},
"attributes": [
{}
]
}