# Renewal quote; no debit

`POST /account/api/v1/renewals/quote`

## Authorization

`Authorization: Bearer YOUR_ARNPROXY_API_KEY`

`Accept: application/json`

Required permission: `read`

`Content-Type: application/json`

## Parameters

| Name | Type | Required / Conditional | Default | Description |
|---|---|---|---|---|
| `proxy_ids` (body) | integer[] | Required | — | 1–1000 unique owned proxy IDs; do not mix product types where a common scope/price is required. Some operations have tighter bounds. |
| `time_id` (body) | integer | Required | — | Period/GB-plan ID from the matching catalog/options, not a day/GB count. |
| `promo_code` (body) | string | Optional | `""` | Optional promo, up to 100 bytes. Keep it identical between quote and purchase/renewal. |

## 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.

```json
{
  "proxy_ids": [
    "YOUR_PROXY_ID"
  ],
  "time_id": "FROM_RENEWAL_OPTIONS",
  "promo_code": ""
}
```

## Request example

### curl

```curl
printf 'Authorization: Bearer %s\n' "$ARNPROXY_API_KEY" |
  curl --silent --show-error --header @- \
    --header 'Accept: application/json' \
    --connect-timeout 10 --max-time 30 \
    --request POST --header 'Content-Type: application/json' \
    --data-binary @request.json \
    'https://www.arnproxy.com/account/api/v1/renewals/quote'
```

### python

```python
import os, requests

headers = {"Authorization": "Bearer " + os.environ["ARNPROXY_API_KEY"]}
import json
with open("request.json", encoding="utf-8") as f:
    payload = json.load(f)
response = requests.post(
    "https://www.arnproxy.com/account/api/v1/renewals/quote",
    headers=headers, json=payload,
    timeout=(10, 30), allow_redirects=False
)
print(response.status_code, response.text)
# No automatic write retry.
```

### javascript

```javascript
const headers = { Authorization: `Bearer ${process.env.ARNPROXY_API_KEY}` };
const { readFile } = await import('node:fs/promises');
headers['Content-Type'] = 'application/json';
const body = await readFile('request.json', 'utf8');
const response = await fetch("https://www.arnproxy.com/account/api/v1/renewals/quote", {
  method: 'POST', headers, redirect: 'error',
  signal: AbortSignal.timeout(30000), body
});
console.log(response.status, await response.text());
// A write timeout is ambiguous; query its saved operation.
```

### php

```php
<?php
$headers = ['Accept: application/json',
    'Authorization: Bearer '.getenv('ARNPROXY_API_KEY')];
$headers[] = 'Content-Type: application/json';
$ch = curl_init('https://www.arnproxy.com/account/api/v1/renewals/quote');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_FOLLOWLOCATION => false,
    CURLOPT_SSL_VERIFYPEER => true, CURLOPT_SSL_VERIFYHOST => 2,
    CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_TIMEOUT => 30,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => file_get_contents('request.json'),
]);
$result = curl_exec($ch);
if ($result === false) {
    // Do not repeat a write; use the original operation key.
    throw new RuntimeException('Transport result unknown');
}
echo curl_getinfo($ch, CURLINFO_HTTP_CODE).PHP_EOL.$result;
curl_close($ch);
```

### go

```go
package main

import (
  "fmt"
  "io"
  "net/http"
  "os"
  "time"
)

func main() {
  client := &http.Client{Timeout: 30*time.Second,
    CheckRedirect: func(req *http.Request, via []*http.Request) error {
      return http.ErrUseLastResponse
    }}
  var body io.Reader
  file, err := os.Open("request.json"); if err != nil { panic(err) }
  defer file.Close(); body = file
  req, err := http.NewRequest("POST", "https://www.arnproxy.com/account/api/v1/renewals/quote", body)
  if err != nil { panic(err) }
  req.Header.Set("Authorization", "Bearer "+os.Getenv("ARNPROXY_API_KEY"))
  req.Header.Set("Content-Type", "application/json")
  res, err := client.Do(req); if err != nil { panic(err) }
  defer res.Body.Close()
  data, err := io.ReadAll(res.Body); if err != nil { panic(err) }
  fmt.Println(res.StatusCode, string(data))
}
```

