Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Common information

Webhooks configurations will be attached to an entire organization with all its events. Event The payload of event and order webhooks will reference contain the event_id so you can decide which webhooks to process.

Create Webhook Configuration

Get access token

Information on how to get the access token is provided in the page API Authorization.

Request

Code Block
languagebash
titleCurl
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>'

...

ParameterRequiredDescription
<team_id>YesTeam ID for which you want to configure the webhooks, see Get all your organizations and teams 
<api_key>Yessee API Authorization
<access_token>Yessee API Authorization 
<add_webhook_object>Yessee AddWebhook Object (Use the default or GraphQL-based structure)

Response

...

Code Block
languagejs
titleJSON
collapsetrue
{
    "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"
        }
    }
}

...

Update Webhook

...

Request

Code Block
languagebash
titleCurl
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

...

Configuration

There is no dedicated request to update an existing webhook configuration, e.g. if you want to change the triggers or the payload.

Instead, do the following:

  1. List the existing webhook configurations
  2. Make the desired adjustments to the AddWebhook Object
  3. Create a new webhook configuration using the adjusted AddWebhook Object
  4. Remove the previous webhook configuration

Remove Webhook Configuration

Delete Request

Code Block
languagebash
titleCurl
curl -X GETDELETE https://integration.doo.net/v1/teamwebhooks/<team<webhook_group_id>/webhooks \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>' \
-H 'Authorization: Bearer <access_token>'

Parameters

ParameterRequiredDescription
<team<webhook_group_id>YesTeam ID for which you want to retrieve the webhooks, see Get all your organizations and teamsthe webhook configuration, which you received in the response when generating it
<api_key>Yessee API Authorization<access_token>Yessee API Authorization 

Response

...

