# Extend the authorization time

> `POST https://api.kustom.co/ordermanagement/v1/orders/{order_id}/extend-authorization-time`

Extend authorization time. Read more on [Extending order authorization time](https://docs.kustom.co/contents/order-management/manage-orders-with-the-api/extend-authorization)

## Parameters

- `order_id` (string, path, required) — Order id
- `Klarna-Idempotency-Key` (string, header) — This header will guarantee the idempotency of the operation. The key should be unique and is recommended to be a UUID version 4. Retries of requests are safe to be applied in case of errors such as network errors, socket errors and timeouts. Input values of the operation are disregarded when evaluating the idempotency of the operation, only the key matters.

## Responses

### 204

Authorization time was extended.

### 403

Extension of authorization time not allowed. The order being expired or cancelled are among the possible causes.

`application/json`

- `correlation_id` (string) — Correlation id. For searching logs.
- `error_code` (string) — Error code
- `error_messages[]` (array<string>) — Error messages

```json
{
  "correlation_id": "66782175-ae05-44fc-9eb3-eeceadbad271",
  "error_code": "NOT_ALLOWED",
  "error_messages": [
    "<string>"
  ]
}
```

### 404

Not Found

`*/*`

- `correlation_id` (string)
- `error_code` (string) Enum: `INTERNAL_ERROR`, `NOT_FOUND`, `TOO_MANY_REQUESTS`, `REFUND_NOT_ALLOWED`, `CAPTURE_NOT_ALLOWED`, `CANCEL_NOT_ALLOWED`, `UPDATE_NOT_ALLOWED`, `NO_SUCH_ORDER`, `BAD_REQUEST`, `PAYLOAD_TOO_LARGE`, `NO_SUCH_CAPTURE`, `RESOURCE_NOT_FOUND`, `INVALID_REQUEST_PARAMETERS`, `NOT_ALLOWED`, `UNSUPPORTED_MEDIA_TYPE`, `FORBIDDEN`.
- `error_messages[]` (array<string>)

```json
{
  "correlation_id": "<string>",
  "error_code": "INTERNAL_ERROR",
  "error_messages": [
    "<string>"
  ]
}
```

### 409

Conflict

`*/*`

```json
"<string>"
```

### Errors

| Code | Status | What it means | Retry |
| --- | --- | --- | --- |
| `NOT_ALLOWED` | 403 | The order is not in a state that permits this change. Needs `AUTHORIZED`. | Never retry |
