---
title: "Get a category by ID"
method: GET
path: "/categories/{id}"
tags: ["Categories"]
---

# Get a category by ID

`GET /categories/{id}`

## Request

- Base URL: `https://api.purplegrain.com/api/v1`
- URL: `https://api.purplegrain.com/api/v1/categories/{id}`
- Auth: none declared

Retrieve one category using its PurpleGrain category ID. Returns the category's ID, name and type. Use its exact name when filtering service or task searches by category. This lookup does not change data.

## Path parameters

- `id` string, required

## Response `200`

Successful.

- CategoriesShowResponseAttributes
  - `data` CategoryModelAttributes: Category in attributes-adapter shape (Accept application/json); fields at top level.
    - `id` string
    - `type` string
    - `name` string
    - `category_type` 'ServiceCategory': Attribute "type" in JSON:API; renamed here to avoid clash with resource type

## Other responses

- `404`: Not Found

---

[API](https://skmtc.dev/purplegrain/apis/purple-grain-api.md) · [All operations](https://skmtc.dev/purplegrain/apis/purple-grain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/purplegrain/apis/purple-grain-api/revisions/4bedbc1c784c?raw)
