Report Success Notification
WEBHOOK: POSThttps://<YOUR_WEBHOOK_URI> event_type: eats.report.success
This webhook is sent to notify you once a report job (generated via POST /eats/report) has completed. You can access the report data via the report_metadata.sections[]
fields.
Your service should return an HTTP 200
response code with an empty response body to acknowledge receipt of the webhook event. If Uber does not receive a 200 acknowledgement response, the webhook event will be resent based on an exponential backoff algorithm (i.e. starting at 1 second after the initial attempt, then 2 seconds, then 4 seconds etc.) until 7 total events were sent without a response.
¶ Webhook Headers
Uber will include security headers for all requests made to your webhook URL.
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, using the client secret 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 lowercased hexadecimal HMAC signature of the webhook HTTP request body, using the client secret as a key and SHA256 as the hash function.
Python Example
digester = hmac.new(client_secret, webhook_body, hashlib.sha256)
return digester.hexdigest()
¶ Webhook Event Structure
Name | Type | Description |
---|---|---|
event_type |
string (enum) |
The type of the event, e.g. eats.report.success . Always check this field as new event types may be added in the future without notice. |
event_id |
string |
Unique identifier for the webhook notifications. It’s possible that the same webhook notification might be sent multiple times if believe the first attempt failed. |
job_id |
string |
Unique identifier for consuming a report generation response. |
report_type |
string (enum) |
This will match the report type in your initial POST request and is provided for easier reference. See above for possible values. |
start_time_ms |
integer |
The time that the report generation job started processing. |
end_time_ms |
integer |
The time that the report generation job finished processing. |
report_metadata.sections[].section_id |
string |
Some reports are split into separate sections (or files). |
report_metadata.sections[].content_type |
string |
MIME-type of the report section, e.g. text/csv . |
report_metadata.sections[].download_url |
string |
Download URL of the report. |
¶ Example Webhook
{
"event_type": "eats.report.success",
"event_id": "4e469681-6efb-4a60-8ece-088b12d951e8_78a85c85-e89b-4e06-ba35-2d034fdc21a0",
"job_id": "4e469681-6efb-4a60-8ece-088b12d951e8_78a85c85-e89b-4e06-ba35-2d034fdc21a0",
"report_type": "PAYMENT_DETAILS_REPORT",
"start_time_ms": 1590969600000,
"end_time_ms": 1591055999000,
"report_metadata": {
"sections": [
{
"section_id": "78a85c85-e89b-4e06-ba35-2d034fdc21a0-united_states.csv",
"content_type": "text/csv",
"download_url": "https://tbs-static.uber.com/random-temporary-filename"
}
]
},
"webhook_meta": {...},
...
}