# EZ Catalog API — OpenAPI Reference (v1)

> Product catalog REST API for Argentina and global markets: lookup by barcode (EAN-13, UPC-12, ISBN-10/13), full-text search, batch lookups, brands, product families, categories, images, and community edit proposals.

- **Base URL (Production):** `https://api.ez-catalog.huggian.com`
- **Guide:** https://huggian.com/ez-catalog/docs (Markdown: https://huggian.com/ez-catalog/docs.md)
- **Interactive Reference:** https://huggian.com/ez-catalog/docs/reference
- **OpenAPI 3.1 JSON:** https://huggian.com/ez-catalog/docs/openapi.json

## Authentication

- **ApiKey** (`apiKey`, header `X-Api-Key`): API key issued for Free, Basic, or Pro catalog plans.

## Standard Error Responses

| Key | Description | Schema |
|---|---|---|
| `E400` | Bad request (error: BAD_REQUEST) | `ErrorResponse` |
| `E401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `E403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `E404` | Resource not found (error: NOT_FOUND) | `ErrorResponse` |
| `E409` | Duplicate barcode or normalized brand (error: CONFLICT) | `ErrorResponse` |
| `E413` | Payload exceeds maximum allowed size (error: PAYLOAD_TOO_LARGE) | `ErrorResponse` |
| `E415` | Unsupported media type; expected image/* (error: UNSUPPORTED_MEDIA_TYPE) | `ErrorResponse` |
| `E422` | Unprocessable entity (error: UNPROCESSABLE_ENTITY) | `ErrorResponse` |
| `E429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `E500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |
| `E502` | Upstream provider or storage failure (error: UPSTREAM_ERROR) | `ErrorResponse` |
| `E503` | Service unavailable (error: SERVICE_UNAVAILABLE) | `ErrorResponse` |

## Health

### `GET /health`

Unauthenticated liveness probe.

- **Auth:** None (public)

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Service is up | `HealthResponse` |

Example `200` response:

```json
{
  "ok": true
}
```

## Products

### `GET /v1/products/barcode/{ean}`

Look up a product by barcode (EAN-13, UPC-12, ISBN-10/13).

Looks up the product in cache/database and fans out to 87 external providers on cache miss.

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `ean` | path | Yes | string | EAN-13, UPC-12, or ISBN-10/13 barcode. |

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Matching product | `Product` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `404` | Resource not found (error: NOT_FOUND) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

Example `200` response:

```json
{
  "id": "8a3e1d60-1c4f-4d1c-9e2a-2b5c6d7e8f90",
  "barcode": "7790895000997",
  "barcode_type": "EAN13",
  "name": "Yerba Mate Taragüi 500g",
  "description": null,
  "category_id": "ab12cd34-5678-4abc-9def-0123456789ab",
  "category": "almacen-infusiones",
  "brand": "Taragüi",
  "brand_id": "f1c2d3e4-5678-4abc-9def-0123456789ab",
  "image_url": "https://images.huggian.com/products/7790895000997.jpg",
  "ncm_code": "0903.00.10",
  "afip_category": null,
  "country_of_origin": "AR",
  "verified": true,
  "source": "manual",
  "presentation": "500g",
  "subcategory": null,
  "unit_of_measure": "g",
  "family_id": "c9d0e1f2-5678-4abc-9def-0123456789ab",
  "product_type": "good",
  "attributes": null,
  "created_at": "2026-01-12T10:00:00Z",
  "updated_at": "2026-04-30T09:00:00Z"
}
```

### `POST /v1/products/by-barcodes`

Batch lookup products by up to 500 barcodes.

Returns an array of found products. Unknown barcodes are omitted from the result.

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Request Body (required)

- Content-Type: `application/json`
- Schema: `ByBarcodesRequest`

```json
{
  "barcodes": [
    "7790895000997",
    "7790040119000"
  ]
}
```

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Found products | array<`Product`> |
| `400` | Bad request (error: BAD_REQUEST) | `ErrorResponse` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

### `POST /v1/products/by-ids`

Batch lookup products by up to 500 UUIDs.

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Request Body (required)

- Content-Type: `application/json`
- Schema: `ByIdsRequest`

```json
{
  "ids": [
    "8a3e1d60-1c4f-4d1c-9e2a-2b5c6d7e8f90"
  ]
}
```

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Found products | array<`Product`> |
| `400` | Bad request (error: BAD_REQUEST) | `ErrorResponse` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

### `GET /v1/products/search`

Full-text product search with filters and pagination.

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `q` | query | No | string | Free-text search query. |
| `category` | query | No | string (uuid) | Filter by category UUID. |
| `brand` | query | No | string (uuid) | Filter by brand UUID. |
| `family` | query | No | string (uuid) | Filter by product family UUID. |
| `page` | query | No | integer | 1-based page number. |
| `per_page` | query | No | integer | Page size (1..100). |

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Paginated search results | `SearchResult` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

### `POST /v1/products`

Create a product (Basic and Pro plans).

- **Auth:** ApiKey (scope: `catalog:products:write`)

#### Request Body (required)

- Content-Type: `application/json`
- Schema: `CreateProductRequest`

```json
{
  "barcode": "7790895000997",
  "barcode_type": "EAN13",
  "name": "Yerba Mate Taragüi 500g",
  "brand": "Taragüi",
  "country_of_origin": "AR",
  "presentation": "500g",
  "unit_of_measure": "g",
  "product_type": "good"
}
```

#### Responses

| Status | Description | Schema |
|---|---|---|
| `201` | Created product | `Product` |
| `400` | Bad request (error: BAD_REQUEST) | `ErrorResponse` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `409` | Duplicate barcode or normalized brand (error: CONFLICT) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

### `GET /v1/products/{id}`

Get a product by UUID.

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `id` | path | Yes | string (uuid) |  |

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Product | `Product` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `404` | Resource not found (error: NOT_FOUND) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

### `PUT /v1/products/{id}`

Partially update a product (Basic and Pro plans).

- **Auth:** ApiKey (scope: `catalog:products:write`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `id` | path | Yes | string (uuid) |  |

#### Request Body (required)

- Content-Type: `application/json`
- Schema: `UpdateProductRequest`

```json
{
  "name": "Yerba Mate Taragüi 500g Sin Palo",
  "verified": true
}
```

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Updated product | `Product` |
| `400` | Bad request (error: BAD_REQUEST) | `ErrorResponse` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `404` | Resource not found (error: NOT_FOUND) | `ErrorResponse` |
| `409` | Duplicate barcode or normalized brand (error: CONFLICT) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

### `DELETE /v1/products/{id}`

Delete a product (Pro plan).

- **Auth:** ApiKey (scope: `catalog:products:delete`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `id` | path | Yes | string (uuid) |  |

#### Responses

| Status | Description | Schema |
|---|---|---|
| `204` | Deleted | — |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `404` | Resource not found (error: NOT_FOUND) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

### `POST /v1/products/{id}/propose-edit`

Propose a field correction for referee review (available on all plans, including Free).

Records a pending edit proposal for the `name` or `category` field of an existing product. Idempotent while the same proposal is still pending.

- **Auth:** ApiKey (scope: `catalog:proposals:write`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `id` | path | Yes | string (uuid) |  |

#### Request Body (required)

- Content-Type: `application/json`
- Schema: `ProposeEditRequest`

```json
{
  "field": "name",
  "value": "Yerba Mate Taragüi Clásica 500g",
  "proposer_id": "tenant-123"
}
```

#### Responses

| Status | Description | Schema |
|---|---|---|
| `202` | Proposal accepted for review | `ProposeEditResponse` |
| `400` | Bad request (error: BAD_REQUEST) | `ErrorResponse` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `404` | Resource not found (error: NOT_FOUND) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

Example `202` response:

```json
{
  "id": "a1b2c3d4-5678-4abc-9def-0123456789ab",
  "status": "pending"
}
```

## Brands

### `GET /v1/brands`

List all brands.

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Brands | array<`Brand`> |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

### `POST /v1/brands`

Create a brand (normalizes accents, case, and corporate suffixes).

- **Auth:** ApiKey (scope: `catalog:products:write`)

#### Request Body (required)

- Content-Type: `application/json`
- Schema: `CreateBrandRequest`

```json
{
  "name": "La Serenísima",
  "logo_url": null
}
```

#### Responses

| Status | Description | Schema |
|---|---|---|
| `201` | Created brand | `Brand` |
| `400` | Bad request (error: BAD_REQUEST) | `ErrorResponse` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `409` | Duplicate barcode or normalized brand (error: CONFLICT) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

### `GET /v1/brands/{id}`

Get a brand by UUID including its linked product count.

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `id` | path | Yes | string (uuid) |  |

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Brand with product count | `BrandWithCount` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `404` | Resource not found (error: NOT_FOUND) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

## Families

### `GET /v1/families`

List product families (SKU size/pack variants), optionally filtered by brand.

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `brand` | query | No | string (uuid) | Optional brand UUID filter. |

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Product families | array<`ProductFamily`> |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

### `GET /v1/families/{id}`

Get a product family by UUID with its variant products.

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `id` | path | Yes | string (uuid) |  |

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Product family with variants | `FamilyWithVariants` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `404` | Resource not found (error: NOT_FOUND) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

## Categories

### `GET /v1/categories`

List all catalog categories (hierarchical tree via parent_id).

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Categories | array<`Category`> |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `500` | Internal server error (error: INTERNAL_ERROR) | `ErrorResponse` |

## Images

### `GET /v1/products/{ean}/images`

List stored images for a barcode.

- **Auth:** ApiKey (scope: `catalog:products:read`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `ean` | path | Yes | string |  |

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Images for the barcode | `ProductImageListResponse` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `503` | Service unavailable (error: SERVICE_UNAVAILABLE) | `ErrorResponse` |

### `POST /v1/products/{ean}/images`

Upload a product image as raw image/* bytes (Basic and Pro plans).

Send the raw encoded JPEG, PNG, or WebP bytes in the request body with an `image/*` Content-Type header (not multipart/form-data).

- **Auth:** ApiKey (scope: `catalog:images:write`)

#### Parameters

| Name | In | Required | Type | Description |
|---|---|---|---|---|
| `ean` | path | Yes | string |  |

#### Request Body (required)

- Content-Type: `image/jpeg`
- Schema: string (binary)

- Content-Type: `image/png`
- Schema: string (binary)

- Content-Type: `image/webp`
- Schema: string (binary)

#### Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Stored image metadata | `ProductImage` |
| `400` | Bad request (error: BAD_REQUEST) | `ErrorResponse` |
| `401` | Missing or invalid X-Api-Key (error: UNAUTHORIZED) | `ErrorResponse` |
| `403` | Valid key without required scope/plan (error: FORBIDDEN) | `ErrorResponse` |
| `413` | Payload exceeds maximum allowed size (error: PAYLOAD_TOO_LARGE) | `ErrorResponse` |
| `415` | Unsupported media type; expected image/* (error: UNSUPPORTED_MEDIA_TYPE) | `ErrorResponse` |
| `429` | Per-minute rate limit (RATE_LIMIT_EXCEEDED with Retry-After and X-RateLimit-* headers) or monthly quota exhausted (MONTHLY_QUOTA_EXCEEDED with limit and used fields) | `ErrorResponse` \\| `MonthlyQuotaErrorResponse` |
| `502` | Upstream provider or storage failure (error: UPSTREAM_ERROR) | `ErrorResponse` |
| `503` | Service unavailable (error: SERVICE_UNAVAILABLE) | `ErrorResponse` |

## Schemas

### `HealthResponse`

| Field | Type | Required | Description |
|---|---|---|---|
| `ok` | boolean | Yes |  |

### `ErrorResponse`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | string (`BAD_REQUEST`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `CONFLICT`, `PAYLOAD_TOO_LARGE`, `UNSUPPORTED_MEDIA_TYPE`, `UNPROCESSABLE_ENTITY`, `RATE_LIMIT_EXCEEDED`, `MONTHLY_QUOTA_EXCEEDED`, `INTERNAL_ERROR`, `UPSTREAM_ERROR`, `SERVICE_UNAVAILABLE`) | Yes |  |
| `message` | string | Yes |  |

### `MonthlyQuotaErrorResponse`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | `"MONTHLY_QUOTA_EXCEEDED"` | Yes |  |
| `message` | string | Yes |  |
| `limit` | integer | Yes |  |
| `used` | integer | Yes |  |

### `Product`

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes |  |
| `barcode` | string \\| null | No |  |
| `barcode_type` | string | Yes | EAN13, EAN8, UPC, ISBN13, etc. |
| `name` | string | Yes |  |
| `description` | string \\| null | No |  |
| `category_id` | string \\| null (uuid) | No |  |
| `category` | string \\| null | No | Category slug joined from category_id. |
| `brand` | string \\| null | No |  |
| `brand_id` | string \\| null (uuid) | No |  |
| `image_url` | string \\| null (uri) | No |  |
| `ncm_code` | string \\| null | No |  |
| `afip_category` | string \\| null | No |  |
| `country_of_origin` | string | Yes | ISO 3166-1 alpha-2 country code. |
| `verified` | boolean | Yes |  |
| `source` | string | Yes |  |
| `presentation` | string \\| null | No |  |
| `subcategory` | string \\| null | No |  |
| `unit_of_measure` | string \\| null | No |  |
| `family_id` | string \\| null (uuid) | No |  |
| `product_type` | string | Yes | good or service |
| `attributes` | object \\| null | No |  |
| `created_at` | string (date-time) | Yes |  |
| `updated_at` | string (date-time) | Yes |  |

### `CreateProductRequest`

| Field | Type | Required | Description |
|---|---|---|---|
| `barcode` | string \\| null | No |  |
| `barcode_type` | string \\| null | No |  |
| `name` | string | Yes |  |
| `description` | string \\| null | No |  |
| `category_id` | string \\| null (uuid) | No |  |
| `brand` | string \\| null | No |  |
| `brand_id` | string \\| null (uuid) | No |  |
| `image_url` | string \\| null (uri) | No |  |
| `ncm_code` | string \\| null | No |  |
| `afip_category` | string \\| null | No |  |
| `country_of_origin` | string \\| null | No |  |
| `source` | string \\| null | No |  |
| `presentation` | string \\| null | No |  |
| `subcategory` | string \\| null | No |  |
| `unit_of_measure` | string \\| null | No |  |
| `product_type` | string \\| null | No |  |
| `attributes` | object \\| null | No |  |

### `UpdateProductRequest`

| Field | Type | Required | Description |
|---|---|---|---|
| `barcode` | string \\| null | No |  |
| `barcode_type` | string \\| null | No |  |
| `name` | string \\| null | No |  |
| `description` | string \\| null | No |  |
| `category_id` | string \\| null (uuid) | No |  |
| `brand` | string \\| null | No |  |
| `brand_id` | string \\| null (uuid) | No |  |
| `image_url` | string \\| null (uri) | No |  |
| `ncm_code` | string \\| null | No |  |
| `afip_category` | string \\| null | No |  |
| `country_of_origin` | string \\| null | No |  |
| `verified` | boolean \\| null | No |  |
| `source` | string \\| null | No |  |
| `presentation` | string \\| null | No |  |
| `subcategory` | string \\| null | No |  |
| `unit_of_measure` | string \\| null | No |  |
| `product_type` | string \\| null | No |  |
| `attributes` | object \\| null | No |  |

### `SearchResult`

| Field | Type | Required | Description |
|---|---|---|---|
| `items` | array<`Product`> | Yes |  |
| `total` | integer | Yes |  |
| `page` | integer | Yes |  |
| `per_page` | integer | Yes |  |

### `ByBarcodesRequest`

| Field | Type | Required | Description |
|---|---|---|---|
| `barcodes` | array<string> | Yes |  |

### `ByIdsRequest`

| Field | Type | Required | Description |
|---|---|---|---|
| `ids` | array<string (uuid)> | Yes |  |

### `ProposeEditRequest`

| Field | Type | Required | Description |
|---|---|---|---|
| `field` | string (`name`, `category`) | Yes |  |
| `value` | string | Yes |  |
| `proposer_id` | string | Yes |  |

### `ProposeEditResponse`

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes |  |
| `status` | string | Yes |  |

### `Brand`

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes |  |
| `name` | string | Yes |  |
| `slug` | string | Yes |  |
| `logo_url` | string \\| null (uri) | No |  |
| `created_at` | string (date-time) | Yes |  |

### `BrandWithCount`

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes |  |
| `name` | string | Yes |  |
| `slug` | string | Yes |  |
| `logo_url` | string \\| null (uri) | No |  |
| `created_at` | string (date-time) | Yes |  |
| `product_count` | integer | Yes |  |

### `CreateBrandRequest`

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string | Yes |  |
| `logo_url` | string \\| null (uri) | No |  |

### `ProductFamily`

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes |  |
| `name` | string | Yes |  |
| `slug` | string | Yes |  |
| `brand_id` | string \\| null (uuid) | No |  |
| `created_at` | string (date-time) | Yes |  |

### `FamilyWithVariants`

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes |  |
| `name` | string | Yes |  |
| `slug` | string | Yes |  |
| `brand_id` | string \\| null (uuid) | No |  |
| `created_at` | string (date-time) | Yes |  |
| `variants` | array<`Product`> | Yes |  |

### `Category`

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes |  |
| `slug` | string | Yes |  |
| `name` | string | Yes |  |
| `parent_id` | string \\| null (uuid) | No |  |
| `created_at` | string (date-time) | Yes |  |

### `ProductImage`

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string (uuid) | Yes |  |
| `ean` | string | Yes |  |
| `url` | string (uri) | Yes |  |
| `source` | string | Yes |  |
| `width` | integer | Yes |  |
| `height` | integer | Yes |  |
| `bytes` | integer | Yes |  |
| `created_at` | string (date-time) | Yes |  |

### `ProductImageListResponse`

| Field | Type | Required | Description |
|---|---|---|---|
| `ean` | string | Yes |  |
| `images` | array<`ProductImage`> | Yes |  |
