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.

POST/api/v1/customers/{id}/potentials

Authorization

Authorizationheaderrequired
Bearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Module: CustomersScope: crm.write

Path parameters

idintegerrequired
Company id.

Body application/json

potentialsarray<object>required
Rows.

Errors

HTTPerrorMeaning
400invalidMissing or invalid field (`message` explains).
403forbiddenYou may not see / edit this record.
404not_foundRecord not found.
Request
curl -X POST https://ornek.solk.app/api/v1/customers/{id}/potentials \
  -H "Authorization: Bearer $SOLK_API_KEY"
Response