Update a webhook
How to update an existing webhook via API
Last updated
How to update an existing webhook via API
Last updated
curl -g -X PATCH \
'https://yourdomain.commercelayer.io/api/webhooks/XAyRWNUzyN' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer your-access-token' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "webhooks",
"id": "xYZkjABcde",
"attributes": {
"include_resources": [
"customer",
"shipping_address",
"billing_address"
]
}
}
}'{
"data": {
"id": "XAyRWNUzyN",
"type": "webhooks",
"links": {
"self": "https://yourdomain.commercelayer.io/api/webhooks/XAyRWNUzyN"
},
"attributes": {
"name": "myorg-orders.place",
"topic": "orders.place",
"callback_url": "https://yourapp.com/webhooks",
"include_resources": [
"customer",
"shipping_address",
"billing_address"
],
"disabled_at": "2018-01-01T12:00:00.000Z",
"shared_secret": "1c0994cc4e996e8c6ee56a2198f66f3c",
"created_at": "2018-01-01T12:00:00.000Z",
"updated_at": "2018-01-01T12:00:00.000Z",
"reference": "ANY-EXTERNAL-REFEFERNCE",
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
"metadata": {
"foo": "bar"
}
},
"relationships": {
"last_event_callbacks": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/webhooks/XAyRWNUzyN/relationships/last_event_callbacks",
"related": "https://yourdomain.commercelayer.io/api/webhooks/XAyRWNUzyN/last_event_callbacks"
}
},
"versions": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/webhooks/XAyRWNUzyN/relationships/versions",
"related": "https://yourdomain.commercelayer.io/api/webhooks/XAyRWNUzyN/versions"
}
},
"event_stores": {
"links": {
"self": "https://yourdomain.commercelayer.io/api/webhooks/XAyRWNUzyN/relationships/event_stores",
"related": "https://yourdomain.commercelayer.io/api/webhooks/XAyRWNUzyN/event_stores"
}
}
},
"meta": {
"mode": "test",
"organization_id": "xRRkjDFafe",
"trace_id": "69abaa3545913c78132e5578bd26208d44aa9043647d78698fd0021f3958cd74"
}
}
}