Skip to main content

Ready

POST /v2/webhooks The reports.ready webhook is sent when a verification report can be generated once sufficient data has been retrieved from a connected payroll account. The reports.ready webhook is also sent after an account reconnection once all new data has been retrieved.
This webhooks may be sent multiple times if the user connects multiple accounts.
  • 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.

Request body

  • events (array of strings, required): reports.ready
  • name (string, required): Your name for the webhook subscription.
  • url (string, required): 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.
  • secret (string, optional): Optional secret used to verify webhooks.

Webhook message

  • event (string): reports.ready
  • name (string): Name used for the webhook subscription.
  • data (object)
  • user (string (uuid)): ID of the user.
  • external_id (string): The external_id of the user, otherwise null.
  • accounts (array of objects)
    • id (string (uuid)): ID of the account.
    • last_synced_at (string (date-time)): Timestamp (ISO 8601) when the account was last scanned for new data.
curl --request POST \\
--url https://api-sandbox.argyle.com/v2/webhooks \\
--header 'accept: application/json' \\
--header 'content-type: application/json' \\
--data '{
"events": ["reports.ready"],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret"
}'
{
  "event": "reports.ready",
  "name": "name-for-the-webhook-subscription",
  "data": {
    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
    "external_id": null,
    "accounts": [
      {
        "id": "0185a8b8-60eb-80ca-7482-5f24504573f7",
        "last_synced_at": "2024-01-08T12:55:04.016Z"
      },
      {
        "id": "0187c66e-e7e5-811c-b006-2232f00f426a",
        "last_synced_at": "2024-01-08T12:58:06.023Z"
      }
    ]
  }
}

Generated

POST /v2/webhooks The reports.generated webhook is sent when a report has been successfully generated and can be retrieved.

Request body

  • events (array of strings, required): reports.generated
  • name (string, required): Your name for the webhook subscription.
  • url (string, required): 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.
  • secret (string, optional): Optional secret used to verify webhooks.

Webhook message

  • event (string): reports.generated
  • name (string): Name used for the webhook subscription.
  • data (object)
  • user (string (uuid)): ID of the user.
  • type (string (enum)): The type of report.
  • report_id (string (uuid)): ID of the report.
curl --request POST \\
--url https://api-sandbox.argyle.com/v2/webhooks \\
--header 'accept: application/json' \\
--header 'content-type: application/json' \\
--data '{
"events": ["reports.generated"],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret"
}'
{
  "event": "reports.generated",
  "name": "name-for-the-webhook-subscription",
  "data": {
    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
    "type": "voie",
    "report_id": "43a2c6c3-1e63-91e5-88e3-f9ab2dcc489b"
  }
}