{
Code Block
languagejs
titleJSON
collapsetrue
bash
titleCurl
204 No Content
The server successfully processed the request, but is not returning any content

Steps to follow when deleting webhooks:

  1. List Webhook Configurations
  2. Pick the configuration you want to delete and execute Delete Request
  3. Double-check the deletion by listing the webhook configurations


Info

We do not give a confirmation on whether the webhook configuration has been deleted. This prevents brute-force attacks to know whether they have been successful.

List Webhook Configurations

Request

Code Block
languagebash
titleCurl
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

ParameterRequiredDescription
<team_id>YesTeam ID for which you want to retrieve the webhook configurations, see Get all your organizations and teams
<api_key>Yessee API Authorization
<access_token>Yessee API Authorization

Response

Response example 1

Code Block
languagejs
titleJSON
collapsetrue
{
    "_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",
                        "_linksmethod": { "POST",
                        "self": {endpoint": "https://requestb.in/123"
                    },
        "href": "https://integration.doo.net/team/<team_id>/webhooks?page=1"         },  {
      "first": {             "href": "https://integration.doo.net/team/<team_id>/webhooks"   "type": "order_updated",
    },         "last": {
            "hrefmethod": "https://integration.doo.net/team/<team_id>/webhooks?page=1"POST",
        }     },     "_embedded": {         "webhooks": ["endpoint": "https://requestb.in/123"
             {       },
         "id": "38cc7e8d-d107-11e7-bde8-0206116776d1",            {
    "name": "My Test Webhook",                 "descriptiontype": "Webhook for testing all the hook types",order_cancelled",
                        "hooksmethod": [ "POST",
                         {"endpoint": "https://requestb.in/123"
                    }
   "type": "event_created",            ],
            "method": "POST",   "authentication": {
                    "endpointgrant_type": "https://requestb.in/123"client_credentials",
                      }"endpoint": "https://requestb.in/123",
                    "credentials": {
                        "typeclient_id": "event_removeddoo",
                        "methodclient_secret": "POST",super-strong-secret"
                    },
           "endpoint": "https://requestb.in/123"        "header_format": "Authorization",
           },         "header_value_format": "Bearer %ACCESS_TOKEN%"
         {        },
                "type_links": "event_updated",{
                        "methodself": "POST",{
                        "endpointhref": "https://requestb.in/123api.doo.net/v1/webhooks/38cc7e8d-d107-11e7-bde8-0206116776d1"
                    },
                }
      {      }
        ]
    },
    "typepage_count": "order_created"1,
    "page_size": 25,
    "total_items": 5,
    "page": 1
}

Response example 2

Code Block
languagejs
titleJSON
collapsetrue
{
      "method"_links": "POST",{
                 "self": {
      "endpointhref": "https://requestb.in/123"
        api.staging1.doo.net/v1/team/<team_id>/webhooks?page=1"
    },
    "first": {
},      "href": "https://api.staging1.doo.net/v1/team/<team_id>/webhooks"
    },
    "last": {
  {    "href": "https://api.staging1.doo.net/v1/team/<team_id>/webhooks?page=1"
    }
  },
      "_embedded": {
    "typewebhooks": "order_removed",[
         {
              "method"id": "POST04266663-6684-a883-66b2-cfa3e7572d33",
        "name": "My      GraphQL Webhook",
        "endpointdescription": "https://requestb.in/123"
    Webhook for testing hook types with GraphQL body",
        "hooks": [
     },     {
            "type": "event_created_92bd9a53281981160c955e339304b3e5",
 {           "method": "POST",
            "typeendpoint": "order_updatedhttps://requestb.in/123",
            "origin": {
              "method": "POST",
     
                  "endpoint": "https://requestb.in/123"gql.doo.net",
                    },
                    {
 "body": "{\"operationName\":\"EventCreatedShort\",\"variables\":{\"id\":\"%EVENT_ID%\"},\"query\":\"query EventCreatedShort($id: ID!) {\\n event(id: $id) {\\n title\\n }\\n}\\n\"}"
            }
         "type": "order_cancelled" },
           {
            "methodtype": "POSTevent_updated_2104384af7e8434f0058ed57163b6f33",
            "method": "POST",
            "endpoint": "https://requestb.in/123",
                    }
                ],
 "origin": {
              "authenticationmethod": {
"POST",
                   "grant_type"endpoint": "client_credentialshttps://gql.doo.net",
                    "endpoint": "https://requestb.in/123",
             "body": "{\"operationName\":\"EventUpdatedShort\",\"variables\":{\"id\":\"%EVENT_ID%\"},\"query\":\"query EventUpdatedShort($id: ID!) {\\n event(id: $id) {\\n title\\n }\\n}\\n\"}"
      "credentials": {     }
          }
        "client_id": "doo"],
             "authentication": {
          "clientgrant_secrettype": "super-strong-secret"client_credentials",
            "endpoint": "https://requestb.in/123",
       },       "credentials": {
             "headerclient_formatid": "Authorizationdoo",
                    "header_value_format"client_secret": "Bearer %ACCESS_TOKEN%super-strong-secret"
          },
     },     "header_format": "Authorization",
          "header_value_linksformat": {
"Bearer %ACCESS_TOKEN%"
          },
        "self_links": {
          "self": {
            "href": "https://api.staging1.doo.net/v1/team/webhooks/38cc7e8d-d107-11e7-bde8-0206116776d1"
         <team_id>/webhooks"
          }

               }
            }
 
      ]
 
  },
 
  "page_count": 1,
 
  "page_size": 257,
 
  "total_items": 51,
 
  "page": 1
}

Get all your organizations and teams
Anchor
get-team
get-team

Request

Code Block
languagebash
titleCurl
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>'

...

ParameterRequiredDescription
<access_token>Yessee API Authorization
<api_key>Yessee API Authorization

Response

...

Code Block
languagejs
titleJSON
collapsetrue
{
    "organizations": [
        {
            "id": 1,
            "name": "Organization 1",
            "canEdit": true,
            "teams": [
                {
                    "id": 1,
                    "name": null,
                    "role": "team_admin"
                }
            ]
        },
        {
            "id": 2,
            "name": "Organization 2",
            "canEdit": true,
            "teams": [
                {
                    "id": 2,
                    "name": null,
                    "role": "team_admin"
                }
            ]
        }
    ],
    "active_team": {
        "permissions": [
            "Booking:View",
            "Booking:ViewDeleted",
            "Event:ViewSettings"
        ],
        "id": 1,
        "name": null,
        "organization_id": 1,
        "user_id": 123,
        "role": "team_admin",
        "is_all_events_team": true,
        "show_info_box": null,
        "user_count": null,
        "live_events_count": null
    },
    "_links": {
        "self": {
            "href": "https://integration.doo.net/v1/organizers/current/organizations"
        }
    }
}

...