Add shipping label purchase, collection sub-eligibility, and metafield query

6/17/2026, 12:01:12 AM

Shopify added a new "shippingLabelPurchase" mutation that lets developers programmatically buy shipping labels, returning an async result via ShippingLabelPurchasePayload and supporting package options, preferred rates, and detailed error codes. A new "shippingLabel" query now retrieves a ShippingLabel by ID, and the shipping label type is also exposed as a field on the Fulfillment object. The schema now exposes collection metafield definitions usable in collection conditions through the "collectionConditionMetafieldDefinitions" query, returning objects that implement CollectionConditionMetafieldDefinitionInterface. Collections gain a "subCollectionEligibility" field that reports inclusion/exclusion viability with reasons via CollectionSubCollectionEligibility, aiding front‑end validation of sub‑collection sources. Several new input types (PackageInfoInput, PreferredRateSelectionInput, etc.) and enums (ShippingLabelPurchaseErrorCode, ShippingLabelPurchaseUserErrorCode, SubCollectionIneligibleReason) support the new features and provide detailed error codes. The legacy CollectionLinkedSourceInput type is removed and replaced by CollectionShareableSourceInput for linking sources. Minor description wording was adjusted for MailingAddress.validationResultSummary; no functional changes there.

Query Changes

➕ Added Queries (2)

collectionConditionMetafieldDefinitions

Lists all metafield definitions that can be used to create collection conditions.

shippingLabel

Returns a ShippingLabel resource by ID.

Mutation Changes

➕ Added Mutations (1)

shippingLabelPurchase

Purchases shipping label.

Type Changes

➕ Added Types (24)

🏗️CollectionConditionBasicMetafieldDefinition➕ AddedOBJECT

A non-metaobject metafield definition usable as a collection condition.

Fields: description, id, key, name, namespace ... +3 more
🔌CollectionConditionMetafieldDefinitionInterface➕ AddedINTERFACE

Common fields exposed by every metafield definition usable as a collection condition.

Fields: description, id, key, name, namespace ... +3 more
🏗️CollectionConditionMetaobjectMetafieldDefinition➕ AddedOBJECT

A metaobject-reference metafield definition usable as a collection condition.

Fields: description, id, key, metaobjectDefinition, name ... +4 more
📥CollectionShareableSourceInput➕ AddedINPUT_OBJECT

The input fields for linking an existing shareable source to a collection.

📥CollectionSourceExclusionConditionCollectionInput➕ AddedINPUT_OBJECT

The input fields for an exclusion condition based on collections.

🏗️CollectionSubCollectionEligibility➕ AddedOBJECT

Whether a collection can be referenced as a sub-collection target by another collection's source. Use this to surface ineligible targets up front (with reasons).

Fields: exclusion, inclusion
🏗️CollectionSubCollectionEligibilityState➕ AddedOBJECT

Whether a collection is eligible for one role (inclusion or exclusion) in a sub-collection relationship, plus the reason it isn't if applicable.

Fields: eligible, ineligibleReason
📥PackageInfoInput➕ AddedINPUT_OBJECT

The input fields for package information for the shipping label. Exactly one of custom_package or carrier_package must be provided.

📥PreferredRateSelectionInput➕ AddedINPUT_OBJECT

The input fields for selecting a preferred shipping rate by carrier and service codes.

📥ShippingCarrierPackageInput➕ AddedINPUT_OBJECT

The input fields for a carrier defined shipping package that are used to pack a shipment.

📋ShippingDocumentType➕ AddedENUM

Types of shipping documents.

Values: LABEL, CUSTOMS_FORM
📋ShippingEnumsFileFormat➕ AddedENUM

File format for label.

Values: PDF, ZPL
🏗️ShippingLabel➕ AddedOBJECT

The optional shipping label for this fulfillment.

Fields: cancellable, id, location, printed, shippingDocuments ... +1 more
📥ShippingLabelPurchaseCustomPackageInput➕ AddedINPUT_OBJECT

The input fields for a custom package for label purchase.

🏗️ShippingLabelPurchaseError➕ AddedOBJECT

The shipping label purchase processing failure.

Fields: code, field, message
📋ShippingLabelPurchaseErrorCode➕ AddedENUM

Possible error codes that can be returned by ShippingLabelPurchaseError.

Values: JOB_NOT_ENQUEUED, PURCHASE_IN_PROGRESS, PURCHASE_LABEL_VALIDATION_ERROR, KILL_SWITCH, CARRIER_NOT_AVAILABLE, DISABLED_SHIPPING_ACCOUNT, CONNECTION_ERROR, TRANSIENT_ERROR ... +2 more
📥ShippingLabelPurchaseInput➕ AddedINPUT_OBJECT

The input fields for a shipping label input for purchase.

🏗️ShippingLabelPurchasePayload➕ AddedOBJECT

Return type for shippingLabelPurchase mutation.

Fields: shippingLabelPurchaseResult, userErrors
🏗️ShippingLabelPurchaseResult➕ AddedOBJECT

A result object that tracks the progress of a shipping label purchase request.

Fields: done, errors, id, shippingLabels, status
📋ShippingLabelPurchaseResultStatus➕ AddedENUM

The status of a shipping label purchase result.

Values: PENDING_PURCHASE, PURCHASE_FAILED, PURCHASED
🏗️ShippingLabelPurchaseUserError➕ AddedOBJECT

An error that occurs during the execution of ShippingLabelPurchase.

Fields: code, field, message
📋ShippingLabelPurchaseUserErrorCode➕ AddedENUM

Possible error codes that can be returned by ShippingLabelPurchaseUserError.

Values: NOT_FOUND, TOTAL_WEIGHT_ZERO, SHIPPING_DATE_IN_THE_PAST, MISSING_SHIPPING_RATE, MISSING_SHIPPING_DATE, MISSING_INSURANCE_COVERAGE_AMOUNT, MISSING_INSURANCE_COVERAGE_CURRENCY, INVALID_PACKAGE_DIMENSIONS ... +10 more
🏗️ShippingObjectsShippingDocument➕ AddedOBJECT

Represents a shipping document.

Fields: documentType, format, printedAt, shippingLabelId, url
📋SubCollectionIneligibleReason➕ AddedENUM

Stable identifier for why a collection cannot be referenced as a sub-collection target.

Values: INVALID_COLLECTION_REFERENCE, SELF_REFERENCE, CHAIN_REFERENCE

➖ Removed Types (1)

📥CollectionLinkedSourceInput➖ RemovedINPUT_OBJECT

The input fields for linking an existing shareable source to a collection.

🔄 Modified Types (3)

🏗️Collection🔄 Modified
Field added: subCollectionEligibility

Whether this collection is eligible to be referenced as a sub-collection from
another collection's source. Returns one state per role (inclusion / exclusion).

Use this to filter ineligible targets up front and surface the reason.

🏗️Fulfillment🔄 Modified
Field added: shippingLabel

The optional shipping label for this fulfillment.

🏗️MailingAddress🔄 Modified
🔄 Field modified: validationResultSummary