ARNPROXY

Locations, periods and purposes

GET/account/api/v1/catalog

Authorization

AuthorizationBearer YOUR_ARNPROXY_API_KEY
Required permissionread
Acceptapplication/json

Parameters

NameTypeDescription
product_id
queryRequired
integerProduct ID from products; 1–2147483647.

Additional usage examples

IDs and prices are illustrative; use real values from the catalog and the same quote. JSON IDs and expected_total_minor must be numbers. Examples deliberately keep terms=false; submit terms=true only after explicit customer approval for the real paid operation.

Usage purpose: select only the subpurpose

Do not ask customers to make two selections for a standard order. Find id=201 in catalog.purposes and display only its children. In purchase, purpose_id is the fixed integer 201 and subpurpose_id is the selected child ID. The hierarchical catalog shape remains for compatibility with existing integrations.

Node.js / JavaScript
const response = await fetch(
  'https://www.arnproxy.com/account/api/v1/catalog?product_id=' + productId,
  { headers: { Authorization: 'Bearer ' + apiKey } }
);
const catalog = await response.json();
if (!response.ok || !catalog.ok) throw new Error('Catalog request failed');
const purposeGroup = catalog.data.purposes.find(group => group.id === 201);
if (!purposeGroup) throw new Error('Purpose group 201 is not available');
const purposeOptions = purposeGroup.children.map(({ id, name }) => ({ id, name }));
// Show only purposeOptions. The customer selects selectedSubpurposeId.
const purchaseLine = {
  location_id: selectedLocationId,
  time_id: selectedTimeId,
  quantity: selectedQuantity,
  purpose_id: 201,
  subpurpose_id: selectedSubpurposeId
};
// Add other_purpose (1–30 characters) only when selectedSubpurposeId === -1.
// No purchase is sent by this example.

Usage purpose: select only the subpurpose

Do not ask customers to make two selections for a standard order. Find id=201 in catalog.purposes and display only its children. In purchase, purpose_id is the fixed integer 201 and subpurpose_id is the selected child ID. The hierarchical catalog shape remains for compatibility with existing integrations.

Python
import json
import urllib.request

request = urllib.request.Request(
    'https://www.arnproxy.com/account/api/v1/catalog?product_id=' + str(product_id),
    headers={'Authorization': 'Bearer ' + api_key}
)
with urllib.request.urlopen(request, timeout=20) as response:
    catalog = json.load(response)
if not catalog.get('ok'):
    raise RuntimeError('Catalog request failed')
purpose_group = next((g for g in catalog['data']['purposes'] if g['id'] == 201), None)
if purpose_group is None:
    raise RuntimeError('Purpose group 201 is not available')
purpose_options = [{'id': p['id'], 'name': p['name']} for p in purpose_group['children']]
# Display only purpose_options; the customer selects selected_subpurpose_id.
purchase_line = {
    'location_id': selected_location_id,
    'time_id': selected_time_id,
    'quantity': selected_quantity,
    'purpose_id': 201,
    'subpurpose_id': selected_subpurpose_id,
}
# For Other (-1), also set other_purpose to 1–30 characters.
# This example does not submit a purchase.

Request example

cURL
printf 'Authorization: Bearer %s\n' "$ARNPROXY_API_KEY" |
  curl --silent --show-error --header @- \
    --header 'Accept: application/json' \
    --connect-timeout 10 --max-time 30 \
    'https://www.arnproxy.com/account/api/v1/catalog?product_id=FROM_PRODUCTS'

Examples are not executed on this page. Keep the API key in a server-side environment variable; do not put real keys in URLs or browser code. Prepare request.json for POST examples.

Responses

