Skip to content
Docs menu

Reference

REST API

Workspace

Check which workspace a key belongs to, and read its currency, timezone, country and tax wording.

Get the workspaceLink to this section#

GET/api/v1/workspace

Returns the workspace the key belongs to, plus the key’s own name and scope. Call it once when your integration starts, to check the key and pick up the currency.

No parameters.

bash
curl https://tradecatalog.app/api/v1/workspace \
  -H "Authorization: Bearer $TRADECATALOG_API_KEY"
js
const res = await fetch('https://tradecatalog.app/api/v1/workspace', {
  headers: { Authorization: `Bearer ${process.env.TRADECATALOG_API_KEY}` },
})
const { data: workspace } = await res.json()
json
{
  "data": {
    "id": "0b6c1f5e-6f7a-4a57-9a0c-2f4d4c1e8a11",
    "slug": "northgate",
    "name": "Northgate Fixings",
    "currency": "GBP",
    "timezone": "Europe/London",
    "country": "GB",
    "taxLabel": "ex VAT",
    "key": { "name": "Sage stock sync", "scope": "write" }
  }
}
FieldTypeDescription
idstringThe workspace id.
slugstringThe workspace address. The trade portal is at https://tradecatalog.app/p/{slug}.
namestringThe name customers know the business by.
currencystringISO 4217 code. Every price is in minor units of this currency.
timezonestringIANA timezone, e.g. Europe/London. Dates in the API are UTC.
countrystringISO 3166 country code, e.g. GB. How the supplier writes prices and dates.
taxLabelstringShown next to prices: “ex VAT” (before tax), “inc GST” (including tax), or empty.
key.namestringThe name the owner gave this key.
key.scopestringread or write.