API overview
Read a category and its products
Choose an operation to see its request, response shape, access rules and implementation source.
ReadPublic
GET/api/v1/categories/{slug}
Read a category and its products
No auth:sanctum or bearer ability is required by this route.
Request
| Field | In | Rule |
|---|---|---|
slug | Path parameter | Required active resource slug, not a numeric ID. |
page | Query string | Optional page number; default 1. No per_page or sort override. |
No request body.
curl --request GET "https://shop.example.test/api/v1/categories/example-slug" \
--header 'Accept: application/json' \
--get \
--data-urlencode 'page=1'Response200
Success: 200
Response shape (notation, not a captured response)
{ data: { category: Category, products: Product[] }, meta: { current_page, last_page, total } }Common errors
| HTTP status | Meaning |
|---|---|
404 | not_found: missing, inactive or foreign-owned resource. |
429 | rate_limited: back off before retrying, especially writes. |