For the complete documentation index, see llms.txt. This page is also available as Markdown.

Categories

Manage the species and breed categories used to classify pets.

List categories

get
/categories

Returns all categories available for classifying pets (e.g. dog, cat, rabbit).

Authorizations
AuthorizationstringRequired

Pass your API key as a Bearer token in the Authorization header.

Responses
200

An array of categories.

application/json
namestringRequired

The category name (e.g. Dog, Cat, Rabbit).

Example: Dog
descriptionstringOptional

A short description of the category.

Example: Domestic dogs of all breeds.
idinteger · int64Required

Unique identifier assigned on creation.

Example: 1
get/categories
curl -L https://petstore.example.com/v1/categories \
  -H 'Authorization: Bearer YOUR_API_KEY'
[
  {
    "id": 1,
    "name": "Dog",
    "description": "Domestic dogs of all breeds."
  },
  {
    "id": 2,
    "name": "Cat",
    "description": "Domestic cats of all breeds."
  }
]

Create a category

post
/categories

Adds a new category for classifying pets.

Authorizations
AuthorizationstringRequired

Pass your API key as a Bearer token in the Authorization header.

Body
namestringRequired

The category name (e.g. Dog, Cat, Rabbit).

Example: Dog
descriptionstringOptional

A short description of the category.

Example: Domestic dogs of all breeds.
Responses
201

Category created successfully.

application/json
namestringRequired

The category name (e.g. Dog, Cat, Rabbit).

Example: Dog
descriptionstringOptional

A short description of the category.

Example: Domestic dogs of all breeds.
idinteger · int64Required

Unique identifier assigned on creation.

Example: 1
post/categories
curl -L -X POST https://petstore.example.com/v1/categories \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name": "Rabbit", "description": "Domestic rabbits of all breeds."}'
{
  "name": "Dog",
  "description": "Domestic dogs of all breeds.",
  "id": 1
}

Last updated