Versions Compared

Key

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

...

Code Block
languagebash
titleCurl
curl -X POST https://integrationrest.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)

...

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://integrationrest.doo.net/v1/team/<team_id>/webhooks"
        }
    }
}

...

Code Block
languagebash
titleCurl
curl -X DELETE https://integrationrest.doo.net/v1/webhooks/<webhook_group_id> \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>'

...

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

...

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

...

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

...

Code Block
languagejs
titleJSON
collapsetrue
{
    "_links": {
        "self": {
            "href": "https://integrationrest.doo.net/team/<team_id>/webhooks?page=1"
        },
        "first": {
            "href": "https://integrationrest.doo.net/team/<team_id>/webhooks"
        },
        "last": {
            "href": "https://integrationrest.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
}

...

Code Block
languagebash
titleCurl
curl -X Get https://integrationrest.doo.net/v1/organizers/current/organizations \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>' \
-H 'Authorization: Bearer <access_token>'

...

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://integrationrest.doo.net/v1/organizers/current/organizations"
        }
    }
}

...