### csharp

```csharp
using System;
using System.IO;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;

using var handler = new HttpClientHandler { AllowAutoRedirect = false };
using var client = new HttpClient(handler) { Timeout = TimeSpan.FromSeconds(30) };
using var request = new HttpRequestMessage(HttpMethod.Post,
    "https://www.arnproxy.com/account/api/v1/renewals/quote");
request.Headers.Authorization = new AuthenticationHeaderValue(
    "Bearer", Environment.GetEnvironmentVariable("ARNPROXY_API_KEY"));
request.Content = new StringContent(
    await File.ReadAllTextAsync("request.json"), Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
// Never automatically retry an ambiguous write.
```

### java

```java
import java.net.URI;
import java.net.http.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.*;

// Inside your application method:
var client = HttpClient.newHttpClient();
var request = HttpRequest.newBuilder(URI.create("https://www.arnproxy.com/account/api/v1/renewals/quote"))
    .header("Authorization", "Bearer " + System.getenv("ARNPROXY_API_KEY"))
    .header("Accept", "application/json")
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(
        Files.readString(Path.of("request.json"), StandardCharsets.UTF_8)))
    .build();
var response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
```

## Responses · HTTP 200

```json
{
  "ok": true,
  "data": {
    "product_id": 5,
    "currency": "TRY",
    "proxy_ids": [
      12345
    ],
    "quantity": 1,
    "selection_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "time_id": 101,
    "period": "7 days",
    "days": 7,
    "base_total": "10.00",
    "quantity_discount_amount": "0.00",
    "subtotal": "10.00",
    "promotion": {
      "code": "",
      "rate": "0.00",
      "amount": "0.00"
    },
    "total": "10.00",
    "total_minor": 1000,
    "lines": [
      {
        "location_id": 10,
        "country": "Example country",
        "quantity": 1,
        "base_unit_price": "10.0000",
        "unit_price": "10.0000",
        "quantity_discount_rate": "0.00",
        "total_minor": 1000,
        "total": "10.00"
      }
    ],
    "proxies": [
      {
        "id": 12345,
        "location_id": 10,
        "last_service_date": "2030-02-01",
        "projected_last_service_date": "2030-02-08",
        "total": "10.00",
        "total_minor": 1000
      }
    ],
    "discount_scope": "country",
    "timezone": "Europe/Istanbul",
    "estimate_only": true,
    "renewal_available": true,
    "provider_checked": false,
    "calculated_at": "2030-01-01T12:00:00+00:00"
  },
  "meta": {
    "request_id": "000000000000000000000001",
    "phase": "public_v1",
    "source": "arnproxy_records"
  }
}
```

