Add authentication with BearerAuth

PATCH /reservation/api/1/platform/{platform-code}/webhook/auth/bearer-auth

Activate BearerAuth authentication for webhooks.

Path parameters

  • platform-code string Required

    The unique code assigned to the reservation platform.

    Maximum length is 11. Format should match the following pattern: [a-zA-Z0-9_-]+.

application/json

Body Required

  • token string(password) Required

    The bearer token.

  • ttl string(date-time)

    Token expiration time in UTC.

Responses

  • 200 application/json

    Accepted

    Hide response attributes Show response attributes object
    • accepted boolean Required

      Whether the webhook request was accepted.

    • currentAuthType string Required

      The current authentication type.

      Values are BASIC_AUTH, BEARER_TOKEN, API_KEYS, or OAUTH2.

  • Non relevant request

  • Scope 'reservation-{platform-code}' not found in the token

  • Platform not found

PATCH /reservation/api/1/platform/{platform-code}/webhook/auth/bearer-auth
curl \
 -X PATCH https://api.trial.lsk.lightspeed.app/reservation/api/1/platform/MyPlatform/webhook/auth/bearer-auth \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","ttl":"2035-01-01T00:00:00"}'
Request examples
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "ttl": "2035-01-01T00:00:00"
}
Response examples (200)
{
  "accepted": true,
  "currentAuthType": "BASIC_AUTH"
}