Skip to main content
object

Anchor to fetchCustomDataTokenForUserfetchCustomDataTokenForUser
•FetchCustomDataTokenForUserPayload

Fetch an OAuth Access and Refresh Token pair for the Shop Users API to read or write metafields after user's presence interaction ends.

If a user has used Sign in with Shop with your App client, you may retreive tokens to read / write your own metafields on a user.

Arguments

•String!
required

The email of the buyer for whom you need an Access token.

•String

Private to Shopify Internal clients. Allows a storefront to be passed in by its myshopify domain.


•FetchTokensForUserPayload

Fetch an OAuth Access and Refresh Token pair for a user. Exactly one of publicId or consentToken must be provided.

When publicId is provided, the user's existing connection with the client is verified and tokens are issued for the consented scope.

When consentToken is provided — a signed JWT from a Sign in with Shop flow granting delegated consent from a merchant's buyer connection to this partner — the token is verified, a delegated user connection is established, and tokens are issued for the delegated scope.

Arguments

•String

Signed JWT consent token from a Sign in with Shop flow granting delegated access. Required when not providing a public ID.

•String

The public ID of the user. Required when not providing a consent token.


•MediaCreatePayload

Create a new shop video with related products.

Arguments

•MediaCreateInput!
required

•MediaDeletePayload

Delete a shop video (soft delete).

Arguments

•ID!
required

The video ID in GID format (e.g., gid://shopapp/ShopVideo/ea9088eb-9a19-45b8-9d2c-5ca2b8ae13d1).


•MediaUpdatePayload

Update an existing shop video.

Arguments

•MediaUpdateInput!
required

Anchor to metafieldAccessGrantmetafieldAccessGrant
•MetafieldAccessGrantPayload

Share a Metafield Primitive with a Client or Namespace. Requires the 'share_metafield' client scope and requires that the Client making the request has Admin permission on the Resource.

Arguments

•CustomDataAccessInput!
required

Update the default permission of the resource and/or provide a list of targets to give access to the resource.

•CustomDataKeyPairInput!
required

Key and namespace pair that together form the path to the resource. Key is required, Namespace defaults to the Client's implicit, reserved namespace if not provided.

•String

Use 'key' to provide a new key for the target when sharing, if desired. Only changes the key for the newly shared resource within the grantee's reserved namespace, not the grantor's.


Anchor to metafieldAccessRevokemetafieldAccessRevoke
•MetafieldAccessRevokePayload

Revoke shared access between a Metafield Primitive and a Client or Namespace for Primitives of which your Client is an Admin.

Arguments

•CustomDataKeyPairInput!
required

Key and namespace pair that together form the path to the resource. Key is required, Namespace defaults to the Client's implicit, reserved namespace if not provided.

•[TargetInput!]!
required

A list of targets for whom to revoke access from the given resource.


Anchor to metafieldDefinitionCreatemetafieldDefinitionCreate
•MetafieldDefinitionCreatePayload

Create a new MetafieldDefinition.

Arguments

•MetafieldDefinitionCreateInput!
required

Anchor to metafieldDefinitionDeletemetafieldDefinitionDelete
•MetafieldDefinitionDeletePayload

Remove a MetafieldDefinition and cascade delete all associated Metafields.

Arguments

•CustomDataKeyPairInput!
required

This argument accepts an object that consists of a key and an optional namespace. The key is a mandatory attribute that represents a specific element within a namespace. The namespace attribute, if provided, should be a period-delimited string representing the hierarchical path to the desired definition. This is applicable in cases where the desired definition is nested within namespaces. In the absence of a provided namespace, the system will default to the client's implicit, reserved namespace.


Anchor to metafieldDefinitionUpdatemetafieldDefinitionUpdate
•MetafieldDefinitionUpdatePayload

Update a MetafieldDefinition by changing its key, name, description, capabilities, or access.

Arguments

•MetafieldDefinitionUpdateInput!
required

Anchor to metafieldNamespaceCreatemetafieldNamespaceCreate
•MetafieldNamespaceCreatePayload

Create a new MetafieldNamespace.

Every client has their own implicit, reserved namespace; however, Namespaces allow sharing groups of Metafield Primitives and Access Grants together. Creating new Namespaces requires the client to have additional scope and is not available to all clients.

Arguments

•MetafieldNamespaceCreateInput!
required

Anchor to metafieldNamespaceDeletemetafieldNamespaceDelete
•MetafieldNamespaceDeletePayload

Destroy a Namespace and remove any shared Access. MetafieldDefinitions shared to the Namespace will not be deleted, but their association with the namespace will be removed.

Arguments

•CustomDataKeyPairInput!
required

This argument accepts an object that consists of a key and an optional namespace. The key is a mandatory attribute that represents a specific element within a namespace. The namespace attribute, if provided, should be a period-delimited string representing the hierarchical path to the desired namespace. This is applicable in cases where the desired namespace is nested within other namespaces. In the absence of a provided namespace, the system will default to the client's implicit, reserved namespace.


Anchor to metafieldNamespaceUpdatemetafieldNamespaceUpdate
•MetafieldNamespaceUpdatePayload

Update a MetafieldNamespace by changing its key, name, description, capabilities, or access.

Arguments

•MetafieldNamespaceUpdateInput!
required

Anchor to standardMetafieldDefinitionEnablestandardMetafieldDefinitionEnable
•StandardMetafieldDefinitionEnablePayload

TK - Not implemented.

Arguments

•String!
required
•String!
required


Was this section helpful?