> For the complete documentation index, see [llms.txt](https://proxy-solutions.gitbook.io/api-en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://proxy-solutions.gitbook.io/api-en/documention/orders/order-changes.md).

# Order changes

## Modify order

> Modify order data. For active orders, only authentication data can be changed.<br>

```json
{"openapi":"3.0.3","info":{"title":"Client API","version":"4.1.0"},"servers":[{"url":"https://v4.dev.proxy-solutions.net/api"}],"security":[{"api-key":[]}],"components":{"securitySchemes":{},"parameters":{"order_id":{"name":"order_id","in":"path","required":true,"schema":{"type":"integer"}},"lang":{"name":"lang","description":"Language code","in":"query","required":false,"schema":{"type":"string","enum":["EN","RU","UA"],"default":"EN"}},"currency":{"name":"currency","description":"Currency code","in":"query","required":false,"schema":{"type":"string","enum":["USD","EUR","RUB","UAH","KZT"],"default":"USD"}}},"schemas":{"Order":{"type":"object","required":["id","status","service","quantity","period","amount","allowed_operations","resources_allocated"],"properties":{"id":{"type":"integer","minimum":1},"status":{"type":"string","enum":["waiting","waiting.activation","active","active.suspended","archived"],"description":"Order status"},"service":{"$ref":"#/components/schemas/Service"},"location":{"$ref":"#/components/schemas/Location"},"operator":{"$ref":"#/components/schemas/Operator"},"period":{"type":"integer","description":"Period in days"},"quantity":{"type":"integer","description":"Quantity"},"minimal_payment":{"type":"number","description":"Minimum payment amount."},"amount":{"type":"number","description":"Cost in base currency (USD)"},"converted_amount":{"type":"number","description":"Cost in the specified \"currency\""},"auto_continuation":{"type":"boolean","description":"Automatic renewal. <div style=\"padding-left:1em\">\n  **false**: upon expiration the order transitions to \"waiting\" state\n<br>\n  **true**: billing will renew the order as long as the client has sufficient balance\n</div>\n","default":false},"allowed_operations":{"type":"array","items":{"type":"string"},"description":"Operations allowed in the current order state (see post /user/orders/{id}/perform)\n"},"resources_allocated":{"type":"boolean"}}},"Service":{"type":"object","properties":{"id":{"type":"integer"},"provider":{"type":"string","enum":["server-proxies","mobile-proxies","webtools"]},"name":{"type":"string"}}},"Location":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["country","city"],"description":"Location type.  Present only when location is an order parameter\n"},"name":{"type":"string","description":"Location name.  Present only when location is an order parameter\n"},"country_name":{"type":"string","description":"Country name.  Present only when location is an order parameter\n"}}},"Operator":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer"},"name":{"type":"string"}}},"OrderResources":{"oneOf":[{"$ref":"#/components/schemas/Resources_ServerProxies"},{"$ref":"#/components/schemas/Resources_MobileProxies"}]},"Resources_ServerProxies":{"type":"object","properties":{"access":{"type":"object","properties":{"port":{"type":"integer","description":"Proxy port"},"login":{"type":"string"},"password":{"type":"string"},"ip_list":{"type":"array","items":{"type":"string","format":"ipv4"}}}},"proxies":{"type":"array","items":{"type":"object","properties":{"ip":{"type":"string","format":"ipv4"}}}}}},"Resources_MobileProxies":{"type":"object","properties":{"access":{"type":"object","properties":{"login":{"type":"string"},"password":{"type":"string"}}},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"location":{"$ref":"#/components/schemas/Location"},"operator":{"$ref":"#/components/schemas/Operator"},"auto_reset":{"type":"integer","description":"Automatic reboot interval in seconds, if enabled\n"},"socks_gateway":{"type":"object","properties":{"ip":{"type":"string","format":"ipv4"},"port":{"type":"integer"}}},"http_gateway":{"type":"object","properties":{"ip":{"type":"string","format":"ipv4"},"port":{"type":"integer"}}}}}}}}}},"paths":{"/user/orders/{order_id}":{"post":{"summary":"Modify order","tags":["Orders"],"description":"Modify order data. For active orders, only authentication data can be changed.\n","parameters":[{"$ref":"#/components/parameters/order_id"},{"$ref":"#/components/parameters/lang"},{"$ref":"#/components/parameters/currency"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"description":"Number of addresses/channels","type":"integer"},"period":{"type":"integer","description":"Period in days"},"remove_proxies":{"type":"array","description":"List of proxy IPs to remove","items":{"type":"string","format":"ip"}},"port":{"type":"integer","description":"Proxy port"},"login":{"type":"string","description":"Proxy login"},"password":{"type":"string","description":"Proxy password"},"gen_password":{"type":"boolean","description":"If true, a new password will be generated,  the password field is ignored\n","default":false},"ip_auth":{"anyOf":[{"type":"string","enum":["clear"]},{"type":"array","description":"List of IPs allowed to access proxies without login/password To clear, pass an empty list or the string 'clear'\n","items":{"type":"string","format":"ip"}}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string"},"order":{"allOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/OrderResources"}]}}}}}},"401":{"description":"Unauthorized"},"404":{"description":"Order not found"},"422":{"description":"Validation error","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}}}}}}
```

### Proxies quantity changes&#x20;

If the order has expired and you want to change proxies quantity in it you should use `remove_proxies` and `quantity`parameters. .

For **mobile proxies** you just need to pass quantity which you need in your order  in `quantity` field.&#x20;

For the rest of proxies you need to pass the list of IPs you need to delete from the order to `remove_proxies` and point the resulting quantity you need in your oder in `quantity` field.

For example if you have 4 proxies in your order you should pass the body like:

```json
{
    "remove_proxies: ["0.0.0.0", "1.1.1.1"],
    "quantity": 6
}
```

In this case the sysyem will delete 2 IPs from your order  and add 4 new IPs (so the total quantity  equals 6).
