Solk ERP API
Gönderilecek siparişler
ERP'ye yazılmayı bekleyen satış siparişleri (en çok 100): order gövdesinde ref, po, date, due, currency, customer (CRM kimliği, ERP ext_id / code — cari yoksa boş, unvan, vergi no / dairesi, adres, telefon, e-posta) ve lines (code, name, qty, unit, price). claim=1 siparişleri sahiplenir (30 dakika boyunca tekrar dönmez); ERP'ye yazınca sonucu POST /api/erp/v1/orders/{id} ile bildirin.
Yetkilendirme
AuthorizationheaderzorunluSolk ERP API anahtarı (erp_…): Ayarlar → Muhasebe ve ERP → Solk ERP API bağlantısı açılınca bir kez gösterilir.
X-Solk-Erp-Key başlığıyla da gönderilebilir.Sorgu parametreleri
claimintegeristeğe bağlı1 = siparişleri sahiplen.
Değerler
1Hatalar
| HTTP | error | Anlamı |
|---|---|---|
401 | unauthorized | Belirteç yok, geçersiz, süresi dolmuş ya da iptal edilmiş. |
429 | rate_limited | Dakikalık istek sınırı aşıldı (`Retry-After`). |
İstek
curl "https://ornek.solk.app/api/erp/v1/orders?claim=1" \
-H "Authorization: Bearer $SOLK_ERP_KEY"const res = await fetch("https://ornek.solk.app/api/erp/v1/orders?claim=1", {
headers: {
Authorization: `Bearer ${process.env.SOLK_ERP_KEY}`,
},
});
const data = await res.json();import os, requests
r = requests.get(
"https://ornek.solk.app/api/erp/v1/orders",
headers={"Authorization": f"Bearer {os.environ['SOLK_ERP_KEY']}"},
params={"claim": "1"},
)
print(r.json())Yanıt
{
"ok": true,
"orders": [
{
"attempts": 0,
"created_at": "2026-10-09T23:14:44",
"id": 1,
"order": {
"currency": "EUR",
"customer": {
"address": "Adana Organize Sanayi Bölgesi, 3. Cadde No: 12, Adana",
"city": "Adana",
"code": "120.01.045",
"email": "ayse.aydin@kumsalplastik.example",
"ext_id": "120.01.045",
"id": 9,
"name": "Kumsal Plastik Ambalaj San. ve Tic. A.Ş.",
"phone": "0 (322) 000 53 49",
"rid": "001GrgCmxBfaxaN",
"tax_no": "4810123456",
"tax_office": "Kozyatağı"
},
"date": "2026-06-12",
"due": null,
"kind": "Yeni Sipariş",
"lines": [
{
"code": "HS30",
"ext_id": "153.PU500",
"name": "HS 30 Isıl Yapışma Laki",
"price": 6.18,
"qty": 2000.0,
"unit": "kg"
}
],
"note": null,
"order_id": 17,
"owner": {
"email": "deniz@ornekkimya.com.tr",
"name": "Deniz Aksoy"
},
"payment_days": 90,
"po": "PO-7781",
"ref": "8015r8lSTizJbmt"
}
}
]
}Örnek yanıt örnek veriyle çalışan bir v54 kurulumundan alındı; listeler en çok iki öğeyle kısaltıldı.