latestOpenAPI 3.0.12026-08-101292701.1 MB

f21981db32be

Webhooks

Creates a new webhook

Creates a new webhook

post/webhooks

Request body

typesstring[]
apiVersion'default' | '<YYYY-MM-DD>'

Indicates whether to use the current, default version of the API or the version specified by YYYY-MM-DD.

enabledboolean

Indicates whether the webhook is enabled and receives notifications.

addressstring required

URL of the webhook endpoint on your server you have set up to receive webhook notifications. Webhook data is sent as JSON in the POST request body. The full event details are included and can be used directly, after parsing the JSON into an Event object.

transportType'HTTP' | 'OAUTH'

Example request

{
  "types": [
    "order.created"
  ],
  "apiVersion": "default",
  "enabled": true,
  "address": "https://company.com"
}

Response

201 Created

idstring uuid
createdTimestring date-time

Time at which the webhook was created

updatedTimestring date-time

Time at which the webhook was updated

typesstring[]
apiVersion'default' | '<YYYY-MM-DD>'

Indicates whether the webhook is configured for the current, default version of the API or the version specified by YYYY-MM-DD.

enabledboolean

Indicate that webhook is enabled and receives notifications or is not enabled and does not receive notifications

addressstring

URL of the webhook endpoint on your server you have set up to receive webhook notifications. Webhook data is sent as JSON in the POST request body. The full event details are included and can be used directly, after parsing the JSON into an Event object.

transportType'HTTP' | 'OAUTH'

Example response

{
  "createdTime": "2018-08-29T09:12:33.001Z",
  "updatedTime": "2018-08-29T09:12:33.001Z",
  "types": [
    "order.created"
  ],
  "apiVersion": "default",
  "enabled": true,
  "address": "https://company.com"
}