Pet API Documentation

Version 1.0.0

Welcome to the Pet API! Below you'll find the endpoints and usage details to interact with the API effectively.

Endpoints

Pagination

Most endpoints support pagination using the ?page and ?limit query parameters.

GET /v1/breeds/all?page=1&limit=10

Versioning

The API is versioned to ensure backward compatibility. Current version: v1.

Search Functionality

You can search breeds by name or species using the /v1/breeds/search endpoint with a query parameter:

GET /v1/breeds/search?q=rabbit

Health Check

Use the /v1/health endpoint to verify the API status:

GET /v1/health

Example Request

Example cURL request to retrieve all species:

curl -X GET /v1/all

Response Format

All responses are in JSON format. Example response for /v1/breeds/all:

{
    "page": 1,
    "limit": 10,
    "total": 100,
    "totalPages": 10,
    "data": [
        {
            "_id": "64c3be5e759ca2d824ef452a",
            "name": { "en": "American Rabbit", "es": "Conejo Americano" },
            "species": "Rabbit",
            "description": { "en": "A popular breed...", "es": "Una raza popular..." }
        }
    ]
}