Update Existing Webhook

PATCH /staff/v1/businessLocations/{businessLocationId}/webhooks/{webhookId}

Updates the details of an existing webhook.

Path parameters

  • businessLocationId integer(int64) Required

    The unique identifier for the business location.

  • webhookId string(uuid) Required

    The unique identifier for the webhook.

application/json

Body Required

  • notificationType string Required

    The type of webhook notification.

    Values are shift.created, shift.updated, or shift.deleted.

  • url string(uri) Required

    The URL for the webhook.

  • webhookName string Required

    The name for the webhook.

Responses

  • 200 application/json

    Webhook updated successfully

    Hide response attributes Show response attributes object
    • uuid string(uuid)

      The unique identifier for the webhook.

    • The type of webhook notification.

      Values are shift.created, shift.updated, or shift.deleted.

    • url string

      The URL for the webhook.

    • The name for the webhook.

    • businessLocationId integer(int64)

      The unique identifier for the business location.

    • createdAt string(date-time)

      The creation time of the webhook.

    • updatedAt string(date-time)

      The last update time of the webhook.

  • Bad request. Invalid input parameters.

  • Not found. The specified webhook ID does not exist.

  • Conflict. A webhook with the specified details already exists.

PATCH /staff/v1/businessLocations/{businessLocationId}/webhooks/{webhookId}
curl \
 -X PATCH https://api.lsk.lightspeed.app/staff/v1/businessLocations/{businessLocationId}/webhooks/{webhookId} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"notificationType":"shift.created","url":"https://example.com","webhookName":"string"}'
Request examples
{
  "notificationType": "shift.created",
  "url": "https://example.com",
  "webhookName": "string"
}
Response examples (200)
{
  "uuid": "e95c2cc5-4489-4025-a7e2-a34faeaa5f9d",
  "notificationType": "shift.created",
  "url": "string",
  "webhookName": "My Awesome Webhook",
  "businessLocationId": 1234567890,
  "createdAt": "2024-05-04T09:42:00+00:00",
  "updatedAt": "2024-05-04T09:42:00+00:00"
}