Companies
Save company potential
Writes the full list of rows: rows not sent are deleted, empty rows are skipped, a repeated group keeps the first (max 50 rows). Row: grp (product group; empty or Tüm ürünler = all products), unit (defaults to the group's unit), potential, share_target (0–100), ours_manual (empty = automatic), supplier. On save the company's legacy fields are synced from the rows in the base unit: potential_kg (sum), our_kg_current, share_current, share_target (weighted by potential), supplier_note. An empty list clears all rows and these fields. PUT is accepted too.
Authorization
AuthorizationheaderrequiredBearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Module: CustomersScope:
crm.writePath parameters
idintegerrequiredCompany id.
Body application/json
potentialsarray<object>requiredRows.
Errors
| HTTP | error | Meaning |
|---|---|---|
400 | invalid | Missing or invalid field (`message` explains). |
403 | forbidden | You may not see / edit this record. |
404 | not_found | Record not found. |
Request
curl -X POST https://ornek.solk.app/api/v1/customers/{id}/potentials \
-H "Authorization: Bearer $SOLK_API_KEY"const res = await fetch("https://ornek.solk.app/api/v1/customers/{id}/potentials", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOLK_API_KEY}`,
},
});
const data = await res.json();import os, requests
r = requests.post(
"https://ornek.solk.app/api/v1/customers/{id}/potentials",
headers={"Authorization": f"Bearer {os.environ['SOLK_API_KEY']}"},
)
print(r.json())Response