Table of Contents |
---|
Common information
Webhook can be attached to one organization.
Create Webhook
Request
Code Block | ||||
---|---|---|---|---|
| ||||
curl -X POST https://integration.doo.net/v1/team/<team_id>/webhooks \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>' \
-H 'Authorization: Bearer <access_token>' \
-d '<add_webhook_object>' |
Parameters
...
Response example
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"response_status": 200,
"developer_message": "Success",
"user_message": "Success",
"data": "0f5566bb-d35b-11e7-bde8-0206116776d2", // created webhook group id
"_links": {
"self": {
"href": "https://integration.doo.net/v1/team/<team_id>/webhooks"
}
}
} |
Remove Webhook
Request
Code Block | ||||
---|---|---|---|---|
| ||||
curl -X DELETE https://integration.doo.net/v1/webhooks/<webhook_group_id> \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>' |
Parameters
...
List your Webhooks
Request
Code Block | ||||
---|---|---|---|---|
| ||||
curl -X GET https://integration.doo.net/v1/team/<team_id>/webhooks \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>' \
-H 'Authorization: Bearer <access_token>' |
Parameters
...
Response example
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{
"_links": {
"self": {
"href": "https://integration.doo.net/team/<team_id>/webhooks?page=1"
},
"first": {
"href": "https://integration.doo.net/team/<team_id>/webhooks"
},
"last": {
"href": "https://integration.doo.net/team/<team_id>/webhooks?page=1"
}
},
"_embedded": {
"webhooks": [
{
"id": "38cc7e8d-d107-11e7-bde8-0206116776d1",
"name": "My Test Webhook",
"description": "Webhook for testing all the hook types",
"hooks": [
{
"type": "event_created",
"method": "POST",
"endpoint": "https://requestb.in/123"
},
{
"type": "event_removed",
"method": "POST",
"endpoint": "https://requestb.in/123"
},
{
"type": "event_updated",
"method": "POST",
"endpoint": "https://requestb.in/123"
},
{
"type": "order_created",
"method": "POST",
"endpoint": "https://requestb.in/123"
},
{
"type": "order_removed",
"method": "POST",
"endpoint": "https://requestb.in/123"
},
{
"type": "order_updated",
"method": "POST",
"endpoint": "https://requestb.in/123"
},
{
"type": "order_cancelled",
"method": "POST",
"endpoint": "https://requestb.in/123"
}
],
"authentication": {
"grant_type": "client_credentials",
"endpoint": "https://requestb.in/123",
"credentials": {
"client_id": "doo",
"client_secret": "super-strong-secret"
},
"header_format": "Authorization",
"header_value_format": "Bearer %ACCESS_TOKEN%"
},
"_links": {
"self": {
"href": "https://api.doo.net/v1/webhooks/38cc7e8d-d107-11e7-bde8-0206116776d1"
}
}
}
]
},
"page_count": 1,
"page_size": 25,
"total_items": 5,
"page": 1
} |
...
Request
Code Block | ||||
---|---|---|---|---|
| ||||
curl -X Get https://integration.doo.net/v1/organizers/current/organizations \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>' \
-H 'Authorization: Bearer <access_token>' |
Parameters
...
Response example
...
language | js |
---|---|
title | JSON |
collapse | true |
...
With Webhook Management API, you can create, update and delete your webhook subscriptions and make some related operations.
On the sub-pages, you can find all the available API requests for webhook management.