Subscribe

webhooks enables you to get updates on changes, without the need to poll the Gett business API.

What's a webhook?

A webhook is an endpoint that you set up on a publicly accessible server you control. After registering that endpoint with Gett, Gett will then make HTTP POST requests to it when certain events occur. The POST body will be sent as JSON, in the following format:

📘

Subscribing to webhooks allows you to track changes in the reports in real-time.

Request

Resource urlhttps://business-api.gett.com/v1/subscribers?businessId=<companyUUID>
businessidstringCompany UUID identificator obtained from Gett in registration process
event_typesstringfrom_list
"status_changed"
"business_report"
hook_addressstringvalid url of endpoint to receive updates.
curl --request POST \
  --url 'https://business-api.gett.com/v1/subscribers?businessId=[company_uuid]' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer [token]' \
  --header 'Content-Type: application/json' \
  --data '{"hook_address":"https://host/endpoint","event_types":"business_report"}'

Response

NameTypeDesc.
idstringsubscriber id.
hook_addressstringvalid url of endpoint to receive updates.
event_typesobjectlist of event types in hook
event_types[].event_typestringevent type
business_idsobjectlist of business id's
business_ids[].business_idstringbusiness id relevant to event
secret_idstringuuid verification token used to validate that request was sent from Gett.
created_atstringRFC 3339 date. states when subscription has been created.
updated_atstringRFC 3339 date. states when subscription has been updated.
{
    "id": "e3982=-b3d798e89fcb",
    "hook_address": "https://host/endpoint",
    "event_types": [
        {
            "event_type": "business_report"
        }
    ],
    "business_ids": [
        {
            "business_id": "6AA6CF-gegege-fgfgf-ghghg06"
        }
    ],
    "secret_id": "bf53-b973-0fd890f2b39c",
    "created_at": "2021-05-09T16:33:48.518547841Z",
    "updated_at": "2021-05-09T16:33:48.518547841Z"
}

What’s Next