# Get a category

> One category with its materials or types and the questions a listing answers (send the answers under fields).


`GET https://dev.siteswap.pro/api/v1/catalog/categories/{id}`

One category with its materials or types and the questions a listing answers (send the answers under `fields`).

Needs the `listings:read` scope.

## Parameters

- `id` (path, string, required): The category's id

## Responses

- 200: OK
- 400: bad_request, key_in_url or invalid_json: the request could not be read
- 401: missing_key or invalid_key: no key, or a key that is not valid or was revoked
- 403: key_pending, key_declined, scope_missing, terms_required or account_unavailable: see Errors
- 404: not_found: nothing here that you may see
- 413: too_large: the body is over 256 KB
- 429: rate_limited or daily_quota: wait for Retry-After seconds

## Response fields

- `id` (string)
- `slug` (string)
- `name` (string)
- `units` (string[]): The units a listing may use
- `soil_statement` (boolean): Offered soil or fill needs the soil statement
- `live_listings` (integer)
- `marketplace` (string)
- `materials` (object[])
- `materials[].id` (string)
- `materials[].name` (string)
- `materials[].other_names` (string[]): Regional names it is also found by
- `fields` (object[])
- `fields[].key` (string): Send the answer under `fields.{key}`
- `fields[].label` (string)
- `fields[].kind` (string): `text`, `number` or `select`
- `fields[].options` (string[]): For `select`: the answers allowed
- `fields[].unit` (string | null)
- `fields[].required` (boolean): Needed on an offered listing

```json
{
  "data": {
    "id": "string",
    "slug": "string",
    "name": "string",
    "units": [
      "string"
    ],
    "soil_statement": false,
    "live_listings": 0,
    "marketplace": "string",
    "materials": [
      {
        "id": "string",
        "name": "string",
        "other_names": [
          null
        ]
      }
    ],
    "fields": [
      {
        "key": "string",
        "label": "string",
        "kind": "string",
        "options": [
          null
        ],
        "unit": "string",
        "required": false
      }
    ]
  },
  "meta": {
    "request_id": "3f9a1c0b7d2e",
    "api_version": "v1"
  }
}
```

## Example

```bash
curl "https://dev.siteswap.pro/api/v1/catalog/categories/1042" \
  -H "Authorization: Bearer ssk_YOUR_KEY"
```