# Değişim talebi ücreti

`POST /account/api/v1/replacements/quote`

## Yetkilendirme

`Authorization: Bearer YOUR_ARNPROXY_API_KEY`

`Accept: application/json`

Gerekli izin: `read`

`Content-Type: application/json`

## Parametreler

| Ad | Tür | Zorunlu / Koşula bağlı | Varsayılan | Açıklama |
|---|---|---|---|---|
| `proxy_ids` (body) | integer[] | Zorunlu | — | 1–100 benzersiz kendi aktif proxy ID’niz. |

## İstek gövdesi

YOUR_/FROM_ alanlarını ilgili katalog, fiyat veya kapsam değerleriyle değiştirin. Örneklerde onay false bırakılır; gerçek işlemi yalnız bilinçli olarak onaylayın.

```json
{
  "proxy_ids": [
    "YOUR_PROXY_ID"
  ]
}
```

## İstek örneği

### 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/replacements/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/replacements/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/replacements/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/replacements/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/replacements/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/replacements/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/replacements/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());
```

## Yanıtlar · HTTP 200

```json
{
  "ok": true,
  "data": {
    "currency": "TRY",
    "total": "0.00",
    "total_minor": 0,
    "selection_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "items": [
      {
        "proxy_id": 12345,
        "order_id": 10001,
        "location_id": 10,
        "fee": "0.00",
        "fee_minor": 0,
        "free_request": true
      }
    ],
    "mode": "admin_review",
    "immediate_replacement": false,
    "fee_charged_on_request": true,
    "request_available": true,
    "reason_codes": [
      "not_working",
      "blocked",
      "incorrect_country",
      "different_subnet",
      "low_speed",
      "other"
    ]
  },
  "meta": {
    "request_id": "000000000000000000000001",
    "phase": "public_v1",
    "source": "arnproxy_records"
  }
}
```

| Ad | Tür | Koşula bağlı | Açıklama |
|---|---|---|---|
| `ok` | boolean | — | Başarılı istek zarfı; false ise error.code alanını okuyun. |
| `data` | object | — | İşleme özel sonuç. Örnekler temsili ve sentetiktir. |
| `data.currency` | string | — | Hesabın işlem para birimi: TRY veya USD. |
| `data.total` | string | — | Para tutarı; hassasiyet için yanıtın metin/tam sayı türünü koruyun. |
| `data.total_minor` | integer | — | En küçük para biriminde tam sayı: 1000 = 10.00 TRY/USD. |
| `data.selection_hash` | string | — | İlgili değişiklik/fiyat onayında aynen geri gönderilecek güncellik özeti. |
| `data.items` | array | — | Bu sayfanın kayıtları veya üretilen bağlantı metinleri; boş dizi de geçerli bir sonuçtur. |
| `data.items[]` | object | — | Bu sayfanın kayıtları veya üretilen bağlantı metinleri; boş dizi de geçerli bir sonuçtur. |
| `data.items[].proxy_id` | integer | — | İlgili ARNPROXY kayıt kimliği. Sağlayıcının iç kimliği yerine bunu kullanın. |
| `data.items[].order_id` | integer | — | İlgili ARNPROXY kayıt kimliği. Sağlayıcının iç kimliği yerine bunu kullanın. |
| `data.items[].location_id` | integer | — | Yerel katalogdaki lokasyon veya ürün türü kimliği. |
| `data.items[].fee` | string | — | Para tutarı; hassasiyet için yanıtın metin/tam sayı türünü koruyun. |
| `data.items[].fee_minor` | integer | — | En küçük para biriminde tam sayı: 1000 = 10.00 TRY/USD. |
| `data.items[].free_request` | boolean | — | free request alanının işleme özel değeri; örnekteki türü ve ilgili davranış notlarını esas alın. |
| `data.mode` | string | — | mode alanının işleme özel değeri; örnekteki türü ve ilgili davranış notlarını esas alın. |
| `data.immediate_replacement` | boolean | — | immediate replacement alanının işleme özel değeri; örnekteki türü ve ilgili davranış notlarını esas alın. |
| `data.fee_charged_on_request` | boolean | — | fee charged on request alanının işleme özel değeri; örnekteki türü ve ilgili davranış notlarını esas alın. |
| `data.request_available` | boolean | — | Bu sonuçtaki koşullara/izinlere göre kullanılabilirlik; tek başına stok veya sağlayıcı garantisi değildir. |
| `data.reason_codes` | array | — | reason codes alanının işleme özel değeri; örnekteki türü ve ilgili davranış notlarını esas alın. |
| `data.reason_codes[]` | string | — | reason codes alanının işleme özel değeri; örnekteki türü ve ilgili davranış notlarını esas alın. |
| `meta` | object | — | İstek izleme ve veri kaynağı bilgileri. |
| `meta.request_id` | string | — | Bu HTTP isteğinin kimliği; işlem anahtarı veya sipariş ID’si değildir. |
| `meta.phase` | string | — | phase alanının işleme özel değeri; örnekteki türü ve ilgili davranış notlarını esas alın. |
| `meta.source` | string | — | Bu alanın veri kaynağı; yerel kayıt ile canlı sağlayıcı okuması aynı şey değildir. |

## Davranış ve önemli notlar

- Bu bir yönetim incelemesi talebidir; sağlayıcıdan anında IP değiştirme garantisi vermez. Talep ücreti varsa önce replacement_quote ile kontrol edin.

Kimlik doğrulama ve alan denetimleri işlemi başlamadan reddedebilir. Hata rehberini inceleyin; destek için request_id saklayın. Anahtar veya şifre göndermeyin.

[Hatalar ve limitler](https://docs.arnproxy.com/tr/api-v1/errors)
