Gigs Webhooks

Sent when gigs are added, updated, or removed.

If you need to access to gig data as soon as it is available:

  • The gigs.partially_synced webhook is sent when gigs going back a specified number of days (starting from the date of the most recent gig) have been retrieved during initial data retrieval for a newly connected account.
  • The gigs.fully_synced webhook is sent when all gigs have been retrieved during initial data retrieval for a newly connected account.

Because some accounts can contain thousands of gigs, we recommend subscribing to the gigs.partially_synced webhook when especially time-sensitive. The gigs.fully_synced webhook will only be sent when all gig data has been retrieved, which may take up to several hours in these cases.


#Added

post/v2/webhooks

The gigs.added webhook is sent only when an account's data is refreshed (does not include initial data retrieval) and a new gig is retrieved.

Request body
  • #
    eventsarray of strings
    required

    gigs.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

    gigs.added

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    available_fromstring (datetime)

    Timestamp (ISO 8601) of the earliest available gig.

  • #
    available_tostring (datetime)

    Timestamp (ISO 8601) of the most recent gig.

  • #
    available_countinteger

    Number of gigs currently available for this account.

  • #
    added_countinteger

    Number of gigs retrieved during a data refresh.

  • #
    added_fromstring (datetime)

    Timestamp (ISO 8601) of the earliest gig retrieved during a data refresh.

  • #
    added_tostring (datetime)

    Timestamp (ISO 8601) of the most recent gig retrieved during a data refresh.

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": ["gigs.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": "gigs.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    "available_from": "2016-04-16T05:32:41Z",
8    "available_to": "2023-03-03T00:00:00Z",
9    "available_count": 2385,
10    "added_count": 6,
11    "added_from": "2023-03-02T00:00:00Z",
12    "added_to": "2023-03-03T00:00:00Z"
13  }
14}

#Updated

post/v2/webhooks

The gigs.updated webhook is sent when there is any change to a property value of the gig object.

For example, after a gig assignment is completed the gig object's status value changes from in_progress to completed.

Request body
  • #
    eventsarray of strings
    required

    gigs.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

    gigs.updated

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    available_fromstring (datetime)

    Timestamp (ISO 8601) of the account's earliest available gig.

  • #
    available_tostring (datetime)

    Timestamp (ISO 8601) of the account's most recent gig.

  • #
    available_countinteger

    Number of gigs currently available for this account.

  • #
    updated_countinteger

    Number of gigs updated.

  • #
    updated_gigsarray of strings (uuid's)

    ID's of the updated gigs.

  • #
    updated_fromstring (datetime)

    Timestamp (ISO 8601) of the earliest updated gig.

  • #
    updated_tostring (datetime)

    Timestamp (ISO 8601) of the most recent updated gig.

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": ["gigs.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": "gigs.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    "available_from": "2016-04-16T05:32:41Z",
8    "available_to": "2023-03-03T00:00:00Z",
9    "available_count": 2385,
10    "updated_count": 2,
11    "updated_gigs": [
12      "0187b43a-35fa-56e2-1a95-f7e4232a4b3a",
13      "0187dbfa-6f5e-a33a-af26-7e12ff408fea"
14    ],
15    "updated_from": "2023-03-02T00:00:00Z",
16    "updated_to": "2023-03-03T00:00:00Z"
17  }
18}

#Removed

post/v2/webhooks

The gigs.removed webhook is sent when a gig object has been deleted after a previous gig was not found when an account's data was refreshed.

Request body
  • #
    eventsarray of strings
    required

    gigs.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

    gigs.removed

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    available_fromstring (datetime)

    Timestamp (ISO 8601) of the account's earliest available gig.

  • #
    available_tostring (datetime)

    Timestamp (ISO 8601) of the account's most recent gig.

  • #
    available_countinteger

    Number of gigs currently available for this account.

  • #
    removed_countinteger

    Number of gigs removed.

  • #
    removed_gigsarray of strings (uuid's)

    ID's of the removed gigs.

  • #
    removed_fromstring (datetime)

    Timestamp (ISO 8601) of the earliest removed gig.

  • #
    removed_tostring (datetime)

    Timestamp (ISO 8601) of the most recent removed gig.

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": ["gigs.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": "gigs.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    "available_from": "2016-04-16T05:32:41Z",
8    "available_to": "2023-03-02T00:00:00Z",
9    "available_count": 2383,
10    "removed_count": 2,
11    "removed_gigs": [
12      "0187b43a-35fa-56e2-1a95-f7e4232a4b3a",
13      "0187dbfa-6f5e-a33a-af26-7e12ff408fea"
14    ],
15    "removed_from": "2023-03-02T00:00:00Z",
16    "removed_to": "2023-03-03T00:00:00Z"
17  }
18}

#Partially synced

post/v2/webhooks

The gigs.partially_synced webhook is sent when gigs going back a specified number of days (starting from the date of the most recent gig) have been retrieved. The default number of days is 30 days.

You can subscribe to this webhook multiple times with different numbers of specified days.

Of note:

  • This webhook is sent only during initial data retrieval (not ongoing refresh).
  • If the number of gigs for an account is small and captured completely with only one data pull, this webhook will not be sent. Instead the gigs.fully_synced webhook will be sent.
Request body
  • #
    eventsarray of strings
    required

    gigs.partially_synced

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

  • #
    configobject
    optional

    "days_synced": <Integer> specifies how many days of synced gigs (starting from the date of the most recent gig) are needed to trigger the webhook.

Webhook message
  • #
    eventstring

    gigs.partially_synced

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    available_fromstring (datetime)

    Timestamp (ISO 8601) of the account's earliest available gig from the synced time period.

  • #
    available_tostring (datetime)

    Timestamp (ISO 8601) of the account's most recent gig from the synced time period.

  • #
    available_countinteger

    Number of gigs currently available for this account at the time this webhook is sent.

  • #
    days_syncedinteger

    Number of days of synced gig events.

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": ["gigs.partially_synced"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret",
10        "config": { "days_synced": 60 }
11     }'
Example Webhook
1{
2  "event": "gigs.partially_synced",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "available_from": "2023-01-02T0:000:00Z",
8    "available_to": "2023-03-03T0:000:00Z",
9    "available_count": 132,
10    "days_synced": 60
11  }
12}

#Fully synced

post/v2/webhooks

The gigs.fully_synced webhook is sent when all gigs have been retrieved from a newly connected payroll account.

Request body
  • #
    eventsarray of strings
    required

    gigs.fully_synced

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

    gigs.fully_synced

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    available_fromstring (datetime)

    Timestamp (ISO 8601) of the account's earliest available gig.

  • #
    available_tostring (datetime)

    Timestamp (ISO 8601) of the account's most recent gig.

  • #
    available_countinteger

    Number of gigs currently available for this account.

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": ["gigs.fully_synced"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret"
10     }'
Example Webhook
1{
2  "event": "gigs.fully_synced",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "available_from": "2016-04-16T05:32:41Z",
8    "available_to": "2023-03-02T00:00:00Z",
9    "available_count": 2379
10  }
11}
Updating Argyle status...
┬ę 2024 Argyle Systems Inc.argyle.com