API v1 · taslak
Teklifler
Seçiminiz için sunucuda fiyat teklifi oluşturun ve okuyun.
Taslak sözleşme · uçlar henüz çalışmıyor.
Teklifler
Fiyat teklifi oluştur
POST/v1/catalog/quotes
Seçiminiz için sunucuda fiyat teklifi oluşturur (üyeler). Gövdede yalnız seçenek, konum, süre, işlem ve adet gider; fiyat ve toplam sunucuda hesaplanır.
Başlıklar
| Ad | Tür | Değerler |
|---|---|---|
X-DCC-Context zorunlu | metin | en çok 32 karakter |
Gövde
| Ad | Tür | Değerler |
|---|---|---|
items zorunlu | liste · nesne | |
items[].plan_id zorunlu | kimlik | |
items[].location zorunlu | metin | |
items[].period_months zorunlu | tam sayı | 1 · 3 · 6 · 12 · 24 · 36 |
items[].operation zorunlu | metin | new · renew |
items[].quantity seçimli | tam sayı | aralık 1–10; varsayılan 1 |
Yanıtlar
- 201Oluşturuldu
- 400İstek geçersiz ya da tanımsız alan var
- 401Oturum ya da geçerli belirteç yok
- 403Yetkiniz yetmiyor ya da e-postanız doğrulanmamış
- 404Bulunamadı ya da size görünmüyor (ikisi aynı yanıt)
- 409Çakışma: bağlam etiketi eski ya da kaydın durumu uygun değil
- 429Çok fazla istek; biraz bekleyip yeniden deneyin
- 503Bağlı servis geçici olarak yanıt vermiyor; hiçbir şey yazılmadı
$ curl -X POST "$DCC_API/catalog/quotes" \
-H "Authorization: Bearer $DCC_API_ANAHTARI" \
-H "X-DCC-Context: $DCC_BAGLAM" \
-H "Content-Type: application/json" \
-d '{"items": [{"plan_id": "0192f0a4-6c3e-7b1d-9a52-3e8c4d7f1a20", "location": "TR", "period_months": 1, "operation": "new"}]}'import json, os, urllib.request
req = urllib.request.Request(
os.environ["DCC_API"] + "/catalog/quotes",
method="POST",
data=json.dumps({"items": [{"plan_id": "0192f0a4-6c3e-7b1d-9a52-3e8c4d7f1a20", "location": "TR", "period_months": 1, "operation": "new"}]}).encode(),
headers={"Authorization": "Bearer " + os.environ["DCC_API_ANAHTARI"], "X-DCC-Context": os.environ["DCC_BAGLAM"], "Content-Type": "application/json"},
)
with urllib.request.urlopen(req) as yanit:
print(yanit.status, yanit.read().decode())const yanit = await fetch(process.env.DCC_API + "/catalog/quotes", {
method: "POST",
headers: { Authorization: "Bearer " + process.env.DCC_API_ANAHTARI, "X-DCC-Context": process.env.DCC_BAGLAM, "Content-Type": "application/json" },
body: JSON.stringify({"items": [{"plan_id": "0192f0a4-6c3e-7b1d-9a52-3e8c4d7f1a20", "location": "TR", "period_months": 1, "operation": "new"}]}),
});
console.log(yanit.status, await yanit.text());{
"id": "0192f0a4-6c3e-7b1d-9a52-3e8c4d7f1a20",
"status": "open",
"price_list_version": "…",
"lines": [
{
"plan_id": "0192f0a4-6c3e-7b1d-9a52-3e8c4d7f1a20",
"plan_name": "Başlangıç",
"location": "TR",
"period_months": 1,
"operation": "new",
"quantity": 1,
"unit_price": {
"amount": "100.00",
"currency": "TRY"
},
"line_total": {
"amount": "100.00",
"currency": "TRY"
}
}
],
"subtotal": {
"amount": "100.00",
"currency": "TRY"
},
"tax": {
"amount": "100.00",
"currency": "TRY"
},
"total": {
"amount": "100.00",
"currency": "TRY"
},
"expires_at": "2026-11-03T10:00:00Z",
"created_at": "2026-11-03T10:00:00Z"
}Deneme alanında dene · henüz açık değil
Teklifler
Teklifi oku
GET/v1/catalog/quotes/{quote_id}
Kendi teklifinizi okur. Başka kişi ya da kuruluşun teklifi 404 döner.
Yol parametreleri
| Ad | Tür | Değerler |
|---|---|---|
quote_id zorunlu | kimlik |
Yanıtlar
- 200Başarılı
- 401Oturum ya da geçerli belirteç yok
- 403Yetkiniz yetmiyor ya da e-postanız doğrulanmamış
- 404Bulunamadı ya da size görünmüyor (ikisi aynı yanıt)
- 503Bağlı servis geçici olarak yanıt vermiyor; hiçbir şey yazılmadı
$ curl "$DCC_API/catalog/quotes/{quote_id}" \
-H "Authorization: Bearer $DCC_API_ANAHTARI"import json, os, urllib.request
req = urllib.request.Request(
os.environ["DCC_API"] + "/catalog/quotes/{quote_id}",
headers={"Authorization": "Bearer " + os.environ["DCC_API_ANAHTARI"]},
)
with urllib.request.urlopen(req) as yanit:
print(yanit.status, yanit.read().decode())const yanit = await fetch(process.env.DCC_API + "/catalog/quotes/{quote_id}", {
headers: { Authorization: "Bearer " + process.env.DCC_API_ANAHTARI },
});
console.log(yanit.status, await yanit.text());{
"id": "0192f0a4-6c3e-7b1d-9a52-3e8c4d7f1a20",
"status": "open",
"price_list_version": "…",
"lines": [
{
"plan_id": "0192f0a4-6c3e-7b1d-9a52-3e8c4d7f1a20",
"plan_name": "Başlangıç",
"location": "TR",
"period_months": 1,
"operation": "new",
"quantity": 1,
"unit_price": {
"amount": "100.00",
"currency": "TRY"
},
"line_total": {
"amount": "100.00",
"currency": "TRY"
}
}
],
"subtotal": {
"amount": "100.00",
"currency": "TRY"
},
"tax": {
"amount": "100.00",
"currency": "TRY"
},
"total": {
"amount": "100.00",
"currency": "TRY"
},
"expires_at": "2026-11-03T10:00:00Z",
"created_at": "2026-11-03T10:00:00Z"
}Deneme alanında dene · henüz açık değil
Kulüp
Üye olunca ne kazanırsınız
- Dijital kulüp kartı; kulüp üyesine metal NFC kart
- Ücretsiz seviyenin sınırları genişler
- Yenilikleri önce siz görürsünüz
- Davet ettiğiniz her üyeyle ayrıcalık kazanırsınız