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 make and revoke keys. Staff and buyers can’t.
  • The workspace needs an active subscription, a free trial or a pilot account to make keys.
  • Demo workspaces can’t use the API at all.
  • If a subscription lapses and the workspace goes read-only, existing keys can still read but can’t write.

A key belongs to one workspace. It acts with owner rights on that workspace, so it can see every customer’s prices.

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 cancelling 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.