>  Switch To Link 5 and API v2 Documentation

Vehicles Webhooks

Learn about vehicles webhooks.

Vehicles webhooks notify your system when:

  • A new vehicle object is added after a new account is scanned with an initial scan or after additional vehicles are found during the periodic scan.
  • An existing vehicle object is updated with new information after a periodic scan.
  • An existing vehicle object is removed by a data provider and is found to be missing during a periodic scan or when the parent account is deleted.

#Added

post/v1/webhooks

Implement the vehicles.added webhook to know when a vehicle object is added.

  • A new vehicle object is added when a new account object is created and scanned or after additional vehicles are found during a periodic scan.
Request body
  • #
    eventsarray of strings
    required

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

    vehicles.added

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    vehiclestring (uuid)

    ID of the vehicle.

Example Subscription
1curl --request POST \
2     --url https://api.argyle.com/v1/webhooks \
3     --header 'accept: application/json' \
4     --header 'content-type: application/json' \
5     --data '{
6        "events": ["vehicles.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": "vehicles.added",
3  "name": "A vehicle was added",
4  "data": {
5    "account": "ada143be-3c90-4534-b7ea-9899674dc6e0",
6    "user": "3823026e-a964-45f6-b201-6b8c096b30d3",
7    "vehicle": "4334r6e-a964-45eef6-b201-64464"
8  }
9}

#Updated

post/v1/webhooks

Implement the vehicles.updated webhook to know when a vehicle object is updated.

  • Vehicle objects are updated through periodic scanning.
Request body
  • #
    eventsarray of strings
    required

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

    vehicles.updated

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    vehiclestring (uuid)

    ID of the vehicle.

Example Subscription
1curl --request POST \
2     --url https://api.argyle.com/v1/webhooks \
3     --header 'accept: application/json' \
4     --header 'content-type: application/json' \
5     --data '{
6        "events": ["vehicles.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": "vehicles.updated",
3  "name": "A vehicle was updated",
4  "data": {
5    "account": "ada143be-3c90-4534-b7ea-9899674dc6e0",
6    "user": "3823026e-a964-45f6-b201-6b8c096b30d3",
7    "vehicle": "4334r6e-a964-45eef6-b201-64464"
8  }
9}

#Removed

post/v1/webhooks

Implement the vehicles.removed webhook to know when a vehicle object is removed.

  • Vehicle objects will be removed when they are deleted by a payroll provider and are found to be missing during a periodic scan or when the account associated with the vehicle is deleted.
Request body
  • #
    eventsarray of strings
    required

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

    vehicles.removed

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    vehiclestring (uuid)

    ID of the vehicle.

Example Subscription
1curl --request POST \
2     --url https://api.argyle.com/v1/webhooks \
3     --header 'accept: application/json' \
4     --header 'content-type: application/json' \
5     --data '{
6        "events": ["vehicles.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": "vehicles.removed",
3  "name": "A vehicle was removed",
4  "data": {
5    "account": "ada143be-3c90-4534-b7ea-9899674dc6e0",
6    "user": "3823026e-a964-45f6-b201-6b8c096b30d3",
7    "vehicle": "4334r6e-a964-45eef6-b201-64464"
8  }
9}
Updating Argyle status...
© 2024 Argyle Systems Inc.argyle.com