Skip to main content

Finding Global Trade Item Numbers (GTINs)

To create orders for blank products, you need the product's GTIN. This identifier ensures you are ordering the correct variant (size, color, style).

1. Get Blank Products​

Use the getBlankProducts query to retrieve a list of available blank products. This query returns BlankVariantDetail objects, which contain the gtin field.

Query Example​

query GetBlankProducts {
getBlankProducts(limit: 10) {
id
name
gtin # <--- This is the value you need
color
size
style
blankProductId
}
}

Response Example​

{
"data": {
"getBlankProducts": [
{
"id": "bv_12345",
"name": "Classic T-Shirt - Black - L",
"gtin": "00123456789012",
"color": "Black",
"size": "L"
}
]
}
}

2. Quote print pricing (optional)​

Before you create the order, quoteOrderFromGtin returns print + blank + optional shipping from the printer's decoration tables (DTG, DTF, …). See Quote an order from GTIN.

query {
quoteOrderFromGtin(
input: {
orderItems: [
{
gtin: "00123456789012"
quantity: 1
decorationMethod: "1"
placements: ["1"]
}
]
}
) {
printingCost
fulfillmentCost
totalCost
items { gtin decorationMethod printingCost warnings }
}
}

3. Use GTIN to Create Order​

Once you have the gtin, use it in the createOrderFromGtin mutation.

Pass the GTIN in the gtin field of each item in the orderItems list. To attach a pre-purchased shipping label, pass shippingLabel — see Prepaid shipping labels.

Mutation Example​

mutation CreateOrderFromGtin {
createOrderFromGtin(
input: {
orderNumber: "ORD-1001"
shopId: "shop_123"
shippingAddress: {
name: "John Doe"
address1: "123 Main St"
city: "New York"
country: "US"
}
orderItems: [
{
gtin: "00123456789012" # <--- Pass the GTIN here
quantity: 1
price: 19.99
}
]
}
) {
id
orderNumber
shipped
cancelled
}
}

Note: The createOrderFromGtin mutation uses OrderItemGtinInput, which accepts gtin, quantity, price, name, tax, discount, images, and other optional fields. See the API reference for the full input type.