# Extend by order IDs

## IPv4 type

The request allows to extend IP addresses by order IDs using all IP addresses from orders for proxy type IPv4.

<mark style="color:purple;">POST</mark> `/client/api/v1/`<mark style="color:purple;">`{apiKey}`</mark>`/extend/order`

### **Path parameters**

| Name                                     | Type   | Description            |
| ---------------------------------------- | ------ | ---------------------- |
| apiKey<mark style="color:red;">\*</mark> | String | Your personal API key. |

### **Request body**

| Name                                                                                                    | Type   | Description                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| proxyType<mark style="color:red;">\*</mark>                                                             | String | Proxy type IPv4.                                                                                                                                 |
| promoCode                                                                                               | String | Code of the promo code (can be obtained by another request).                                                                                     |
| orderIds<mark style="color:red;">\*</mark>                                                              | List   | <p>Order IDs for extend (can be obtained by another request with IP addresses). </p><p></p><p>All addresses from orders will be extended.</p><p> |
| <br>All <code>orderIds</code> are separated by commas, for example <code>\["11111", "22222"]</code></p> |        |                                                                                                                                                  |
| rentPeriodDays<mark style="color:red;">\*</mark>                                                        | Number | Number of days in the rental period (can be obtained by another request).                                                                        |

### Response

<details>

<summary>200: OK Success response</summary>

```javascript
{
    "success": true,
    "proxyType": "IPv4",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "1111111111111111111"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": null
}
```

</details>

<details>

<summary>200: OK Success response with valid promo code</summary>

```javascript
{
    "success": true,
    "proxyType": "IPv4",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "1111111111111111111"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "VALID"
}
```

</details>

<details>

<summary>200: OK Success response with invalid promo code</summary>

```javascript
{
    "success": true,
    "proxyType": "IPv4",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "1111111111111111111"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "NO_VALID"
}
```

</details>

<details>

<summary>200: OK Error response</summary>

```javascript
{
    "success": false,
    "proxyType": null,
    "rentPeriodDays": 0,
    "quantity": 0,
    "ipAddressIds": [],
    "balance": 0.65,
    "currency": "USD",
    "error": {
        "code": 29,
        "message": "Incorrect orderIds"
    },
    "promoCodeStatus": null
}
```

</details>

## IPv6 type

The request allows to extend IP addresses by order IDs using all IP addresses from orders for proxy type IPv6.

<mark style="color:purple;">POST</mark> `/client/api/v1/`<mark style="color:purple;">`{apiKey}`</mark>`/extend/order`

### **Path parameters**

| Name                                     | Type   | Description            |
| ---------------------------------------- | ------ | ---------------------- |
| apiKey<mark style="color:red;">\*</mark> | String | Your personal API key. |

### **Request body**

| Name                                                                                                    | Type   | Description                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| proxyType<mark style="color:red;">\*</mark>                                                             | String | Proxy type IPv6.                                                                                                                                 |
| promoCode                                                                                               | String | Code of the promo code (can be obtained by another request).                                                                                     |
| orderIds<mark style="color:red;">\*</mark>                                                              | List   | <p>Order IDs for extend (can be obtained by another request with IP addresses). </p><p></p><p>All addresses from orders will be extended.</p><p> |
| <br>All <code>orderIds</code> are separated by commas, for example <code>\["11111", "22222"]</code></p> |        |                                                                                                                                                  |
| rentPeriodDays<mark style="color:red;">\*</mark>                                                        | Number | Number of days in the rental period (can be obtained by another request).                                                                        |

### Response

<details>

<summary>200: OK Success response</summary>

```javascript
{
    "success": true,
    "proxyType": "IPv6",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "22222222222222222"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": null
}
```

</details>

<details>

<summary>200: OK Success response with valid promo code</summary>

```javascript
{
    "success": true,
    "proxyType": "IPv6",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "22222222222222222"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "VALID"
}
```

</details>

<details>

<summary>200: OK Success response with invalid promo code</summary>

```javascript
{
    "success": true,
    "proxyType": "IPv6",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "22222222222222222"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "NO_VALID"
}
```

</details>

<details>

<summary>200: OK Error response</summary>

```javascript
{
    "success": false,
    "proxyType": null,
    "rentPeriodDays": 0,
    "quantity": 0,
    "ipAddressIds": [],
    "balance": 0.65,
    "currency": "USD",
    "error": {
        "code": 29,
        "message": "Incorrect orderIds"
    },
    "promoCodeStatus": null
}
```

</details>

## Mobile type

