Add authentication by XApiKey

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

Activate XApiKey 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

  • headers object
    Hide headers attribute Show headers attribute object
    • * string Additional properties

      Key-value pairs of arbitrary static headers to send with the webhook request.

  • Hide parameters attribute Show parameters attribute object
    • * string Additional properties

      Key-value pairs of arbitrary static query parameters to send with the webhook request.

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/api-keys
curl \
 -X PATCH https://api.trial.lsk.lightspeed.app/reservation/api/1/platform/MyPlatform/webhook/auth/api-keys \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"headers":{"X-API-ID":"Example-x-api-id","X-API-SECRET":"Example-x-api-secret"},"parameters":{"additionalProperty1":"string","additionalProperty2":"string"}}'
Request examples
{
  "headers": {
    "X-API-ID": "Example-x-api-id",
    "X-API-SECRET": "Example-x-api-secret"
  },
  "parameters": {
    "additionalProperty1": "string",
    "additionalProperty2": "string"
  }
}
Response examples (200)
{
  "accepted": true,
  "currentAuthType": "BASIC_AUTH"
}