Payroll Documents Webhooks

Sent when payroll document events occur.

#Added

post/v2/webhooks

The payroll_documents.added webhook is sent when a new payroll document is retrieved from a connected account.

Request body
  • #
    eventsarray of strings
    required

    payroll_documents.added

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    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.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    payroll_documents.added

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    payroll_documentstring (uuid)

    ID of the payroll document.

Example Subscription
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": ["payroll_documents.added"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret"
10     }'
Example Webhook
1{
2  "event": "payroll_documents.added",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "payroll_document": "0176dc14-bb37-402a-7be1-f5261759fae7"
8  }
9}

#Updated

post/v2/webhooks

The payroll_documents.updated webhook is sent when there is any change to a property value of a payroll document object during a data refresh.

Request body
  • #
    eventsarray of strings
    required

    payroll_documents.updated

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    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.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    payroll_documents.updated

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    payroll_documentstring (uuid)

    ID of the payroll document.

Example Subscription
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": ["payroll_documents.updated"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret"
10     }'
Example Webhook
1{
2  "event": "payroll_documents.updated",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "payroll_document": "0176dc14-bb37-402a-7be1-f5261759fae7"
8  }
9}

#Removed

post/v2/webhooks

The payroll_documents.removed webhook is sent when an individual payroll document is deleted from an account or otherwise not found during a data refresh.

This webhook is not sent when an account is deleted via the API, or a user revokes access to their account.

Request body
  • #
    eventsarray of strings
    required

    payroll_documents.removed

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    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.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    payroll_documents.removed

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    payroll_documentstring (uuid)

    ID of the payroll document.

Example Subscription
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": ["payroll_documents.removed"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret"
10     }'
Example Webhook
1{
2  "event": "payroll_documents.removed",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "payroll_document": "0176dc14-bb37-402a-7be1-f5261759fae7"
8  }
9}

#OCR completed

post/v2/webhooks

The payroll_documents.ocr_completed webhook is sent when Argyle has finished scanning a 1099 or W-2 document retrieved from a connected payroll account. The scanned information can be found within the ocr_data object when retrieving a payroll document.

Request body
  • #
    eventsarray of strings
    required

    payroll_documents.ocr_completed

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    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.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    payroll_documents.ocr_completed

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    payroll_documentstring (uuid)

    ID of the payroll document.

Example Subscription
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": ["payroll_documents.ocr_completed"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret"
10     }'
Example Webhook
1{
2  "event": "payroll_documents.ocr_completed",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "payroll_document": "0176dc14-bb37-402a-7be1-f5261759fae7"
8  }
9}

#OCR failed

post/v2/webhooks

The payroll_documents.ocr_failed webhook is sent when Argyle encounters an error while scanning a 1099 or W-2 document retrieved from a connected payroll account. The error that occurred will be returned within the ocr_data object of the payroll document.

Request body
  • #
    eventsarray of strings
    required

    payroll_documents.ocr_failed

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    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.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    payroll_documents.ocr_failed

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    payroll_documentstring (uuid)

    ID of the payroll document.

Example Subscription
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": ["payroll_documents.ocr_failed"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret"
10     }'
Example Webhook
1{
2  "event": "payroll_documents.ocr_failed",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "payroll_document": "0176dc14-bb37-402a-7be1-f5261759fae7"
8  }
9}
Updating Argyle status...
© 2024 Argyle Systems Inc.argyle.com