Geonix

Create order

POSThttps://geonix.com/personal/api/v1/{apiKey}/order/make

This endpoint allows you to create an order using the same parameters you used to calculate its cost.

Be careful when creating an order, as it will deduct funds from your balance. Before proceeding, it's wise to first calculate the cost using the same parameters through the calculate order endpoint. This step ensures you're fully informed about the expense before confirming your order.

Headers

Name

Value

Content-Type

application/json

Path parameters

Name

Type

Description

apiKey*

string

API key to authorize requests

Body parameters

Name

Type

For Proxy Type

Description

coupon

string

All

Optional promotional code for discounts.

countryId*

integer

IPV4, IPV6, ISP, Mobile

Country ID for the proxy location.

periodId*

string

All

Duration for proxy rental, e.g., "30d" for 30 days.

quantity*

integer

IPV4, IPV6, ISP, Mobile

Number of proxies required.

authorization

string

IPV4, IPV6, ISP, Mobile

IP address for authorization (optional).

targetSectionId

integer

IPV4, ISP, Resident

Section ID for specific proxy targets (optional).

targetId

integer

IPV4, ISP, Resident

ID of the target website or service, 0 for custom.

customTargetName

string

IPV4, ISP, IPV6*,

Resident

Name of the custom target, used when targetId is 0.

protocol

string

IPV6, potentially others

Proxy protocol (HTTPS/SOCKS5).

operatorId*

string

Mobile

Operator ID for mobile proxies.

rotationId*

integer

Mobile

Rotation settings for mobile proxies.

tarifId*

integer

Resident

Tariff ID for resident proxies.

Request examples

curl -X 'POST' \
  'https://geonix.com/personal/api/v1/YOUR_API_KEY_HERE/order/make' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "coupon": "OZGCNK_1",
  "countryId": 3350393,
  "periodId": "30d",
  "quantity": 5,
  "authorization": "127.0.0.1",
  "targetSectionId": 99,
  "targetId": 0,
  "customTargetName": "Another target"
}'
<?php

$url = 'https://geonix.com/personal/api/v1/YOUR_API_KEY_HERE/order/make';
$data = array(
    'coupon' => 'OZGCNK_1',
    'countryId' => 3350393,
    'periodId' => '30d',
    'quantity' => 5,
    'authorization' => '127.0.0.1',
    'targetSectionId' => 99,
    'targetId' => 0,
    'customTargetName' => 'Another target'
);

$payload = json_encode($data);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($payload)
));

$result = curl_exec($ch);

curl_close($ch);

echo $result;
?>
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.OutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class CreateOrderExample {
    public static void main(String[] args) {
        try {
            URL url = new URL("https://geonix.com/personal/api/v1/YOUR_API_KEY_HERE/order/make");
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("POST");
            conn.setRequestProperty("accept", "application/json");
            conn.setRequestProperty("Content-Type", "application/json");
            conn.setDoOutput(true);

            String input = "{\"coupon\": \"OZGCNK_1\",\"countryId\": 3350393,\"periodId\": \"30d\",\"quantity\": 5,\"authorization\": \"127.0.0.1\",\"targetSectionId\": 99,\"targetId\": 0,\"customTargetName\": \"Another target\"}";

            try (OutputStream os = conn.getOutputStream()) {
                byte[] inputBytes = input.getBytes("utf-8");
                os.write(inputBytes, 0, inputBytes.length);
            }

            BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            String output;
            while ((output = br.readLine()) != null) {
                System.out.println(output);
            }

            conn.disconnect();

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Response examples

{
  "status": "success",
  "data": {
    "orderId": 200488209,
    "total": 9,
    "balance": 6.03
  },
  "errors": []
}
{
  "status": "error",
  "data": null,
  "errors": [
    {
      "message": "Insufficient funds. Total $6.03. Not enough $2.97",
      "code": 0,
      "customData": null
    }
  ]
}

On this page