Create a Static Proxy Purchase Order
Creates a static proxy purchase order using the wallet balance. A successful response means the order has been accepted and paid, after which asynchronous processing begins; the resources are not yet available at this point. During normal processing, either the entire order succeeds or the entire order fails. Partial purchase success does not occur.
API Information
| Item | Value |
|---|---|
| Method | POST |
| Path | /open-api/v1/static/purchase-orders |
| Authentication | X-API-Key |
| Content-Type | application/json |
| Processing | Asynchronous |
| Request number | Required; protection period: 24 hours |
Request Body
| Field | Type | Required | Description | Constraint |
|---|---|---|---|---|
request_no |
string | Yes | Caller-provided request number used only to prevent duplicate acceptance | 1–64 characters; letters, digits, _, and - only |
static_type |
string | Yes | Static proxy type | ISP or ISP_NATIVE |
region_code |
string | Yes | Region code | Use a value returned by the static proxy regions endpoint |
duration_days |
integer | Yes | Purchase duration in days | Only 7, 30, or 90; it must also match one of the type-duration combinations below |
quantity |
integer | Yes | Purchase quantity | A positive integer that does not exceed the available inventory at order time and meets the current purchase specification |
callback_url |
string | No | URL notified when the order reaches a terminal status | Absolute, publicly accessible HTTP/HTTPS URL, up to 2,048 characters |
Supported purchase durations by static proxy type:
static_type |
Available duration_days values |
|---|---|
ISP |
7, 30 |
ISP_NATIVE |
7, 30, 90 |
If duration_days is not 7, 30, or 90, the endpoint returns 400009. Error 300320 means the resource price does not exist or does not match the requested specification. The actual msg is returned according to X-LANG; if the header is omitted or unsupported, en_US is used.
You can call Get a Static Proxy Purchase Quote before creating an order. A quote neither reserves inventory nor locks the price. This endpoint checks inventory again and calculates the order amount using the price in effect when the order is placed.
Resources purchased through this endpoint always use the HTTP connection protocol. The request body must not contain a protocol, payment method, discount information, or any other unlisted field.
Request Example
curl --request POST \
--url 'https://api-test.puraroute.com/gin/open-api/v1/static/purchase-orders' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <YOUR_API_KEY>' \
--data '{
"request_no": "static-buy-20260824-001",
"static_type": "ISP",
"region_code": "107",
"duration_days": 30,
"quantity": 2,
"callback_url": "https://customer.example.com/proxy/order-callback"
}'
The type and region shown are only examples of the format. Use values returned by List Static Proxy Regions when calling this endpoint.
Response Fields
| Field | Type | Description |
|---|---|---|
order_no |
string | Static proxy purchase order number |
status |
string | Always PURCHASING |
static_type |
string | ISP or ISP_NATIVE |
region_code |
string | Region code |
duration_days |
integer | Purchase duration |
quantity |
integer | Purchase quantity |
order_amount |
string | Order amount in USD |
currency |
string | Always USD |
create_time |
string | Order creation time in GMT+8 ISO-8601 format |
Successful Response Example
{
"code": 0,
"msg": "success",
"data": {
"order_no": "PO1912345678901234567",
"status": "PURCHASING",
"static_type": "ISP",
"region_code": "107",
"duration_days": 30,
"quantity": 2,
"order_amount": "20.0000",
"currency": "USD",
"create_time": "2026-08-24T15:30:00.000+08:00"
},
"next": null
}
Possible Error Codes
code |
Description | Recommended Action |
|---|---|---|
300006 |
Duplicate request number | Query the purchase order; do not replay the request |
300184 |
Insufficient wallet balance | Add funds, then retry the purchase with a new request number |
300320 |
The resource price does not exist or does not match the requested specification | — |
300323 |
The region is currently unavailable for purchase | Query the regions again |
300324 |
Real-time inventory is temporarily unavailable | Query inventory first; do not repeat the same create request |
300325 |
Insufficient inventory | Reduce the quantity or query inventory again later |
400001 |
Authentication failed | Check the API Key |
400009 |
The duration is not 7, 30, or 90, or another parameter, the callback URL, or the request body does not meet the requirements |
Correct the request |
500000 |
System processing failed and the creation result may be uncertain | Query the order first; do not immediately create another order with a new request number |
If an accepted order eventually becomes FAILED, no automatic refund is issued. Contact customer support for manual handling.
After a successful creation response, save order_no and query the order details. See Callback Notifications for callback rules.
request_no is used only to prevent duplicate acceptance. It is not a result-query key and does not replay the original result. See Request Numbers and Duplicate Submissions.