Finance & ERP
Customer PO number
Writes the order's customer purchase-order number (customer_po), or clears it when empty; whitespace is collapsed, at most 60 characters. On an order already sent to the ERP (sent, open, shipped, invoiced, closed) the answer is 409 — change the number in the ERP. The response is the updated order row (order) and whether it changed (changed). Order rows (orders on company / opportunity records) carry customer_po, product_id (for live stock), status, due_date, amount and the ERP send state (erp: status, label, tone, ext_no, error; null when not sent).
Authorization
AuthorizationheaderrequiredBearer token: API key (sk_…), OAuth access token (mcp_…) or mobile session (xk_…).
Scope:
crm.writePath parameters
idintegerrequiredOrder id.
Body application/json
customer_postringoptionalThe customer's PO number; empty = clear.
Errors
| HTTP | error | Meaning |
|---|---|---|
409 | erp | The ERP operation failed (`message`: no order connection, account not matched, item has no ERP code…). |
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/orders/16/po \
-H "Authorization: Bearer $SOLK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_po": "PO-7790"
}'const res = await fetch("https://ornek.solk.app/api/v1/orders/16/po", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SOLK_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"customer_po": "PO-7790"
}),
});
const data = await res.json();import os, requests
r = requests.post(
"https://ornek.solk.app/api/v1/orders/16/po",
headers={"Authorization": f"Bearer {os.environ['SOLK_API_KEY']}"},
json={
"customer_po": "PO-7790"
},
)
print(r.json())Response
{
"changed": true,
"ok": true,
"order": {
"amount": 24720.0,
"currency": "EUR",
"customer_id": 9,
"customer_po": "PO-7790",
"date": "2026-09-23",
"due_date": null,
"erp": null,
"id": 16,
"kg": 4000.0,
"kind": "Yeni Sipariş",
"note": "",
"opp_id": 52,
"payment_days": 90,
"price": 6.18,
"product": "HS 30 Isıl Yapışma Laki",
"product_id": 5,
"pu": "€/kg",
"status": "Kapandı",
"unit": "kg"
}
}Example responses were captured from a v58 installation running sample data; lists are shortened to two items.