---
id: extend
title: "Extend order"
sidebar_label: Extend order
hide_title: true
description: "Management API - Orders - Extend order"
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import Ingress from "../../../src/components/ingress/ingress.react";

<Ingress title="Extend order">
  Order items that have not been activated will expire on the expiration date of
  the order. If you need to extend the expiration date on the order you should
  use this endpoint.
</Ingress>

## Extend order

To extend an order, call the extend endpoint.
The response will contain an updated order model.

:::note Works on `NotActivated` and `PartActivated` orders
Any other status is rejected. See [Order lifecycle](/docs/manage/concepts/order-lifecycle) for what
each status means.
:::

### Example

<Tabs defaultValue="req" values={[
{ label: 'Request', value: 'req', },
{ label: 'Response', value: 'res', }
]}>

<TabItem value="req">

```http
POST /manage/orders/{{orderId}}/extend HTTP/1.1
Host: api.uat.walleydev.com // Test environment. Production uses a different hostname.
Authorization: Bearer {{accessToken}}
```

</TabItem>

<TabItem value="res">

```http
HTTP/1.1 202 Accepted
Location: /manage/orders/1b1f5ef6-92n1-4b46-b1dc-ae2e00c4c315

/* No body */
```

</TabItem>

</Tabs>

| Http status code | Description                                                                                                                      |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| 202              | Order extended                                                                                                                   |
| 401              | Unauthorized, token verification needed. See: [Authentication](/docs/manage/getting-started/authentication) for more information |
| 403              | No permission for this store                                                                                                     |
| 404              | Order not found                                                                                                                  |
| 409              | Request with same idempotency key already in progress                                                                            |

## Data Model

### Request

#### Request headers

| Header            | Required | Explanation                                                                                                             |
| ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Authorization** | Yes      | See [Authentication](/docs/manage/getting-started/authentication) for how to generate the Bearer token value |

### Response

The response will be `202 Accepted` for a successful extension.
