# Workspace

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

## Get the workspace

**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",
    "taxLabel": "ex VAT",
    "key": { "name": "Sage stock sync", "scope": "write" }
  }
}
```

| Field       | Type   | Description                                                                        |
| ----------- | ------ | ---------------------------------------------------------------------------------- |
| `id`        | string | The workspace id.                                                                  |
| `slug`      | string | The workspace address. The trade portal is at `https://tradecatalog.app/p/{slug}`. |
| `name`      | string | The name customers know the business by.                                           |
| `currency`  | string | ISO 4217 code. Every price is in minor units of this currency.                     |
| `timezone`  | string | IANA timezone, e.g. `Europe/London`. Dates in the API are UTC.                     |
| `taxLabel`  | string | Wording shown next to prices, e.g. “ex VAT”. Prices are before tax.                |
| `key.name`  | string | The name the owner gave this key.                                                  |
| `key.scope` | string | `read` or `write`.                                                                 |