| Name | Type | Conditional | Description |
|---|---|---|---|
| `ok` | boolean | — | Success envelope flag; on false inspect error.code. |
| `data` | object | — | Operation-specific result; examples are illustrative and synthetic. |
| `data.product_id` | integer | — | Local catalog location or product-type ID. |
| `data.currency` | string | — | Account transaction currency: TRY or USD. |
| `data.proxy_ids` | array | — | Proxy IDs in the scope visible to this account. |
| `data.proxy_ids[]` | integer | — | Proxy IDs in the scope visible to this account. |
| `data.quantity` | integer | — | Selected or ordered proxy quantity. |
| `data.selection_hash` | string | — | Freshness fingerprint to copy unchanged to the corresponding write/price confirmation. |
| `data.time_id` | integer | — | Local period/GB-plan record ID, not a day or GB count. |
| `data.period` | string | — | Human-readable catalog period name. |
| `data.days` | integer | — | Plan duration in days, separate from a GB plan’s traffic amount. |
| `data.base_total` | string | — | Money amount; preserve the returned string/integer representation for precision. |
| `data.quantity_discount_amount` | string | — | Operation-specific quantity discount amount value; preserve its demonstrated type and consult the behavior notes. |
| `data.subtotal` | string | — | Money amount; preserve the returned string/integer representation for precision. |
| `data.promotion` | object | — | Operation-specific promotion value; preserve its demonstrated type and consult the behavior notes. |
| `data.promotion.code` | string | — | Operation-specific code value; preserve its demonstrated type and consult the behavior notes. |
| `data.promotion.rate` | string | — | Operation-specific rate value; preserve its demonstrated type and consult the behavior notes. |
| `data.promotion.amount` | string | — | Money amount; preserve the returned string/integer representation for precision. |
| `data.total` | string | — | Money amount; preserve the returned string/integer representation for precision. |
| `data.total_minor` | integer | — | Integer minor units: 1000 means 10.00 TRY/USD. |
| `data.lines` | array | — | Operation-specific lines value; preserve its demonstrated type and consult the behavior notes. |
| `data.lines[]` | object | — | Operation-specific lines value; preserve its demonstrated type and consult the behavior notes. |
| `data.lines[].location_id` | integer | — | Local catalog location or product-type ID. |
| `data.lines[].country` | string | — | Operation-specific country value; preserve its demonstrated type and consult the behavior notes. |
| `data.lines[].quantity` | integer | — | Selected or ordered proxy quantity. |
| `data.lines[].base_unit_price` | string | — | Operation-specific base unit price value; preserve its demonstrated type and consult the behavior notes. |
| `data.lines[].unit_price` | string | — | Operation-specific unit price value; preserve its demonstrated type and consult the behavior notes. |
| `data.lines[].quantity_discount_rate` | string | — | Operation-specific quantity discount rate value; preserve its demonstrated type and consult the behavior notes. |
| `data.lines[].total_minor` | integer | — | Integer minor units: 1000 means 10.00 TRY/USD. |
| `data.lines[].total` | string | — | Money amount; preserve the returned string/integer representation for precision. |
| `data.proxies` | array | — | Operation-specific proxies value; preserve its demonstrated type and consult the behavior notes. |
| `data.proxies[]` | object | — | Operation-specific proxies value; preserve its demonstrated type and consult the behavior notes. |
| `data.proxies[].id` | integer | — | Relevant ARNPROXY record ID; use it instead of the upstream internal ID. |
| `data.proxies[].location_id` | integer | — | Local catalog location or product-type ID. |
| `data.proxies[].last_service_date` | string | — | Last service day: current, previous or projected by the quote. A projection does not renew. |
| `data.proxies[].projected_last_service_date` | string | — | Last service day: current, previous or projected by the quote. A projection does not renew. |
| `data.proxies[].total` | string | — | Money amount; preserve the returned string/integer representation for precision. |
| `data.proxies[].total_minor` | integer | — | Integer minor units: 1000 means 10.00 TRY/USD. |
| `data.discount_scope` | string | — | Operation-specific discount scope value; preserve its demonstrated type and consult the behavior notes. |
| `data.timezone` | string | — | Timezone for related date fields; null means no verified timezone. |
| `data.estimate_only` | boolean | — | Operation-specific estimate only value; preserve its demonstrated type and consult the behavior notes. |
| `data.renewal_available` | boolean | — | Availability under the result’s conditions/permissions, not a stock or provider guarantee. |
| `data.provider_checked` | boolean | — | A price/local result is not by itself a provider or stock guarantee. |
| `data.calculated_at` | string | — | Timestamp in the API’s returned representation; example dates are synthetic. |
| `meta` | object | — | Request correlation and data-source metadata. |
| `meta.request_id` | string | — | This HTTP request’s correlation ID, not an operation key or order ID. |
| `meta.phase` | string | — | Operation-specific phase value; preserve its demonstrated type and consult the behavior notes. |
| `meta.source` | string | — | Data source; local records and a live provider lookup are different evidence. |

## Behavior & important notes

- Renewal uses existing website pricing and balance processing. Copy amount, days and selection hash from the same renewal_quote. It does not enable automatic renewal.
- Proxies in one renewal request must share the same product type. Quantity discounts are calculated separately using each country’s selected quantity, not the combined country total.

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](https://docs.arnproxy.com/api-v1/errors)
