Versions Compared

Key

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

...

Code Block
languagebash
curl -X POST 'https://rest.doo.net/v1/webhooks/init/<resource_name>' \
-H 'Content-Type: application/json' \
-H 'x-api-key: <api_key>' \
-H 'Authorization: Bearer <access_token>' \
-d '{
  "event_id": <event_id>,
  "organization_id": <organization_id>,
  "last_updated_after": "<last_updated_after>",
  "last_updated_before": "<last_updated_before>",
  "webhook_type": ["<webhook_type>", "<webhook_type>", ...],
  "webhook_configuration_id": "<webhook_configuration_id>",
  "max_rate_per_min": <max_rate_per_min>
}'

Parameters

Parameter

Required

Description

<resource_name>

Yes

The resource you want to initialize.

See Supported resources and webhook types for available resource names.

<api_key>

Yes

See Authorization

<access_token>

Yes

See Authorization

<event_id>

Yes, only for the following resources:

  • orders

  • attendees

  • invitees

<organization_id>

Yes, only for the following resources:

  • events

  • contacts

<last_updated_after>

No

Use it if you want to initialize resources updated after a particular date and time.

Format: Y-m-d H:i:s (example: 2021-03-25 09:00:00)

Timezone: CET

<last_updated_before>

No

Use it if you want to initialize resources updated before a particular date and time.

Format: Y-m-d H:i:s (example: 2021-03-25 16:00:00)

Timezone: CET

<webhook_type>

No

Use it if you want to initialize only particular webhook types.

If not specified, all webhook types for the specified resource will be initialized.

See Supported resources and webhook types for available webhook types for the selected resource.

<webhook_configuration_id>

No

In case you have multiple webhook configurations, you can specify the one for which you want to make the initialization.

If not specified, all the existing webhook configurations will be initialized.

See List webhook configurations to get the Webhook Configuration ID.

max_rate_per_min

No

Specifies the maximum number of requests per minute that we send for the webhook initialization.

You can use this parameter to reduce the load to your system if required.

Default value: 100

Minimum value: 1

Maximum value: 100

Response example

Code Block
languagejson
{
    "response_status": 200,
    "developer_message": "Success",
    "user_message": "Success",
    "items_processed": <items_processed_count>,
    "_links": {
        "self": {
            "href": "https://rest.doo.net/v1/webhooks/init/<resource_name>"
        }
    }
}

PC Team easy Guide:

To repush webhooks for 1 event use this:

open terminal and copy the edited code, press enter

Code Block
curl -X POST 'https://rest.doo.net/v1/webhooks/init/orders' \
-H 'Content-Type: application/json' \
-H 'x-api-key: doo-test-key-3306c337-4e00-43de-a63d-44c4fb122ea8' \
-H 'Authorization: Bearer <access_token>' \
-d '{
  "event_id": <EventID>,
   "webhook_configuration_id":"<webhook_id>"
}'

real Example:

Code Block
curl -X POST 'https://rest.doo.net/v1/webhooks/init/orders' \
-H 'Content-Type: application/json' \
-H 'x-api-key: doo-test-key-3306c337-4e00-43de-a63d-44c4fb122ea8' \
-H 'Authorization: Bearer acd9d531db1e30a8ba66555ed7830e066af1dde3' \
-d '{
  "event_id": 82032,
   "webhook_configuration_id":"eaf6e0e9-e116-0bbd-e121-b30716188331"
}'

How to get <access_token>:

  • go in doo manager app to your desired OID

  • open developer tool (Chrome & Firefox: F12 or fn+F12)

  • go to Network tab

  • select: Fetch/XHR

  • record network log and maybe clear once

    Image Added
  • click on a event or booking, does not matter, just do something in doo manager

  • in the network logs is_active should appear

  • click on is_active and check the Headers for “Request Headers”

  • scroll down and search for authorization: Bearer ...

    Image Added
  • the shown token is your <access_token>

How to get <EventID>:

  • this is just the EventID

How to get <webhook_id>:

  • go in doo manager app to your desired OID

  • go to DAT (https://dat.doo.net/auth/login )

  • login and double check if you are in the correct OID in DAT

  • go to Webhooks

  • you will see the <webhook_id>, if there are multiple webhook ids, choose the “correct” one that should be repushed

    Image Added