Integration guide

Connect from your application server. Never embed a key in a browser. The service and pricing lists show actual purchasable availability.

OpenAPI 3.1 JSON
Execution and service-group scopes must be explicit. Keys are bound to your application, allowed IPs, expiry and spending cap. After a connection failure, reuse the same request key to recover status. Do not create a new key for an uncertain attempt.

curl

curl https://servernet.cloud/api/v1/identity/services \
  -H "Authorization: Bearer $SERVERNET_API_KEY"

curl -X POST https://servernet.cloud/api/v1/identity/inquiries/shahkar-inquiry \
  -H "Authorization: Bearer $SERVERNET_API_KEY" \
  -H "Idempotency-Key: $REQUEST_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @request.json

{
  "input": {"mobile": "YOUR_AUTHORIZED_MOBILE", "national_code": "YOUR_AUTHORIZED_NATIONAL_CODE"},
  "max_charge_irt": 0,
  "price_version": 0
}

Replace the example zeros with your accepted cap and a real price version from the catalog. These are not real prices.

PHP / Laravel

$response = Http::withToken(env('SERVERNET_API_KEY'))
    ->withHeaders(['Idempotency-Key' => $savedRequestKey])
    ->timeout(40)->post(
        'https://servernet.cloud/api/v1/identity/inquiries/shahkar-inquiry',
        ['input' => $authorizedInput, 'max_charge_irt' => $acceptedQuote,
         'price_version' => $priceVersion]
    );

Python

import os, requests

response = requests.post(
    "https://servernet.cloud/api/v1/identity/inquiries/shahkar-inquiry",
    headers={"Authorization": "Bearer " + os.environ["SERVERNET_API_KEY"],
             "Idempotency-Key": saved_request_key},
    json={"input": authorized_input, "max_charge_irt": accepted_quote,
          "price_version": price_version}, timeout=40)
result = response.json()

JavaScript (Node.js)

const response = await fetch(
  'https://servernet.cloud/api/v1/identity/inquiries/shahkar-inquiry', {
    method: 'POST',
    headers: {'Authorization': `Bearer ${process.env.SERVERNET_API_KEY}`,
      'Idempotency-Key': savedRequestKey, 'Content-Type': 'application/json'},
    body: JSON.stringify({input: authorizedInput,
      max_charge_irt: acceptedQuote, price_version: priceVersion})
  });
const result = await response.json();

States

Processing, inquiry outcome and financial status are independent. HTTP 202 may indicate processing or reconciliation. HTTP 402 means funds/budget, 403 authorization, 409 key/quote conflict and 429 rate or concurrency limit.

For an uncertain result, a reservation lasts at most 15 minutes from acceptance. Without reliable evidence by that deadline it is released, with no unilateral late charge. Incorrect debits are corrected; releasing a reservation is not a cash withdrawal.

GET /api/v1/identity/requests/{request_id}

A request key is unique within an application and operation. Identical input replays the same receipt; different input conflicts. A used key never becomes a new purchase after result deletion.