Skip to main content
Product endpoints are public — no authentication is required. All requests must include a tenant_id query parameter to scope results to the correct business.

GET /api/v1/products

List products for a tenant. Results are cached for 600 seconds per tenant/filter combination. Middleware: throttle:api, cacheResponse:600
Authentication: Not required

Query parameters

tenant_id
integer
required
Numeric ID of the tenant whose catalog to fetch. Returns 400 when absent.
Full-text search term to filter products by name or description.
category
string
Filter by category name.

Response 200 OK

Paginated collection of product objects (20 per page).
data
object[]
Standard Laravel pagination links.
meta
object
Pagination metadata (current page, total, per page).
curl "https://yourdomain.com/api/v1/products?tenant_id=1&category=Desayunos" \
  -H "Accept: application/json"

Error responses

StatusCause
400tenant_id missing or zero

GET /api/v1/products/

Fetch a single product by ID. Also requires tenant_id to enforce ownership scoping. Response is cached for 600 seconds. Middleware: throttle:api, cacheResponse:600
Authentication: Not required

Path parameters

id
integer
required
Numeric product ID.

Query parameters

tenant_id
integer
required
Numeric tenant ID. Product must belong to this tenant.

Response 200 OK

Single product object with the same shape as items in the list endpoint.
data
object
curl "https://yourdomain.com/api/v1/products/101?tenant_id=1" \
  -H "Accept: application/json"

Error responses

StatusCause
400tenant_id missing or zero
404Product not found for the given tenant

Build docs developers (and LLMs) love