Skip to content

Public API

The Termpact API lets an ERP or another system manage price lists and their rules, assign companies to groups and credit limits, read balances, invoices and the ledger, and record payments. It is available on the Pro plan.

  • Base URL: https://app.termpact.com/api/v1
  • Reference: OpenAPI 3.1 document (also served at https://app.termpact.com/api/v1/openapi.json)

Create a key in Settings → API keys and send it as a bearer token:

GET /api/v1/price-groups HTTP/1.1
Host: app.termpact.com
Authorization: Bearer tp_live_abcd2345_…

The secret is shown once when you create the key. Keys carry scopes:

Scope Allows
pricing:read Price lists, rules, volume breaks, locations
pricing:write Create and change price lists, rules, breaks, fixed prices
locations:write Assign a location’s price list and credit limit
ledger:read Balances, ledger entries, invoices, payments
payments:write Record payments

A revoked key stops working immediately.

  • JSON only. Send Content-Type: application/json with a body.
  • Money is { "amount_minor": 1450, "currency": "USD" } — integer minor units, never floats. Currencies are never mixed.
  • Timestamps are RFC 3339 in UTC; dates are YYYY-MM-DD in your store’s time zone.
  • Shopify objects are referred to by their numeric id ("location_id": "11" for gid://shopify/CompanyLocation/11).
  • Lists return { "data": [...], "next_cursor": "…" }. Pass cursor to get the next page and limit (up to 100) to change the page size.

Every POST needs an Idempotency-Key header (8–200 characters). Retrying with the same key and body returns the first response (with Idempotent-Replayed: true) for 24 hours; reusing a key with a different body is refused with idempotency_key_reused.

10 requests per second per key (bursts up to 20) and 50,000 requests per day per store. Over a limit you get 429 with Retry-After. If your Termpact subscription isn’t active, the API is read-only and writes return 402.

See Errors and Endpoints.