Employee Update Notification
WEBHOOK: POSThttps://<YOUR_WEBHOOK_URI> event_type: employee_management.update
Event indicating that an employee is updated i.e., whether the employee is created, updated or deleted
¶ Retry Attempts
If for some reason the Uber API cannot reach the webhook URL you specified either due to networking issues or application issues on your end, the webhooks service will retry to make a request.
We have implemented an exponential back-off algorithm with a back-off multiplier of 30 seconds which will make up to 7 attempts. This means we will attempt to request your webhook URL up to 7 times across roughly 1 hour.
¶ Webhook Headers
The Uber API will insert specialized headers for all requests made to your webhook URL to help your application utilize them appropriately.
Header | Description |
---|---|
X-Environment |
Indicates if this request is coming from the production or sandbox API. |
X-Uber-Signature |
SHA256 hash of the request body, computed using the app’s signing key as the key. |
¶ Webhook Security
Webhook messages are signed so that your app can verify that the sender is Uber. Webhooks requests contain an X-Uber-Signature
header. The value of this field is a hexadecimal HMAC signature of the webhook HTTP request body, using signing key of primary webhook url as a key and SHA256 as the hash function.
Python Example
digester = hmac.new(signing_key, webhook_body, hashlib.sha256)
return digester.hexdigest()
¶ Polling
For critical applications, we recommend complementing your webhook’s implementation with regular polling in case webhook notifications are lost.
¶ Webhook Event Structure
Name | Type | Description |
---|---|---|
event_type |
string |
The type of event that occurred. |
organization_id |
integer |
The unique identifier of the organization. |
employee_email |
string |
The updated employee’s email address. |
mobile_country_code |
string |
The mobile country code of employee contact number |
mobile_number |
string |
Contact number of the employee |
update_type |
string |
The type of update. Possible values include CREATED/ UPDATED / DELETED |
webhook_meta |
object |
The object containing additional information that is specific to the webhook . |
webhook_meta.client_id |
string |
Client ID for the developer |
webhook_meta.webhook_config_id |
string |
Unique identifier of the webhook type. |
webhook_meta.webhook_msg_timestamp |
integer |
Unix timestamp of the time the webhook event was pushed. |
webhook_meta.webhook_msg_uuid |
string |
Unique identifier, which can be used to ensure that the webhooks are digested only once. |
¶ Example Webhook
{
"employee_email": "email@domain.com",
"event_type": "employee_management.update",
"mobile_country_code": "+91",
"mobile_number": "9382834845",
"organization_id": "9d9c43c2-50f3-4c2a-bd75-d866c1869a4d",
"update_type": "UPDATED",
"webhook_meta": {
"client_id": "uDfYYQXG8GKuc47JVIuwtyspOB_U4B",
"webhook_config_id": "employee-management.ep-u4b-employee-updated-wh",
"webhook_msg_timestamp": 1663215066,
"webhook_msg_uuid": "b52ff614-3400-49e5-821f-bab5ea05bbf1"
}
}