Errores
Los errores comparten un formato JSON con un código estable, un mensaje y una pista para resolverlo.
{
"error": {
"code": "invalid_api_key",
"message": "Invalid or missing API key",
"hint": "Send your key in the \"x-api-key\" header or as \"Authorization: Bearer <key>\". Request a key through /contacto.",
"docs": "/docs/api"
},
"statusCode": 401,
"statusMessage": "Invalid or missing API key"
}
| HTTP | error.code | Significado |
|---|
| 400 | invalid_parameters | Algún parámetro no es válido. `data.issues` indica cuál. |
| 401 | invalid_api_key | Falta la API key o no es correcta. |
| 404 | not_found | El recurso no existe o no está publicado. |
| 429 | rate_limited | Superaste el límite. Espera los segundos de `Retry-After`. |
| 500 | internal_error | Error inesperado del servidor. Reintenta más tarde. |
Versiones y retirada de endpoints
La versión mayor va en la ruta (/api/v1). Dentro de v1 solo hay cambios compatibles: pueden aparecer endpoints, parámetros opcionales y campos nuevos, así que tu integración debe ignorar los campos que no conozca. Quitar o renombrar campos, parámetros o endpoints exige una versión nueva (/api/v2).
Antes de retirar algo lo marcaremos como obsoleto en el documento OpenAPI y sus respuestas llevarán las cabeceras Deprecation (RFC 9745) y Sunset (RFC 8594) con la fecha de retirada, con al menos 180 días de antelación. Hoy no hay nada obsoleto.
Endpoints
GET /api/v1/products
operationId: listProducts · List products
Paginated list of published products. Use it to search the catalogue by name or SKU, or to filter by business unit, category, finish and usage (interior, exterior). Sorted like the website catalogue.
| Parámetro | Tipo | Descripción |
|---|
unidad | string | Business unit slug, e.g. arquitectonico, industrial, madera. |
categoria | string | Product category slug. |
finish | string[] | Finish filter (case-insensitive contains). Repeat the parameter to match any of several finishes. |
is_ready_mix | string | Only ready-mix products. The filter is applied only when the value is exactly `true`; any other value is ignored. |
is_color_matcher | string | Only products available in the color matcher. The filter is applied only when the value is exactly `true`; any other value is ignored. |
has_color_base | string | Only products with a tintable color base. The filter is applied only when the value is exactly `true`; any other value is ignored. |
is_third_party | string | Only third-party brand products. The filter is applied only when the value is exactly `true`; any other value is ignored. |
interior | string | Only products suitable for interiors. The filter is applied only when the value is exactly `true`; any other value is ignored. |
exterior | string | Only products suitable for exteriors. The filter is applied only when the value is exactly `true`; any other value is ignored. |
slug | string | Exact product slug. |
search | string | Case-insensitive "contains" search over product name and SKU. |
limit | integer | Maximum number of rows to return. Defaults to 12 when missing, empty or not a number. |
offset | integer | Number of rows to skip for pagination. Defaults to 0. |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/products" \
-H "x-api-key: $API_KEY"
GET /api/v1/products/{slug}
operationId: getProductBySlug · Get a product
Full detail of one published product: technical data, pack sizes, compatible colors, attributes, technical and safety sheets. Returns 404 when the slug does not exist or is unpublished.
| Parámetro | Tipo | Descripción |
|---|
slug* | string | URL slug of the product (lowercase letters, digits and hyphens). |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/products/ejemplo-de-slug" \
-H "x-api-key: $API_KEY"
GET /api/v1/colors
operationId: listColors · List colors
Paginated color chart. Filter by family, undertone, category, base or line, or search by name or code.
| Parámetro | Tipo | Descripción |
|---|
color_family_id | string | Color family id (see listColorFamilies). |
undertone | string[] | Undertone filter. Repeat the parameter to match any of several values. |
is_best_seller | string | Only best-selling colors. The filter is applied only when the value is exactly `true`; any other value is ignored. |
category_id | string | Color category id. |
base_id | string | Color base id. |
color_line_id | string | Color line id (see listColorLines). |
search | string | Case-insensitive "contains" search over color name and code. |
sort_by | string | Sort order: `code`, `family`, or name when omitted or any other value. |
limit | integer | Maximum number of rows to return. Defaults to 30 when missing, empty or not a number. |
offset | integer | Number of rows to skip for pagination. Defaults to 0. |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/colors" \
-H "x-api-key: $API_KEY"
GET /api/v1/color-families
operationId: listColorFamilies · List color families
All color families with their swatch. Not paginated. Use the ids to filter listColors.
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/color-families" \
-H "x-api-key: $API_KEY"
GET /api/v1/color-lines
operationId: listColorLines · List color lines
All color lines, optionally restricted to one color category. Not paginated.
| Parámetro | Tipo | Descripción |
|---|
category_id | string | Color category id (matches the line base category). |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/color-lines" \
-H "x-api-key: $API_KEY"
GET /api/v1/stores
operationId: listStores · List or find nearby stores
Points of sale. Standard mode filters by region, services and category. Nearby mode starts when both `lat` and `lng` are sent: rows are ordered by distance and include `distance_km`. Not paginated.
| Parámetro | Tipo | Descripción |
|---|
region | string | Region name (contains). |
has_redimix | string | Only stores with Redimix service. The filter is applied only when the value is exactly `true`; any other value is ignored. |
has_color_matcher | string | Only stores with a color matcher. The filter is applied only when the value is exactly `true`; any other value is ignored. |
has_rostolin | string | Only stores selling Rostolin. The filter is applied only when the value is exactly `true`; any other value is ignored. |
category | string | Store category id. |
search | string | Case-insensitive "contains" search over store name and address. |
lat | number | Latitude in decimal degrees. Send together with lng to enable nearby mode. |
lng | number | Longitude in decimal degrees. Send together with lat to enable nearby mode. |
radiusKm | number | Nearby mode only: maximum distance in km. |
limit | integer | Nearby mode only: maximum number of stores. |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/stores" \
-H "x-api-key: $API_KEY"
GET /api/v1/noticias
operationId: listNoticias · List news
Paginated company news, newest first.
| Parámetro | Tipo | Descripción |
|---|
categoria | string | Slug of the news category to filter by. |
featured | string | Only featured news. The filter is applied only when the value is exactly `true`; any other value is ignored. |
announcement | string | Only announcements. The filter is applied only when the value is exactly `true`; any other value is ignored. |
search | string | Case-insensitive "contains" search over title and excerpt. |
limit | integer | Maximum number of rows to return. Defaults to 12 when missing, empty or not a number. |
offset | integer | Number of rows to skip for pagination. Defaults to 0. |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/noticias" \
-H "x-api-key: $API_KEY"
GET /api/v1/noticias/{slug}
operationId: getNoticiaBySlug · Get a news article
Full news article with HTML content. Returns 404 when not found or unpublished.
| Parámetro | Tipo | Descripción |
|---|
slug* | string | URL slug of the news article (lowercase letters, digits and hyphens). |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/noticias/ejemplo-de-slug" \
-H "x-api-key: $API_KEY"
GET /api/v1/tips
operationId: listTips · List painting tips
Paginated how-to guides about preparing surfaces and painting, newest first.
| Parámetro | Tipo | Descripción |
|---|
categoria | string | Slug of the tip category to filter by. |
featured | string | Only featured tips. The filter is applied only when the value is exactly `true`; any other value is ignored. |
search | string | Case-insensitive "contains" search over title and excerpt. |
limit | integer | Maximum number of rows to return. Defaults to 12 when missing, empty or not a number. |
offset | integer | Number of rows to skip for pagination. Defaults to 0. |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/tips" \
-H "x-api-key: $API_KEY"
GET /api/v1/tips/{slug}
operationId: getTipBySlug · Get a tip
Full tip with HTML content. Returns 404 when not found or unpublished.
| Parámetro | Tipo | Descripción |
|---|
slug* | string | URL slug of the tip (lowercase letters, digits and hyphens). |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/tips/ejemplo-de-slug" \
-H "x-api-key: $API_KEY"
GET /api/v1/tendencias
operationId: listTendencias · List color trends
Paginated color and decoration trends, newest first. Each row includes its gallery and color palette.
| Parámetro | Tipo | Descripción |
|---|
categoria | string | Slug of the trend category to filter by. |
featured | string | Only featured trends. The filter is applied only when the value is exactly `true`; any other value is ignored. |
search | string | Case-insensitive "contains" search over title and excerpt. |
limit | integer | Maximum number of rows to return. Defaults to 6 when missing, empty or not a number. |
offset | integer | Number of rows to skip for pagination. Defaults to 0. |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/tendencias" \
-H "x-api-key: $API_KEY"
GET /api/v1/tendencias/{slug}
operationId: getTendenciaBySlug · Get a color trend
Full trend with content, gallery and palette. Returns 404 when not found or unpublished.
| Parámetro | Tipo | Descripción |
|---|
slug* | string | URL slug of the trend (lowercase letters, digits and hyphens). |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/tendencias/ejemplo-de-slug" \
-H "x-api-key: $API_KEY"
GET /api/v1/faq
operationId: listFaq · List frequently asked questions
Paginated FAQ entries ordered as on the website. Use it to answer customer questions about products and purchases.
| Parámetro | Tipo | Descripción |
|---|
categoria | string | Slug of the FAQ category to filter by. |
search | string | Case-insensitive "contains" search over question and answer. |
limit | integer | Maximum number of rows to return. Defaults to 12 when missing, empty or not a number. |
offset | integer | Number of rows to skip for pagination. Defaults to 0. |
curl -s "https://pinturas-popular-staging.zunamicorp.com/api/v1/faq" \
-H "x-api-key: $API_KEY"