OpenAPI Documentation
OpenAPI Documentation

Get a Static Proxy Purchase Quote

Returns the current purchase quote for a static proxy type, region, duration, and quantity. The endpoint checks real-time inventory and uses the currently available price. It has no side effects: it does not create an order or charge the wallet.

API Information

Item Value
Method POST
Path /open-api/v1/static/purchase-quotes
Authentication X-API-Key
Content-Type application/json
Processing Synchronous
Side effects None; does not create an order or charge the wallet

Request Body

Field Type Required Description Constraint
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 real-time available inventory at quote time and meets the current purchase specification

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.

The request body may contain only the four fields listed above. It does not accept request_no, callback_url, a quoted amount, or any other unlisted field.

Request Example

curl --request POST \
  --url 'https://api-test.puraroute.com/gin/open-api/v1/static/purchase-quotes' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <YOUR_API_KEY>' \
  --data '{
    "static_type": "ISP",
    "region_code": "107",
    "duration_days": 30,
    "quantity": 2
  }'

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

data contains only the following fields:

Field Type Description
order_amount string Current total quoted amount, always with four decimal places
currency string Always USD

Successful Response Example

{
  "code": 0,
  "msg": "success",
  "data": {
    "order_amount": "20.0000",
    "currency": "USD"
  },
  "next": null
}

The example amount illustrates the field format only and does not represent an actual price.

Quote Validity

A quote neither reserves inventory nor locks the price. When you call Create a Static Proxy Purchase Order, inventory is checked again and the order amount is calculated using the price at that time. The actual amount may differ from this quote.

Possible Error Codes

code Description
300320 The resource price does not exist or does not match the requested specification
300323 The specified type and region are currently unavailable for purchase
300324 Real-time inventory could not be obtained
300325 The purchase quantity exceeds current inventory
400001 Authentication failed
400009 The duration is not 7, 30, or 90, or another request parameter does not meet the requirements
500000 System processing failed and no quote was obtained

On this page

Get a Static Proxy Purchase Quote