---
title: "Fails the authorization"
method: PUT
path: "/booking/v0-nsfw/authorization-actions/{authorizationId}/fail"
tags: ["AuthorizationActions"]
---

# Fails the authorization

`PUT /booking/v0-nsfw/authorization-actions/{authorizationId}/fail`

## Request

- Base URL: `https://api.apaleo.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.apaleo.com/booking/v0-nsfw/authorization-actions/{authorizationId}/fail`
- Auth: OAuth 2
  - Implicit: `https://identity.apaleo.com/connect/authorize`
  - Scopes: `payments.admin`, `admin`

<br>You must have this scope: 'payments.admin'.<br>For fine-grained clients, you must have this permission: 'core.authorizations.modify'.

## Path parameters

- `authorizationId` string, required

## Request body

- FailAuthorizationRequest
  - `reasonCode` 'Failed' | 'Expired', required: Reason code for the authorization failure.
  - `failureReason` string, nullable: Textual description of the failure reason.
  - `transactionId` string, nullable: Transaction Id of Authorization in the payment service payment transaction log. Required if transaction id already set for authorization.
  - `expiredAt` string, date-time, nullable: The actual date and time of EXPIRE event. Required if Apaleo.Api.Modules.Booking.Models.Authorization.FailAuthorizationRequest.ReasonCode is Apaleo.Api.Modules.Booking.Models.Authorization.AuthorizationFailureReasonCode.Expired.<br />A date and time in UTC or with UTC offset as defined in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO8601:2004</a>

## Response `204`

Success

## Other responses

- `400`: Bad request.
- `401`: You are unauthorized.
- `403`: Forbidden.
- `404`: The Request-URI could not be found.
- `415`: Unsupported media type.
- `422`: Validation errors in the request body or query params.
- `499`: Client closed request.
- `500`: An unexpected error occurred.
- `503`: The server is currently unavailable. Please try later.

---

[API](https://skmtc.dev/apaleo/apis/apaleo-booking-api-not-safe-for-work.md) - [All operations](https://skmtc.dev/apaleo/apis/apaleo-booking-api-not-safe-for-work/llms.txt) - [OpenAPI document](https://skmtc.dev/apaleo/apis/apaleo-booking-api-not-safe-for-work/revisions/a1b6a2f6b879?raw)
