Solk ERP API

Send sales invoices

Sends sales and return invoices; the company card's open / paid, overdue and last-12-months revenue come from these. customer is the account's ext_id or code (with only customer_name it is matched by name). remaining = unpaid amount; without status it is derived from it (open, partial, paid, cancelled). kind: return is a return invoice (amounts count as negative). po is the customer's order number — used to match the CRM order. If no balances are sent, the overdue amount is computed from invoices.

POST/api/erp/v1/invoices

Authorization

Authorizationheaderrequired
Solk 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

itemsarrayrequired
Invoices: ext_id, no, customer, customer_name, date, due, currency, net, total, remaining, status, kind (sales · return), po, lines (code, name, qty, price).

Errors

HTTPerrorMeaning
401unauthorizedMissing, invalid, expired or revoked token.
400invalidMissing or invalid field (`message` explains).
413too_manyAt most 2,000 records per request.
429rate_limitedPer-minute request limit exceeded (`Retry-After`).
Request
curl -X POST https://ornek.solk.app/api/erp/v1/invoices \
  -H "Authorization: Bearer $SOLK_ERP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "items": [
    {
      "ext_id": "SF2026000412",
      "no": "SF2026000412",
      "customer": "120.01.045",
      "date": "2026-08-28",
      "due": "2026-09-27",
      "currency": "TRY",
      "net": 49500,
      "total": 59400,
      "remaining": 59400,
      "po": "PO-7702",
      "lines": [
        {
          "code": "HS30",
          "name": "HS 30 Isıl Yapışma Laki",
          "qty": 450,
          "price": 110
        }
      ]
    },
    {
      "ext_id": "SF2026000455",
      "no": "SF2026000455",
      "customer": "120.01.045",
      "date": "2026-09-30",
      "due": "2026-11-29",
      "currency": "TRY",
      "net": 132000,
      "total": 158400,
      "remaining": 158400,
      "po": "PO-7745"
    },
    {
      "ext_id": "SF2026000391",
      "no": "SF2026000391",
      "customer": "120.01.045",
      "date": "2026-07-26",
      "due": "2026-09-24",
      "currency": "TRY",
      "net": 80000,
      "total": 96000,
      "remaining": 0,
      "status": "paid"
    }
  ]
}'
Response
{
  "new": 3,
  "ok": true,
  "received": 3
}

Example responses were captured from a v54 installation running sample data; lists are shortened to two items.