{"templateId":"markdown","sharedDataIds":{},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Gestión de Clientes","description":"QRwey! API es un API que te permite intenciones de autofactura con QRs para ser leidos en la App de QRwey!.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"gestión-de-clientes","__idx":0},"children":["Gestión de Clientes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["La ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Gestión de Clientes"]}," de QRwey! permite a los ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integradores"]}," gestionar de forma"," ","autónoma su configuración de facturación y timbrar CFDIs directamente a través del API."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Un ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrador"]}," es quien tiene la relación comercial con QRwey!: crea grupos, da de alta"," ","emisores (RFCs ante el SAT) y registra los comercios bajo cada emisor. A cada comercio le"," ","emite una ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-Key"]}," que el comercio usa desde su backend para los endpoints de"," ","generación y resolución de QR."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A diferencia de los endpoints de operación de QR (consumidos por los ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Comercios"]}," con"," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-API-Key"]},"), los endpoints de la Gestión de Clientes utilizan autenticación mediante"," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Bearer token"]}," (OAuth 2.0) y están dirigidos a los Integradores."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"capacidades","__idx":1},"children":["Capacidades"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Con la Gestión de Clientes puedes:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Crear y administrar ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["grupos"]}," para organizar tus emisores"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Registrar y sincronizar ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["emisores"]}," (RFCs) con el SAT"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Configurar ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["comercios"]}," con sus llaves CSD para facturar"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Mantener el ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["catálogo de productos"]}," de cada comercio"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Timbrar CFDIs 4.0"]}," directamente: facturas de ingreso, notas de crédito y complementos de pago"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Consultar ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["transacciones"]}," y ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["reportes de consumo"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Administrar ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["planes de facturación"]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"autenticación","__idx":2},"children":["Autenticación"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Todos los endpoints de la Gestión de Clientes requieren un Bearer token válido:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"Authorization: Bearer {{access_token}}\nContent-Type: application/json\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["El token se obtiene mediante el flujo OAuth 2.0 de client credentials configurado"," ","en tu cuenta de QRwey!. Consulta el paso a paso en"," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/authentication#obtener-un-token-de-acceso-integradores"},"children":["Obtener un token de acceso (Integradores)"]},"."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["⚠️ No uses API Keys para estos endpoints. Solo se acepta ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Bearer token"]},"."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"estructura-de-recursos","__idx":3},"children":["Estructura de recursos"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Los recursos de la Gestión de Clientes siguen una jerarquía lógica:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Integrador (tu cuenta)\n  └── Grupo\n       └── Emisor (RFC)\n            └── Comercio\n                 ├── Llaves CSD (invoice-mode)\n                 ├── API Key (consumida por el Comercio en los endpoints de QR)\n                 └── Transacciones\n"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Un ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["grupo"]}," agrupa uno o más emisores"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Un ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["emisor"]}," representa un RFC registrado ante el SAT"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Un ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["comercio"]}," es un punto de venta asociado a un emisor, con sus propias llaves CSD"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"endpoints-disponibles","__idx":4},"children":["Endpoints disponibles"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"gestión-de-recursos","__idx":5},"children":["Gestión de recursos"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Recurso"},"children":["Recurso"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Guia"},"children":["Guia"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Grupos"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/groups"},"children":["Gestión de grupos"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Emisores"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/issuers"},"children":["Gestión de emisores"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Comercios"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/merchants"},"children":["Gestión de comercios"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Productos"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/merchant-products"},"children":["Catálogo de productos del comercio"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transacciones"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/transactions"},"children":["Gestión de transacciones"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reportes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/customer-reports"},"children":["Reportes del cliente"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"facturación","__idx":6},"children":["Facturación"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operación"},"children":["Operación"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Guia"},"children":["Guia"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Factura de ingreso (tipo I)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/stamp-cfdi"},"children":["Timbrar CFDI 4.0"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Nota de crédito (tipo E)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/credit-notes"},"children":["Notas de crédito"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Complemento de pago (tipo P)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/payment-complements"},"children":["Complementos de pago"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Consulta de facturas"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/invoice-list"},"children":["Consulta de facturas"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Detalle de CFDI"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/cfdi-detail"},"children":["Detalle de CFDI"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancelar CFDI"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/cancel-cfdi"},"children":["Cancelar CFDI 4.0"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Consultar estatus de CFDI"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/cfdi-status"},"children":["Consultar estatus"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"catálogos-y-planes","__idx":7},"children":["Catálogos y planes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Recurso"},"children":["Recurso"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Guia"},"children":["Guia"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Catálogos SAT"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/sat-catalogs"},"children":["Catálogos SAT"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Planes de facturación"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/budget-plans"},"children":["Planes de facturación"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"base-url","__idx":8},"children":["Base URL"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["DEV:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://api-dev.qrwey.com\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PROD:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://api.qrwey.com\n"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"paginación","__idx":9},"children":["Paginación"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Los endpoints que devuelven listas soportan paginación mediante query params:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parámetro"},"children":["Parámetro"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Descripción"},"children":["Descripción"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Número de página (inicia en 0)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["size"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Elementos por página (default 20)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sort"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Campo y dirección de ordenamiento (ej. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdAt,desc"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"errores-comunes","__idx":10},"children":["Errores comunes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Código"},"children":["Código"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Motivo"},"children":["Motivo"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["401"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Token inválido o expirado"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["403"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No tienes permisos sobre el recurso solicitado"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["404"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Recurso no encontrado o no pertenece a tu cuenta"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["409"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conflicto, el recurso ya existe"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["422"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Error de reglas de negocio"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Consulta: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/error-handling"},"children":["Manejo de errores"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"qué-sigue","__idx":11},"children":["¿Qué sigue?"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Organiza tus emisores: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/groups"},"children":["Gestión de grupos"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Registra un RFC: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/issuers"},"children":["Gestión de emisores"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Configura un punto de venta: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/merchants"},"children":["Gestión de comercios"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Timbra tu primer CFDI: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/stamp-cfdi"},"children":["Timbrar CFDI 4.0"]}]}]}]},"headings":[{"value":"Gestión de Clientes","id":"gestión-de-clientes","depth":1},{"value":"Capacidades","id":"capacidades","depth":2},{"value":"Autenticación","id":"autenticación","depth":2},{"value":"Estructura de recursos","id":"estructura-de-recursos","depth":2},{"value":"Endpoints disponibles","id":"endpoints-disponibles","depth":2},{"value":"Gestión de recursos","id":"gestión-de-recursos","depth":3},{"value":"Facturación","id":"facturación","depth":3},{"value":"Catálogos y planes","id":"catálogos-y-planes","depth":3},{"value":"Base URL","id":"base-url","depth":2},{"value":"Paginación","id":"paginación","depth":2},{"value":"Errores comunes","id":"errores-comunes","depth":2},{"value":"¿Qué sigue?","id":"qué-sigue","depth":2}],"frontmatter":{"title":"Gestión de Clientes","description":"Descripción general del API de la Gestión de Clientes de QRwey! para gestionar emisores, comercios y facturación directa.","seo":{"title":"Gestión de Clientes"}},"lastModified":"2026-06-18T21:09:09.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/customer-portal","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}