Webhook initialization

 

For sending this request, you have to be authorized. See the https://viovendi.atlassian.net/wiki/spaces/API/pages/36929656 page for more details.

If you want to start using webhooks with your external system and already have some resources in your doo account, you may need to initialize your system with all these existing resources.

After you make the following API request, we will send a webhook request to your external system for each specified resource item that already exists in your doo account. For example, if you chose to initialize all the events from doo, we will send a separate webhook request for each existing event in your doo account.

We send a maximum of 50 initialization webhook requests per minute, so it may take some time if you want to initialize a lot of data.

Request

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

Parameter

Required

Description

<resource_name>

Yes

The resource you want to initialize.

See https://viovendi.atlassian.net/wiki/spaces/API/pages/2800549949 for available resource names.

<api_key>

Yes

See https://viovendi.atlassian.net/wiki/spaces/API/pages/36929656

<access_token>

Yes

See 

<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 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 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

{ "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>" } } }