Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Added

- Explore product/service categories and resolve category paths from full product keys. Product searches can filter by category prefix.

- Search Mexican postal codes, countries, tax regimes, and CFDI uses through `catalogs`, and retrieve postal-code details including neighborhoods. Postal-code searches accept numeric prefixes or neighborhood, locality/city, municipality, and state names, ignore case and diacritics, and support page and cursor pagination. Every postal-code result includes all its neighborhoods.

## [6.0.0] Unreleased
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,21 @@ const uses = await facturapi.catalogs.searchInvoiceUses({ q: 'gastos' });

La búsqueda postal acepta el código completo o un prefijo numérico, o el nombre de una colonia, localidad/ciudad, municipio o estado, y un filtro opcional `state` con la clave de tres letras. Las búsquedas por nombre ignoran mayúsculas y diacríticos, priorizan coincidencias exactas y devuelven cada código postal una sola vez. Cada resultado incluye todas sus colonias en `neighborhoods`, con clave y nombre; el detalle devuelve el mismo objeto. Los códigos postales admiten páginas o cursores (`pagination`, `after`, `before`); conserva los filtros al avanzar. Países, regímenes y usos usan `page` y `limit` (1–100); las claves de catálogo permanecen como strings para conservar ceros iniciales. El régimen y el uso CFDI deben ser declarados por el receptor; consultar el catálogo no los determina.

### Categorías de productos y servicios

```ts
const roots = await facturapi.catalogs.listProductCategories();
const division = await facturapi.catalogs.getProductCategory('43');
const productPath = await facturapi.catalogs.getProductCategory('43211507');
const products = await facturapi.catalogs.searchProducts({
category: '432115',
pagination: 'cursor',
limit: 10,
});
```

Las raíces son `products` y `services`. Consulta prefijos de 2, 4 o 6 dígitos para obtener una categoría, sus ancestros y sus hijas; una clase también incluye productos paginados. Una clave completa de 8 dígitos devuelve el producto y su ruta. No se eliminan ceros finales: `43211500` sigue siendo una clave de producto válida. `01010101` tiene `category: null`. El filtro `category` incluye descendientes y se puede combinar con `q`; las respuestas de productos conservan clave y descripción.

## Qué puedes integrar

| Necesitas… | Recurso o guía |
Expand Down
2 changes: 1 addition & 1 deletion openapi/source.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"repository": "FacturAPI/facturapi-docs",
"revision": "9e0fdd689647a1d60f8d9181038225dd04c12732",
"revision": "fb9921573b3d7c46a1d7f2c6e350c6861afe4cbf",
"path": "website/openapi_v2.yaml"
}
2 changes: 2 additions & 0 deletions scripts/sdk/resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@
"params": false
}
},
"listProductCategories": "listProductCategories",
"getProductCategory": "getProductCategory",
"searchZipCodes": "searchZipCodes",
"getZipCode": {
"operation": "getZipCode",
Expand Down
5 changes: 5 additions & 0 deletions src/generated/dates.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

121 changes: 120 additions & 1 deletion src/generated/input.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/generated/models.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

121 changes: 120 additions & 1 deletion src/generated/output.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading