---
title: "Find a Category by ID"
method: GET
path: "/categories/{id}"
tags: ["Category"]
---

# Find a Category by ID

`GET /categories/{id}`

Finds the Category with the requested ID and returns it.

## Path parameters

- `id` integer, required

## Response `200`

Category with requested ID was found

- CategoryRead
  - `id` integer, required
  - `name` string, required

## Other responses

- `400` — invalid input, data invalid
- `404` — resource not found
- `409` — conflicting resources
- `500` — unexpected error

## Changes

- **2022-01-03** `be4e7ff3034b` — 3 breaking, 7 info
  - the `code` response's property type/format changed from `integer`/`int32` to `integer`/`` for status `400`
  - the `code` response's property type/format changed from `integer`/`int32` to `integer`/`` for status `404`
  - the `code` response's property type/format changed from `integer`/`int32` to `integer`/`` for status `500`
  - added the non-success response with the status `409`
  - …6 more
- **2021-12-21** `de0ebba2e9d9` — 1 breaking, 1 info
  - the `id` response's property type/format changed from `integer`/`int32` to `integer`/`` for status `200`
  - for the `path` request parameter `id`, the type/format was generalized from `integer`/`int32` to `integer`/``
- **2021-12-20** `c20645e44d2d` — 3 breaking
  - the `errors` response's property type/format changed from `object`/`` to ``/`` for status `400`
  - the `errors` response's property type/format changed from `object`/`` to ``/`` for status `404`
  - the `errors` response's property type/format changed from `object`/`` to ``/`` for status `500`
- **2021-11-15** `495e5eef05c1` — 10 breaking, 1 info
  - for the `path` request parameter `id`, the type/format was changed from `integer`/`` to `integer`/`int32`
  - the response property `code` became optional for the status `400`
  - the response property `code` became optional for the status `404`
  - the response property `code` became optional for the status `500`
  - …7 more

[Change history](https://skmtc.dev/ent/apis/my-pets-api/changes/categories/:id/get.md)

---

[API](https://skmtc.dev/ent/apis/my-pets-api.md) · [All operations](https://skmtc.dev/ent/apis/my-pets-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ent/my-pets-api/revisions/4455d46a2733/schema)
