stack

Home > @infiniteobjects/shopify-data-manager > AdminTypes > WebhookSubscription

AdminTypes.WebhookSubscription interface

A webhook subscription is a persisted data object created by an app using the REST Admin API or GraphQL Admin API. It describes the topic that the app wants to receive, and a destination where Shopify should send webhooks of the specified topic. When an event for a given topic occurs, the webhook subscription sends a relevant payload to the destination. Learn more about the [webhooks system](https://shopify.dev/apps/webhooks).

Signature:

export interface WebhookSubscription extends LegacyInteroperability, Node 

Extends: LegacyInteroperability, Node

Properties

Property Modifiers Type Description
apiVersion   ApiVersion The Admin API version that Shopify uses to serialize webhook events. This value is inherited from the app that created the webhook subscription.
callbackUrl   Scalars[‘URL’][‘output’] The destination URI to which the webhook subscription will send a message when an event occurs.
createdAt   Scalars[‘DateTime’][‘output’] The date and time when the webhook subscription was created.
endpoint   WebhookSubscriptionEndpoint The endpoint to which the webhook subscription will send events.
format   WebhookSubscriptionFormat | `${WebhookSubscriptionFormat}` The format in which the webhook subscription should send the data.
id   Scalars[‘ID’][‘output’] A globally-unique ID.
includeFields   Array<Scalars[‘String’][‘output’]> An optional array of top-level resource fields that should be serialized and sent in the webhook message. If null, then all fields will be sent.
legacyResourceId   Scalars[‘UnsignedInt64’][‘output’] The ID of the corresponding resource in the REST Admin API.
metafieldNamespaces   Array<Scalars[‘String’][‘output’]> The list of namespaces for any metafields that should be included in the webhook subscription.
privateMetafieldNamespaces   Array<Scalars[‘String’][‘output’]> The list of namespaces for private metafields that should be included in the webhook subscription.
topic   WebhookSubscriptionTopic | `${WebhookSubscriptionTopic}` The type of event that triggers the webhook. The topic determines when the webhook subscription sends a webhook, as well as what class of data object that webhook contains.
updatedAt   Scalars[‘DateTime’][‘output’] The date and time when the webhook subscription was updated.