Skip to content
Docs menu

Reference

REST API

REST API

What the TradeCatalog REST API covers, who can use it and every endpoint at a glance.

The REST API gives your own systems the same data your staff see in TradeCatalog: products, customer prices, customers, orders, price changes and the activity log. It uses JSON over HTTPS and one API key per system.

Base URLLink to this section#

text
https://tradecatalog.app/api/v1

Every request needs an API key in the Authorization header. See Authentication.

Who can use itLink to this section#

  • Owners and admins make and revoke keys. Other staff and buyers can’t.
  • The workspace needs a Pro entitlement or a pilot account to make keys.
  • Demo workspaces can’t use the API at all.
  • When Pro ends, the workspace returns to Free: existing API keys can still read but can’t write. Catalog edits and buyer orders in the app keep working.

A key belongs to one workspace. It acts with the permissions of the person who made it, so an owner’s or admin’s key can see every customer’s prices. If that person leaves the workspace, the key stops working.

EndpointsLink to this section#

MethodPathWhat it doesScope
GET/workspaceThe workspace this key belongs toread
GET/productsList or search products, optionally at a customer’s pricesread
GET/products/{id}One product with its priceread
PUT/productsCreate or update up to 100 products by SKUwrite
GET/brandsAll brandsread
GET/categoriesAll categoriesread
GET/pricesWhat a customer pays for a SKU, and whyread
GET/customersTrade customersread
GET/customers/{id}One customer’s terms, rules, agreed prices and buyersread
PUT/customersCreate or update up to 100 customerswrite
GET/ordersRecent orders, newest firstread
GET/orders/{id}One order with lines and status historyread
PATCH/orders/{id}Move an order onwrite
GET/price-changesPrice changes, newest firstread
GET/price-changes/{id}Preview one price changeread
GET/activityWho changed whatread

The full machine-readable description is at /api/v1/openapi.json.

Before you buildLink to this section#

  • Read Conventions for money, paging, dates and how PUT works.
  • Read Errors for status codes and retries.
  • Keep keys on your server. The API doesn’t allow browser (CORS) requests.

Not in the API yetLink to this section#

  • Webhooks: poll GET /orders?status=new instead.
  • Publishing, scheduling or canceling price changes: do that in the app.
  • Discount rules and agreed prices: read them with GET /customers/{id}, change them in the app.
  • Deleting products or customers, uploading images directly, inviting buyers, placing orders as a buyer.