ARNPROXY

Balance Residential order via website delivery queue

POST/account/api/v1/residential/orders/create
Confirm the operation deliberately

This operation may change a record, balance or service configuration. Read its scope and notes first. After an uncertain result, query the same operation rather than starting another.

Authorization

AuthorizationBearer YOUR_ARNPROXY_API_KEY
Required permissionpurchases
Acceptapplication/json
Content-Typeapplication/json
Idempotency-Key16–100 letters, digits, _ or -. Persist and reuse the same value for the same operation.

Parameters

NameTypeDescription
Idempotency-Key
headerRequired
string16–100 letters/digits/_/-. Keep the same value for the operation/status; do not reuse with a different body.
mode
bodyRequired
stringnew creates a package; topup adds GB to an owned package.
time_id
bodyRequired
integerPeriod/GB-plan ID from the matching catalog/options, not a day/GB count.
location_id
bodyConditional
integerRequired for mode=new only; forbidden for topup.
package_id
bodyConditional
integerRequired for mode=topup only; forbidden for new.
promo_code
bodyOptional
stringOptional promo, up to 100 bytes. Keep it identical between quote and purchase/renewal.
Default: ""
currency
bodyRequired
stringTRY or USD from the same quote; must match the account currency.
expected_total_minor
bodyRequired
integertotal_minor from the same quote, as an integer; never decimal money or a string. At least 1.
expected_selection_hash
bodyRequired
stringselection_hash from the same quote: 64 lowercase hexadecimal characters.
terms
bodyRequired
booleanMust be the JSON boolean true for explicit approval, not the string "true".

Request body

Replace YOUR_/FROM_ placeholders with values from the relevant catalog, quote or scope. Examples leave consent false; only approve a real operation intentionally.

request.json
{
    "mode": "topup",
    "package_id": "YOUR_PACKAGE_ID",
    "time_id": "FROM_RESIDENTIAL_CATALOG",
    "promo_code": "",
    "currency": "FROM_QUOTE",
    "expected_total_minor": "FROM_QUOTE_TOTAL_MINOR",
    "expected_selection_hash": "FROM_QUOTE_SELECTION_HASH",
    "terms": false
}

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.

Residential: new package versus GB top-up · mode=new

Customers do not select a purpose for Residential orders. For a new package, the server automatically assigns the same fixed purpose as the website checkout; do not send purpose_id, subpurpose_id or other_purpose. A top-up preserves the existing package purpose.

application/json
{
    "mode": "new",
    "location_id": 20,
    "time_id": 201,
    "promo_code": "",
    "currency": "TRY",
    "expected_total_minor": 1000,
    "expected_selection_hash": "0000000000000000000000000000000000000000000000000000000000000000",
    "terms": false
}

Residential: new package versus GB top-up · mode=topup

Customers do not select a purpose for Residential orders. For a new package, the server automatically assigns the same fixed purpose as the website checkout; do not send purpose_id, subpurpose_id or other_purpose. A top-up preserves the existing package purpose.

application/json
{
    "mode": "topup",
    "package_id": 10001,
    "time_id": 201,
    "promo_code": "",
    "currency": "TRY",
    "expected_total_minor": 1000,
    "expected_selection_hash": "0000000000000000000000000000000000000000000000000000000000000000",
    "terms": false
}

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 \
    --header 'Idempotency-Key: YOUR_SAVED_OPERATION_KEY' \
    --request POST --header 'Content-Type: application/json' \
    --data-binary @request.json \
    'https://www.arnproxy.com/account/api/v1/residential/orders/create'

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

201Success response
application/json
{
    "ok": true,
    "data": {
        "state": "accepted",
        "mode": "topup",
        "delivery_state_at_acceptance": "queued",
        "currency": "TRY",
        "total": "15.00",
        "total_minor": 1500,
        "gb": 1,
        "days": 30,
        "target_package_id": 20001,
        "order": {
            "id": 20002,
            "number": "1000020002",
            "location_id": 20,
            "time_id": 201,
            "last_service_date": "2030-02-01"
        },
        "accepted_at": "2030-01-01T12:00:00+00:00",
        "automatic_renewal": false,
        "source": "existing_website_residential_delivery",
        "replayed": false
    },
    "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.statestringRecord/operation state. accepted is not delivery; completed is not a connection test.
data.modestringOperation-specific mode value; preserve its demonstrated type and consult the behavior notes.
data.delivery_state_at_acceptancestringOperation-specific delivery state at acceptance value; preserve its demonstrated type and consult the behavior notes.
data.currencystringAccount transaction currency: TRY or USD.
data.totalstringMoney amount; preserve the returned string/integer representation for precision.
data.total_minorintegerInteger minor units: 1000 means 10.00 TRY/USD.
data.gbintegerTraffic amount; list/settings operations do not purchase traffic.
data.daysintegerPlan duration in days, separate from a GB plan’s traffic amount.
data.target_package_idintegerOperation-specific target package id value; preserve its demonstrated type and consult the behavior notes.
data.orderobjectOperation-specific order value; preserve its demonstrated type and consult the behavior notes.
data.order.idintegerRelevant ARNPROXY record ID; use it instead of the upstream internal ID.
data.order.numberstringDisplay order number; not interchangeable with fields requesting an id.
data.order.location_idintegerLocal catalog location or product-type ID.
data.order.time_idintegerLocal period/GB-plan record ID, not a day or GB count.
data.order.last_service_datestringLast service day: current, previous or projected by the quote. A projection does not renew.
data.accepted_atstringTimestamp in the API’s returned representation; example dates are synthetic.
data.automatic_renewalbooleanOperation-specific automatic renewal value; preserve its demonstrated type and consult the behavior notes.
data.sourcestringData source; local records and a live provider lookup are different evidence.
data.replayedbooleanSaved result for the same operation was returned, not proof of a new debit/action.
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

  • Package and list IDs are ARNPROXY record IDs, not upstream package keys or list IDs. A stale package snapshot cannot grant access; refresh it with residential_package_refresh when needed.
  • mode=new creates a package; mode=topup adds GB to an existing one. Use residential_catalog/quote first. Balance acceptance and background delivery are separate; follow the same operation key.
  • A timeout/5xx is not proof that a write failed. Use the original Idempotency-Key with its status resource. Do not retry under a new key; GET does not resend the change.
  • Customers do not select a purpose for Residential orders. For a new package, the server automatically assigns the same fixed purpose as the website checkout; do not send purpose_id, subpurpose_id or other_purpose. A top-up preserves the existing package purpose.
  • For compatibility, valid legacy subpurpose_id/other_purpose fields may be accepted with mode=new, but do not change the automatically assigned purpose of a new order. New integrations should omit them. They are not supported with mode=topup. Previously accepted requests can be replayed with the same Idempotency-Key and request; do not repurchase with a new key.
  • If the automatic purpose configuration is unavailable, RESIDENTIAL_DEFAULT_PURPOSE_UNAVAILABLE (HTTP 503) is returned without creating an order or debiting the balance. An administrator must check the configuration.
Follow the same operationSaved acceptance and current Residential delivery state →

Search the current language. Close with Esc