Solk ERP API
Send stock
Writes the quantity on hand and the warehouse breakdown by item code (warehouses: [{name, qty}]; without qty the warehouses are summed). Stock on orders and the product list shows this value.
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
itemsarrayrequiredStock:
code, qty, warehouses (name, qty).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/stock \
-H "Authorization: Bearer $SOLK_ERP_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"code": "HS30",
"qty": 5769,
"warehouses": [
{
"name": "Merkez",
"qty": 4200
},
{
"name": "Gebze",
"qty": 1569
}
]
}
]
}'const res = await fetch("https://ornek.solk.app/api/erp/v1/stock", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOLK_ERP_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"items": [
{
"code": "HS30",
"qty": 5769,
"warehouses": [
{
"name": "Merkez",
"qty": 4200
},
{
"name": "Gebze",
"qty": 1569
}
]
}
]
}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://ornek.solk.app/api/erp/v1/stock",
headers={"Authorization": f"Bearer {os.environ['SOLK_ERP_KEY']}"},
json={
"items": [
{
"code": "HS30",
"qty": 5769,
"warehouses": [
{
"name": "Merkez",
"qty": 4200
},
{
"name": "Gebze",
"qty": 1569
}
]
}
]
},
)
print(r.json())Response
{
"ok": true,
"received": 1
}Example responses were captured from a v54 installation running sample data; lists are shortened to two items.