# Create an order

## IPv4 type

<mark style="color:purple;">POST</mark> `/client/api/v1/`<mark style="color:purple;">`{apiKey}`</mark>`/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.                                                          |
| authIp                                           | String | Authorization IP. This field is required only if `authType` is `IP`.      |
| authType<mark style="color:red;">\*</mark>       | String | Authorization type. Available values: `LOGIN`, `IP`.                      |
| goal<mark style="color:red;">\*</mark>           | String | Custom goal.                                                              |
| country<mark style="color:red;">\*</mark>        | String | Alfa3 country code (can be obtained by another request).                  |
| promoCode                                        | String | Code of the promo code (can be obtained by another request).              |
| quantity<mark style="color:red;">\*</mark>       | Number | Quantity of IP addresses.                                                 |
| 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",
    "orderNumber": "NUMBER-112233",
    "balance": 4.57,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": null
}
```

</details>

<details>

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

```javascript
{
    "success": true,
    "proxyType": "IPv4",
    "orderNumber": "NUMBER-112233",
    "balance": 4.57,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "VALID"
}
```

</details>

<details>

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

```javascript
{
    "success": true,
    "proxyType": "IPv4",
    "orderNumber": "NUMBER-112233",
    "balance": 4.57,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "NO_VALID"
}
```

</details>

<details>

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

```javascript
{
    "success": false,
    "proxyType": null,
    "orderNumber": null,
    "balance": 7.18,
    "currency": "USD",
    "error": {
        "code": 14,
        "message": "Incorrect goal"
    },
    "promoCodeStatus": null
}
```

</details>

## IPv6 type

<mark style="color:purple;">POST</mark> `/client/api/v1/`<mark style="color:purple;">`{apiKey}`</mark>`/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.                                                          |
| protocol<mark style="color:red;">\*</mark>       | String | Protocol. Available values: `HTTP`, `SOCKS`.                              |
| quantity<mark style="color:red;">\*</mark>       | Number | Quantity of IP addresses.                                                 |
| rentPeriodDays<mark style="color:red;">\*</mark> | Number | Number of days in the rental period (can be obtained by another request). |
| authIp                                           | String | Authorization IP. This field is required only if `authType` is `IP`.      |
| authType<mark style="color:red;">\*</mark>       | String | Authorization type. Available values: `LOGIN`, `IP`.                      |
| goal<mark style="color:red;">\*</mark>           | String | Custom goal.                                                              |
| country<mark style="color:red;">\*</mark>        | String | Alfa3 country code (can be obtained by another request).                  |
| promoCode                                        | String | Code of the promo code (can be obtained by another request).              |

### Response

<details>

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

```javascript
{
    "success": true,
    "proxyType": "IPv6",
    "orderNumber": "NUMBER-22334455",
    "balance": 3.76,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": null
}
```

</details>

<details>

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

```javascript
{
    "success": true,
    "proxyType": "IPv6",
    "orderNumber": "NUMBER-22334455",
    "balance": 3.76,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "VALID"
}
```

</details>

<details>

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

```javascript
{
    "success": true,
    "proxyType": "IPv6",
    "orderNumber": "NUMBER-22334455",
    "balance": 3.76,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "NO_VALID"
}
```

</details>

<details>

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

```javascript
{
    "success": false,
    "proxyType": null,
    "orderNumber": null,
    "balance": 4.57,
    "currency": "USD",
    "error": {
        "code": 13,
        "message": "Incorrect protocol"
    },
    "promoCodeStatus": null
}
```

</details>

## Mobile type

<mark style="color:purple;">POST</mark> `/client/api/v1/`<mark style="color:purple;">`{apiKey}`</mark>`/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.                                                        |
| rotationTime<mark style="color:red;">\*</mark>   | Number | Rotation time (can be obtained by another request with mobile operators). |
| mobileOperator<mark style="color:red;">\*</mark> | String | Mobile operator tag (can be obtained by another request).                 |
| quantity<mark style="color:red;">\*</mark>       | Number | Quantity of IP addresses.                                                 |
| rentPeriodDays<mark style="color:red;">\*</mark> | Number | Number of days in the rental period (can be obtained by another request). |
| authIp                                           | String | Authorization IP. This field is required only if `authType` is `IP`.      |
| authType<mark style="color:red;">\*</mark>       | String | Authorization type. Available values: `LOGIN`, `IP`.                      |
| goal<mark style="color:red;">\*</mark>           | String | Custom goal.                                                              |
| country<mark style="color:red;">\*</mark>        | String | Alfa3 country code (can be obtained by another request).                  |
| promoCode                                        | String | Code of the promo code (can be obtained by another request).              |

### Response

<details>

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

```javascript
{
    "success": true,
    "proxyType": "MOBILE",
    "orderNumber": "NUMBER-4455566677",
    "balance": 1.95,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": null
}
```

</details>

<details>

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

```javascript
{
    "success": true,
    "proxyType": "MOBILE",
    "orderNumber": "NUMBER-4455566677",
    "balance": 1.95,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "VALID"
}
```

</details>

<details>

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

```javascript
{
    "success": true,
    "proxyType": "MOBILE",
    "orderNumber": "NUMBER-4455566677",
    "balance": 1.95,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "NO_VALID"
}
```

</details>

<details>

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

```javascript
{
    "success": false,
    "proxyType": null,
    "orderNumber": null,
    "balance": 3.76,
    "currency": "USD",
    "error": {
        "code": 8,
        "message": "Incorrect mobile operator"
    },
    "promoCodeStatus": null
}
```

</details>

## ISP type

<mark style="color:purple;">POST</mark> `/client/api/v1/`<mark style="color:purple;">`{apiKey}`</mark>`/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.                                                           |
| authIp                                           | String | Authorization IP. This field is required only if `authType` is `IP`.      |
| authType<mark style="color:red;">\*</mark>       | String | Authorization type. Available values: `LOGIN`, `IP`.                      |
| goal<mark style="color:red;">\*</mark>           | String | Custom goal.                                                              |
| country<mark style="color:red;">\*</mark>        | String | Alfa3 country code (can be obtained by another request).                  |
| promoCode                                        | String | Code of the promo code (can be obtained by another request).              |
| quantity<mark style="color:red;">\*</mark>       | Number | Quantity of IP addresses.                                                 |
| 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",
    "orderNumber": "NUMBER-112233",
    "balance": 4.57,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": null
}
```

</details>

<details>

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

```javascript
{
    "success": true,
    "proxyType": "ISP",
    "orderNumber": "NUMBER-112233",
    "balance": 4.57,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "VALID"
}
```

</details>

<details>

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

```javascript
{
    "success": true,
    "proxyType": "ISP",
    "orderNumber": "NUMBER-112233",
    "balance": 4.57,
    "currency": "USD",
    "error": null,
    "promoCodeStatus": "NO_VALID"
}
```

</details>

<details>

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

```javascript
{
    "success": false,
    "proxyType": null,
    "orderNumber": null,
    "balance": 7.18,
    "currency": "USD",
    "error": {
        "code": 14,
        "message": "Incorrect goal"
    },
    "promoCodeStatus": null
}
```

</details>
