Solk ERP API
Send accounts
Sends ERP accounts; Solk matches each to a CRM company — tax number first, then name (Turkish letters and legal suffixes ignored). If the connection is set to create companies for unmatched accounts, unmatched ones are created (created). If a record carries balance, overdue, credit_limit the balance is written too. ext_id is the account's stable ERP id (else code); the same ext_id updates the record. At most 2,000 records per request.
Authorization
AuthorizationheaderrequiredSolk ERP API key (erp_…): shown once when a Solk ERP API connection is created under Settings → Accounting & ERP. May also be sent as the
X-Solk-Erp-Key header.Body application/json
itemsarrayrequiredAccounts:
ext_id, code, name, tax_no, tax_office, email, phone, city, currency, (optional) balance, overdue, credit_limit.Errors
| HTTP | error | Meaning |
|---|---|---|
401 | unauthorized | Missing, invalid, expired or revoked token. |
400 | invalid | Missing or invalid field (`message` explains). |
413 | too_many | At most 2,000 records per request. |
429 | rate_limited | Per-minute request limit exceeded (`Retry-After`). |
Request
curl -X POST https://ornek.solk.app/api/erp/v1/customers \
-H "Authorization: Bearer $SOLK_ERP_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"ext_id": "120.01.045",
"code": "120.01.045",
"name": "Kumsal Plastik Ambalaj San. ve Tic. A.Ş.",
"tax_no": "4810123456",
"tax_office": "Kozyatağı",
"city": "İstanbul",
"currency": "TRY"
},
{
"ext_id": "120.01.051",
"code": "120.01.051",
"name": "Deniz Ambalaj San. ve Tic. A.Ş.",
"tax_no": "2950312874",
"tax_office": "Gebze",
"city": "Kocaeli",
"currency": "TRY"
}
]
}'const res = await fetch("https://ornek.solk.app/api/erp/v1/customers", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOLK_ERP_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"items": [
{
"ext_id": "120.01.045",
"code": "120.01.045",
"name": "Kumsal Plastik Ambalaj San. ve Tic. A.Ş.",
"tax_no": "4810123456",
"tax_office": "Kozyatağı",
"city": "İstanbul",
"currency": "TRY"
},
{
"ext_id": "120.01.051",
"code": "120.01.051",
"name": "Deniz Ambalaj San. ve Tic. A.Ş.",
"tax_no": "2950312874",
"tax_office": "Gebze",
"city": "Kocaeli",
"currency": "TRY"
}
]
}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://ornek.solk.app/api/erp/v1/customers",
headers={"Authorization": f"Bearer {os.environ['SOLK_ERP_KEY']}"},
json={
"items": [
{
"ext_id": "120.01.045",
"code": "120.01.045",
"name": "Kumsal Plastik Ambalaj San. ve Tic. A.Ş.",
"tax_no": "4810123456",
"tax_office": "Kozyatağı",
"city": "İstanbul",
"currency": "TRY"
},
{
"ext_id": "120.01.051",
"code": "120.01.051",
"name": "Deniz Ambalaj San. ve Tic. A.Ş.",
"tax_no": "2950312874",
"tax_office": "Gebze",
"city": "Kocaeli",
"currency": "TRY"
}
]
},
)
print(r.json())Response
{
"created": 0,
"matched": 1,
"new": 2,
"ok": true,
"received": 2,
"unmatched_total": 1
}Example responses were captured from a v54 installation running sample data; lists are shortened to two items.