Add Order Attribution API, Refine FileDelete, Add Enums

6/4/2026, 12:00:50 AM

Apps can now list, create, update, or delete order attribution definitions via new query and mutations; definitions contain displayName, handle, optional icon, and support merging on upsert. The orderAttributionDefinitionDelete mutation preserves existing orders while removing the definition; the upsert mutation accepts an input that creates or merges definitions and can clear the icon by passing null. The FileDelete mutation now accepts a nullable list of IDs (previously non‑null list of non‑null IDs) to delete files. New enum values INVALID_METAFIELDS were added to InventoryTransfer error codes, and the MetafieldOwnerType enum now includes TRANSFER. WebhookSubscriptionTopic added two new topics: SHIPPING_LABEL_CANCEL and INVENTORY_TRANSFERS_UPDATED. Minor updates: resourcePublicationsV2 fields for Product, Collection, etc. now clarify default catalog type APP; DraftOrderDiscountNotAppliedWarning.priceRule is deprecated; and several field descriptions have been corrected or re‑ordered.

Query Changes

➕ Added Queries (1)

orderAttributionDefinitions

Returns approved order attribution definitions for the calling app on the current shop.

Mutation Changes

➕ Added Mutations (2)

orderAttributionDefinitionDelete

Deletes an order attribution definition for the calling app on the current shop. Existing orders
attributed to this definition are preserved.

orderAttributionDefinitionUpsert

Upserts an order attribution definition for the calling app on the current shop. Apps can use
attribution definitions to label orders they route to a shop, replacing or augmenting any definitions
shipped declaratively via the order_attribution_config extension.

If a definition with the same handle exists for this app on the shop, the supplied input fields are
merged onto it; fields omitted from the input are left unchanged. Otherwise a new definition is
created. To explicitly clear the stored icon on an existing definition, pass icon: null.

🔄 Modified Mutations (1)

fileDelete

Deletes file assets that were previously uploaded to your store.

Use the fileDelete mutation to permanently remove media and file assets from your store when they are no longer needed.
This mutation handles the complete removal of files from both your store's file library and any associated references
to products or other resources.

The fileDelete mutation supports removal of multiple file types:

  • Images: Product photos, variant images, and general store imagery
  • Videos: Shopify-hosted videos for product demonstrations and marketing content
  • External Videos: YouTube and Vimeo videos linked to your products
  • 3D models: Interactive 3D representations of products
  • Generic files: PDFs, documents, and other file types stored in your
    Files page

When you delete files that are referenced by products, the mutation automatically removes those references and
reorders any remaining media to maintain proper positioning. Product file references are database relationships
managed through a media reference system, not just links in product descriptions. The Shopify admin provides a UI
to manage these relationships, and when files are deleted, the system automatically cleans up all references.
Files that are currently being processed by other operations are rejected to prevent conflicts.

Caution:
File deletion is permanent and can't be undone. When you delete a file that's being used in your store,
it will immediately stop appearing wherever it was displayed. For example, if you delete a product image,
that product will show a broken image or placeholder on your storefront and in the admin. The same applies
to any other files linked from themes, blog posts, or pages. Before deleting files, you can use the
files query to list and review
your store's file assets.

Learn how to manage
product media and file assets
in your app.

~ Modified argument: fileIds

Type Changes

➕ Added Types (10)

🏗️OrderAttributionDefinition➕ AddedOBJECT

An attribution definition that an app can use to label orders it routes to a shop.
Definitions can be supplied declaratively via the order_attribution_config extension or created
dynamically per-shop via the Admin API.

Fields: displayName, handle, icon, id
🏗️OrderAttributionDefinitionConnection➕ AddedOBJECT

An auto-generated type for paginating through multiple OrderAttributionDefinitions.

Fields: edges, nodes, pageInfo
🏗️OrderAttributionDefinitionDeletePayload➕ AddedOBJECT

Return type for orderAttributionDefinitionDelete mutation.

Fields: deletedId, userErrors
🏗️OrderAttributionDefinitionDeleteUserError➕ AddedOBJECT

An error that occurs during the execution of OrderAttributionDefinitionDelete.

Fields: code, field, message
📋OrderAttributionDefinitionDeleteUserErrorCode➕ AddedENUM

Possible error codes that can be returned by OrderAttributionDefinitionDeleteUserError.

Values: INVALID, NOT_FOUND
🏗️OrderAttributionDefinitionEdge➕ AddedOBJECT

An auto-generated type which holds one OrderAttributionDefinition and a cursor during pagination.

Fields: cursor, node
📥OrderAttributionDefinitionUpsertInput➕ AddedINPUT_OBJECT

The input fields for upserting an order attribution definition.

🏗️OrderAttributionDefinitionUpsertPayload➕ AddedOBJECT

Return type for orderAttributionDefinitionUpsert mutation.

Fields: orderAttributionDefinition, userErrors
🏗️OrderAttributionDefinitionUpsertUserError➕ AddedOBJECT

An error that occurs during the execution of OrderAttributionDefinitionUpsert.

Fields: code, field, message
📋OrderAttributionDefinitionUpsertUserErrorCode➕ AddedENUM

Possible error codes that can be returned by OrderAttributionDefinitionUpsertUserError.

Values: INVALID

🔄 Modified Types (13)

🏗️AbandonedCheckout🔄 Modified
🔄 Field modified: billingAddress
🔄 Field modified: completedAt
🔄 Field modified: shippingAddress
🏗️Collection🔄 Modified
🔄 Field modified: resourcePublicationsV2
🏗️CompanyContactRole🔄 Modified
🔄 Field modified: name
🏗️DeliveryLocationGroup🔄 Modified
🔄 Field modified: locations
🏗️DraftOrderDiscountNotAppliedWarning🔄 Modified
🔄 Field modified: priceRule
🏗️InventoryTransferCreateAsReadyToShipUserErrorCode🔄 Modified
Enum value added: INVALID_METAFIELDS
🏗️InventoryTransferCreateUserErrorCode🔄 Modified
Enum value added: INVALID_METAFIELDS
🏗️InventoryTransferEditUserErrorCode🔄 Modified
Enum value added: INVALID_METAFIELDS
🏗️MetafieldOwnerType🔄 Modified
Enum value added: TRANSFER
🏗️Product🔄 Modified
🔄 Field modified: resourcePublicationsV2
🏗️ProductVariant🔄 Modified
🔄 Field modified: resourcePublicationsV2
🏗️Publishable🔄 Modified
🔄 Field modified: resourcePublicationsV2
🏗️WebhookSubscriptionTopic🔄 Modified
Enum value added: SHIPPING_LABEL_CANCEL
Enum value added: INVENTORY_TRANSFERS_UPDATED