Retrieve a Webhook

GET /o/wh/1/webhook/{endpointId}

Retrieve an existing webhook.

Responses

  • 200 application/json

    Webhook

    Hide response attributes Show response attributes object
    • endpointId string Required

      The unique endpoint ID, for example the integration name. Case sensitive.

    • url string Required

      The URL which this endpoint points to.

    • If basic auth should be used, defaults to false.

      Default value is false.

    • username string

      The username for basic auth.

    • password string

      The password for basic auth.

    • Whether or not to include account info in the notification.

      Default value is false.

    • Whether or not to include transaction lines in the notification.

      Default value is false.

    • Whether or not to include payment lines in the notification.

      Default value is false.

    • subscribeTo array[object]

      Event to listen to by resource

      Hide subscribeTo attributes Show subscribeTo attributes object
      • name string

        Events to subscribe to. Order: DELIVERED can be added here.

        The following are always sent:

        • Account: CLOSED and CHECK_WAS_UPDATED.
        • Order: FAILURE, READY_FOR_PICKUP and CANCELLED.
        • Payment: SUCCESS and FAILURE.
      • resource string

        Values are order or payment.

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • timestamp string(date-time)

      The date and time at which the error occurred.

    • status integer

      The HTTP status code associated with the error.

    • error string

      A short description of the HTTP status code meaning.

    • message string

      A human-readable message providing more details about the error.

    • path string

      The request path where the error occurred.

GET /o/wh/1/webhook/{endpointId}
curl \
 -X GET https://api.lsk.lightspeed.app/o/wh/1/webhook/endpoint \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "endpointId": "MY-AWESOME-ENDPOINT-ID",
  "url": "https://webhook.site/1dc40b86-3d0d",
  "withBasicAuth": true,
  "username": "username",
  "password": "password",
  "provideAccount": true,
  "expandTransactions": true,
  "expandPayments": true,
  "subscribeTo": [
    {
      "name": "DELIVERED",
      "resource": "order"
    }
  ]
}
Response examples (404)
{
  "timestamp": "2023-11-07T22:18:49.101+0000",
  "status": 404,
  "error": "Not Found",
  "message": "endpoint ID not found for MISSING-ENDPOINT",
  "path": "/o/wh/1/webhook/MISSING-ENDPOINT"
}