webhooks

Update a webhook

Changed on

Update a webhook

patch/webhooks/{webhookId}

Request

  • Base URL
    https://{your_organization_slug}.commercelayer.io/api
  • URL
    https://{your_organization_slug}.commercelayer.io/api/webhooks/{webhookId}
  • Auth
    HTTP bearer

Path parameters

webhookIdstring required

The resource's id

Request body

Example request

{
  "data": {
    "id": "XAyRWNUzyN",
    "attributes": {
      "name": "myorg-orders.place",
      "topic": "orders.place",
      "callback_url": "https://yourapp.com/webhooks",
      "include_resources": [
        "customer",
        "shipping_address",
        "billing_address"
      ],
      "_disable": true,
      "_enable": true,
      "_reset_circuit": true,
      "_regenerate_shared_secret": true,
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      }
    }
  }
}

Response

The updated webhook object

Changes

    • breaking

      request property / was restricted to a list of enum values

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      added the new optional request property //

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property default value webhooks was removed

    • info

      added the new webhooks enum value to the request property /

    • info

      added the media type application/vnd.api+json for the response with the status