API endpoints
Full request and response schemas are in the OpenAPI document.
Price lists
Section titled “Price lists”| Method and path | Scope | What it does |
|---|---|---|
GET /price-groups |
pricing:read |
List price lists. |
POST /price-groups |
pricing:write |
Create a group: name, base_bp (percent off in basis points), rounding, exclude_sale_items, dates. |
GET /price-groups/{code} |
pricing:read |
One group by its code (g1, g2, …). |
PATCH /price-groups/{code} |
pricing:write |
Change settings or status (draft, active). |
DELETE /price-groups/{code} |
pricing:write |
Archive a group no location uses (409 otherwise). |
GET /price-groups/{code}/rules |
pricing:read |
The ordered percentage rules; the first rule a product matches wins. |
PUT /price-groups/{code}/rules |
pricing:write |
Replace the whole ordered list in one write (collection, vendor, type or tag; up to 300). |
GET /price-groups/{code}/volume-breaks |
pricing:read |
Volume breaks. |
PUT /price-groups/{code}/volume-breaks |
pricing:write |
Set up to 10 tiers for one variant or product; "tiers": null removes them. |
POST /price-groups/{code}/fixed-prices/import |
pricing:write |
CSV with sku or variant_id, currency, price; ?dry_run=true returns the changes without applying them. |
Prices above a variant’s retail price are refused, as in the app.
Locations
Section titled “Locations”| Method and path | Scope | What it does |
|---|---|---|
GET /locations |
pricing:read |
Company locations with their price list and credit standing. |
PUT /locations/{location_id}/assignment |
locations:write |
Set the price list (null removes it) and/or the credit limit, currency, mode (soft/hard) and overdue-hold days. Your plan’s company limit applies. |
GET /locations/{location_id}/balance |
ledger:read |
Open and overdue amounts per currency, unapplied credit, next due date and credit standing. |
Credit standing status is ok, soft_hold or hard_hold. Right after you set a limit it reads pending for a few seconds, with the limit you sent and exposure_minor 0, while Termpact works out what the location owes.
Ledger
Section titled “Ledger”| Method and path | Scope | What it does |
|---|---|---|
GET /ledger?location= |
ledger:read |
Ledger entries of a location, oldest first, with allocations; since filters by time. |
GET /invoices |
ledger:read |
Invoices, newest first; filter by location and status. |
GET /invoices/{id} |
ledger:read |
One invoice with a PDF link valid for 10 minutes. |
GET /payments |
ledger:read |
Payments with what they paid and what is unapplied. |
POST /payments |
payments:write |
Record a bank transfer, cheque, cash or other payment. "allocations": "auto" pays the oldest invoices first and keeps the rest as unapplied credit; or list invoice ids and amounts. |
Every change made through the API appears in the activity history with the key’s prefix.