Get list of webhooks.
GET /admin/api/ecommerce/v1/webhooks
Example response:
Status: 200 OK
[
{
"id": 1,
"enabled": true,
"target": "order",
"event": "create",
"url": "http://my.endpoint/order_created",
"created_at": "2020-04-15T15:48:05.000Z",
"updated_at": "2020-04-20T16:27:01.000Z"
}
]
Read more about filters.
webhook
attributes: id
, enabled
, target
, event
, url
, created_at
,
updated_at
.GET /admin/api/ecommerce/v1/webhooks/1
Example request:
GET http://helloworld.voog.com/admin/api/ecommerce/v1/webhooks/1
Example response:
Status: 200 OK
{
"id": 1,
"enabled": true,
"target": "order",
"event": "create",
"url": "http://my.endpoint/order_created",
"created_at": "2020-04-15T15:48:05.000Z",
"updated_at": "2020-04-20T16:27:01.000Z"
}
POST /admin/api/ecommerce/v1/webhooks
Example data:
{
"target": "order",
"event": "create",
"url": "http://my.endpoint/order_created"
}
Example response:
Status: 201 Created
{
"id": 1,
"enabled": true,
"target": "order",
"event": "create",
"url": "http://my.endpoint/order_created",
"created_at": "2020-04-15T15:48:05.000Z",
"updated_at": "2020-04-20T16:27:01.000Z"
}
enabled
— Flag switching the webhook on or off, true
by default.target
— Webhook target object, currently only order
is supported.event
— Event triggering the webhook, one of create
, update
, delete
.url
— A valid HTTP(S) endpoint.PUT /admin/api/ecommerce/v1/webhooks/1
This request updates the webhook with the provided attributes.
Example request:
PUT http://helloworld.voog.com/admin/api/ecommerce/v1/webhooks/1
Example data:
{
"target": "order",
"event": "create"
}
Example response:
Status: 200 OK
{
"id": 1,
"enabled": true,
"target": "order",
"event": "create",
"url": "http://my.endpoint/order_created",
"created_at": "2020-04-15T15:48:05.000Z",
"updated_at": "2020-04-20T16:27:01.000Z"
}
enabled
— Flag switching the webhook on or off, true
by default.target
— Webhook target object, currently only order
is supported.event
— Event triggering the webhook, one of create
, update
, delete
.url
— A valid HTTP(S) endpoint.DELETE /admin/api/ecommerce/v1/webhooks/1
This request deletes the given webhook.
Example request:
DELETE http://helloworld.voog.com/admin/api/ecommerce/v1/webhooks/1
Example response:
Status: 204 No Content