OpenAPI Documentation
OpenAPI Documentation
Quickstart
This page uses the Get wallet balance API to verify the Base URL, network connectivity, and API key.
1. Prepare an API key
Follow Authentication to create and securely save an API key in the test-environment web console.
2. Send a request
curl --request GET \
--url 'https://api-test.puraroute.com/gin/open-api/v1/wallet/balance' \
--header 'Accept: application/json' \
--header 'X-API-Key: <YOUR_API_KEY>' \
--header 'X-LANG: en_US'
3. Evaluate the result
Example successful response:
{
"code": 0,
"msg": "success",
"data": {
"available_balance": "125.5000",
"currency": "USD"
},
"next": null
}
Verify all of the following:
- The request received an HTTP response.
- The response body can be parsed as JSON.
codeequals0.
Do not determine business success from the HTTP status alone. When a request reaches the Open API and the Open API produces a normal response, the business result uses HTTP 200. Transport failures may still return a non-200 status, a non-JSON body, or an empty response. See Response structure.
4. Save the trace ID
Normal Open API responses include an X-TRACE-ID response header. Save any available trace ID in your application logs for troubleshooting, but do not log the API key or proxy password with it.
Next steps
- To purchase dynamic traffic and create dynamic sub-accounts, read the Dynamic proxy workflow.
- To purchase static proxies, read the Static proxy purchase workflow.
- To browse every API, open the API Reference.