200Success response
application/json
{
    "ok": true,
    "data": {
        "product": {
            "id": 5,
            "name": "IPv4 Proxy",
            "minimum_quantity": 1
        },
        "currency": "TRY",
        "locations": [
            {
                "id": 10,
                "name": "Example country",
                "periods": [
                    {
                        "id": 101,
                        "name": "7 days",
                        "days": 7,
                        "base_unit_price": "10.0000"
                    }
                ]
            }
        ],
        "purposes": [
            {
                "id": 201,
                "name": "Purpose",
                "children": [
                    {
                        "id": 202,
                        "name": "Example purpose"
                    }
                ]
            }
        ],
        "discount_scope": "country",
        "stock_checked": false,
        "purchase_available": true
    },
    "meta": {
        "request_id": "000000000000000000000001",
        "phase": "public_v1",
        "source": "arnproxy_records"
    }
}
Response fields and types
NameTypeDescription
okbooleanSuccess envelope flag; on false inspect error.code.
dataobjectOperation-specific result; examples are illustrative and synthetic.
data.productobjectOperation-specific product value; preserve its demonstrated type and consult the behavior notes.
data.product.idintegerRelevant ARNPROXY record ID; use it instead of the upstream internal ID.
data.product.namestringOperation-specific name value; preserve its demonstrated type and consult the behavior notes.
data.product.minimum_quantityintegerMinimum quantity for each order line of this product.
data.currencystringAccount transaction currency: TRY or USD.
data.locationsarrayOperation-specific locations value; preserve its demonstrated type and consult the behavior notes.
data.locations[]objectOperation-specific locations value; preserve its demonstrated type and consult the behavior notes.
data.locations[].idintegerRelevant ARNPROXY record ID; use it instead of the upstream internal ID.
data.locations[].namestringOperation-specific name value; preserve its demonstrated type and consult the behavior notes.
data.locations[].periodsarrayOperation-specific periods value; preserve its demonstrated type and consult the behavior notes.
data.locations[].periods[]objectOperation-specific periods value; preserve its demonstrated type and consult the behavior notes.
data.locations[].periods[].idintegerRelevant ARNPROXY record ID; use it instead of the upstream internal ID.
data.locations[].periods[].namestringOperation-specific name value; preserve its demonstrated type and consult the behavior notes.
data.locations[].periods[].daysintegerPlan duration in days, separate from a GB plan’s traffic amount.
data.locations[].periods[].base_unit_pricestringOperation-specific base unit price value; preserve its demonstrated type and consult the behavior notes.
data.purposesarrayOperation-specific purposes value; preserve its demonstrated type and consult the behavior notes.
data.purposes[]objectOperation-specific purposes value; preserve its demonstrated type and consult the behavior notes.
data.purposes[].idintegerRelevant ARNPROXY record ID; use it instead of the upstream internal ID.
data.purposes[].namestringOperation-specific name value; preserve its demonstrated type and consult the behavior notes.
data.purposes[].childrenarrayOperation-specific children value; preserve its demonstrated type and consult the behavior notes.
data.purposes[].children[]objectOperation-specific children value; preserve its demonstrated type and consult the behavior notes.
data.purposes[].children[].idintegerRelevant ARNPROXY record ID; use it instead of the upstream internal ID.
data.purposes[].children[].namestringOperation-specific name value; preserve its demonstrated type and consult the behavior notes.
data.discount_scopestringOperation-specific discount scope value; preserve its demonstrated type and consult the behavior notes.
data.stock_checkedbooleanA price/local result is not by itself a provider or stock guarantee.
data.purchase_availablebooleanAvailability under the result’s conditions/permissions, not a stock or provider guarantee.
metaobjectRequest correlation and data-source metadata.
meta.request_idstringThis HTTP request’s correlation ID, not an operation key or order ID.
meta.phasestringOperation-specific phase value; preserve its demonstrated type and consult the behavior notes.
meta.sourcestringData source; local records and a live provider lookup are different evidence.

Error response

HTTP 401 · INVALID_API_KEY
{
  "ok": false,
  "error": { "code": "INVALID_API_KEY" },
  "meta": { "request_id": "000000000000000000000001" }
}

Authentication and validation may reject a request before execution. Consult the error reference and retain request_id when contacting support. Never send keys or passwords. Errors & limits →

Behavior & important notes

  • Take identifiers from products/catalog. Quote lines contain only location_id, time_id and quantity. Purchase lines additionally require purpose_id=201 and the selected subpurpose_id.
  • Do not ask customers to make two selections for a standard order. Find id=201 in catalog.purposes and display only its children. In purchase, purpose_id is the fixed integer 201 and subpurpose_id is the selected child ID. The hierarchical catalog shape remains for compatibility with existing integrations.
  • For Other, send subpurpose_id=-1 and other_purpose containing 1–30 characters. Other selections do not require other_purpose. purpose_id remains 201.

Search the current language. Close with Esc