You are viewing a section of Superface that will be deprecated in Q4 2023. Until then, you can continue to use it as you have before but we recommend that you migrate to our latest version soon. For more details visit superface.ai/docs/migrate.
webhook-management/subscribe-webhook
webhook-management/subscribe-webhook@0.0.0
Create a new webhook subscription by specifying an address and a topic.
WebhookSubscription
Input
webhook
Result
webhook
Structure details
Input (object)
webhook
required
object
address
required
The address where the webhook should send the HTTP request.
string
topic
required
The event that triggers the webhook.
string
format
required
The format of the data that the webhook should send.
string
Example
Copied!
Result (object)
webhook
required
object
id
required
Unique numeric identifier for the webhook subscription.
number
address
required
Destination URI to which the webhook subscription should send the POST request when an event occurs.
string
topic
required
Event that triggers the webhook. You can retrieve data in either JSON or XML.
string
created_at
required
Date and time when the webhook subscription was created.
string
updated_at
required
Date and time when the webhook subscription was last modified.
string
format
required
Format in which the webhook subscription should send the data. Valid values are JSON and XML. Defaults to JSON.
string
fields
required
An optional array of top-level resource fields that should be serialized and sent in the POST request. If absent, all fields will be sent.
list
metafield_namespaces
required
Optional array of namespaces for any metafields that should be included with each webhook.
list
api_version
required
The Admin API version that Shopify uses to serialize webhook events. This value is inherited from the app that created the webhook subscription.
string
private_metafield_namespaces
required
Optional array of namespaces for any private metafields that should be included with each webhook.