Reports Webhooks
Sent when reports can be or have been generated.
#Ready
The reports.ready
webhook is sent when a verification report can be generated once sufficient data has been retrieved from a connected payroll account.
This webhooks is sent multiple times if the user connects multiple accounts. Each account is treated independently.
- The accounts.connected and accounts.failed webhooks can be used to track multiple account connections.
- Compare them to the accounts listed in the
reports.ready
webhook payload to determine when to generate a report.
- #eventsarray of stringsrequired
reports.ready
- #namestringrequired
Your name for the webhook subscription.
- #urlstringrequired
Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.
- #secretstringoptional
Optional secret used to verify webhooks.
1curl --request POST \
2 --url https://api.argyle.com/v2/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["reports.ready"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret"
10 }'
1{
2 "event": "reports.ready",
3 "name": "name-for-the-webhook-subscription",
4 "data": {
5 "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
6 "accounts": [
7 {
8 "id": "0185a8b8-60eb-80ca-7482-5f24504573f7",
9 "last_synced_at": "2024-01-08T12:55:04.016059Z"
10 },
11 {
12 "id": "0187c66e-e7e5-811c-b006-2232f00f426a",
13 "last_synced_at": "2024-01-08T12:58:06.023659Z"
14 }
15 ]
16 }
17}
#Generated
The reports.generated
webhook is sent when a report has been successfully generated and can be retrieved.
- #eventsarray of stringsrequired
reports.generated
- #namestringrequired
Your name for the webhook subscription.
- #urlstringrequired
Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.
- #secretstringoptional
Optional secret used to verify webhooks.
1curl --request POST \
2 --url https://api.argyle.com/v2/webhooks \
3 --header 'accept: application/json' \
4 --header 'content-type: application/json' \
5 --data '{
6 "events": ["reports.generated"],
7 "name": "name-for-the-webhook-subscription",
8 "url": "https://your-webhook-backend.com",
9 "secret": "optional-secret"
10 }'
1{
2 "event": "reports.generated",
3 "name": "name-for-the-webhook-subscription",
4 "data": {
5 "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
6 "type": "voie",
7 "report_id": "43a2c6c3-1e63-91e5-88e3-f9ab2dcc489b"
8 }
9}