The request allows to extend IP addresses by order IDs using all IP addresses from orders for proxy type MOBILE.

<mark style="color:purple;">POST</mark> `/client/api/v1/`<mark style="color:purple;">`{apiKey}`</mark>`/extend/order`

### **Path parameters**

| Name                                     | Type   | Description            |
| ---------------------------------------- | ------ | ---------------------- |
| apiKey<mark style="color:red;">\*</mark> | String | Your personal API key. |

### **Request body**

| Name                                                                                                    | Type   | Description                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| proxyType<mark style="color:red;">\*</mark>                                                             | String | Proxy type MOBILE.                                                                                                                               |
| promoCode                                                                                               | String | Code of the promo code (can be obtained by another request).                                                                                     |
| orderIds<mark style="color:red;">\*</mark>                                                              | List   | <p>Order IDs for extend (can be obtained by another request with IP addresses). </p><p></p><p>All addresses from orders will be extended.</p><p> |
| <br>All <code>orderIds</code> are separated by commas, for example <code>\["11111", "22222"]</code></p> |        |                                                                                                                                                  |
| rentPeriodDays<mark style="color:red;">\*</mark>                                                        | Number | Number of days in the rental period (can be obtained by another request).                                                                        |

### Response

<details>

<summary>200: OK Success response</summary>

```javascript
{
    "success": true,
    "proxyType": "MOBILE",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "333333333333333333"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": null
}
```

</details>

<details>

<summary>200: OK Success response with valid promo code</summary>

```javascript
{
    "success": true,
    "proxyType": "MOBILE",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "333333333333333333"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "VALID"
}
```

</details>

<details>

<summary>200: OK Success response with invalid promo code</summary>

```javascript
{
    "success": true,
    "proxyType": "MOBILE",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "333333333333333333"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "NO_VALID"
}
```

</details>

<details>

<summary>200: OK Error response</summary>

```javascript
{
    "success": false,
    "proxyType": null,
    "rentPeriodDays": 0,
    "quantity": 0,
    "ipAddressIds": [],
    "balance": 0.65,
    "currency": "USD",
    "error": {
        "code": 29,
        "message": "Incorrect orderIds"
    },
    "promoCodeStatus": null
}
```

</details>

## ISP type

The request allows to extend IP addresses by order IDs using all IP addresses from orders for proxy type ISP.

<mark style="color:purple;">POST</mark> `/client/api/v1/`<mark style="color:purple;">`{apiKey}`</mark>`/extend/order`

### **Path parameters**

| Name                                     | Type   | Description            |
| ---------------------------------------- | ------ | ---------------------- |
| apiKey<mark style="color:red;">\*</mark> | String | Your personal API key. |

### **Request body**

| Name                                                                                                    | Type   | Description                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| proxyType<mark style="color:red;">\*</mark>                                                             | String | Proxy type ISP.                                                                                                                                  |
| promoCode                                                                                               | String | Code of the promo code (can be obtained by another request).                                                                                     |
| orderIds<mark style="color:red;">\*</mark>                                                              | List   | <p>Order IDs for extend (can be obtained by another request with IP addresses). </p><p></p><p>All addresses from orders will be extended.</p><p> |
| <br>All <code>orderIds</code> are separated by commas, for example <code>\["11111", "22222"]</code></p> |        |                                                                                                                                                  |
| rentPeriodDays<mark style="color:red;">\*</mark>                                                        | Number | Number of days in the rental period (can be obtained by another request).                                                                        |

### Response

<details>

<summary>200: OK Success response</summary>

```javascript
{
    "success": true,
    "proxyType": "ISP",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "444444444444444"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": null
}
```

</details>

<details>

<summary>200: OK Success response with valid promo code</summary>

```javascript
{
    "success": true,
    "proxyType": "ISP",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "1111111111111111111"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "VALID"
}
```

</details>

<details>

<summary>200: OK Success response with invalid promo code</summary>

```javascript
{
    "success": true,
    "proxyType": "ISP",
    "rentPeriodDays": 30,
    "quantity": 1,
    "ipAddressIds": [
        "1111111111111111111"
    ],
    "balance": 0.65,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "NO_VALID"
}
```

</details>

<details>

<summary>200: OK Error response</summary>

```javascript
{
    "success": false,
    "proxyType": null,
    "rentPeriodDays": 0,
    "quantity": 0,
    "ipAddressIds": [],
    "balance": 0.65,
    "currency": "USD",
    "error": {
        "code": 29,
        "message": "Incorrect orderIds"
    },
    "promoCodeStatus": null
}
```

</details>
