[{"data":1,"prerenderedAt":734},["ShallowReactive",2],{"navigation-ec":3,"navigation-mx":240,"/extraccion/extractions/compras/purchases-docs":296,"/extraccion/extractions/compras/purchases-surround":729},[4,153],{"title":5,"icon":6,"path":7,"stem":8,"children":9},"Extracción","i-lucide-download","/extraccion","1.extraccion",[10,13,25,40,102,109,149],{"title":11,"path":7,"stem":12},"Introducción","1.extraccion/index",{"title":14,"icon":15,"path":16,"stem":17,"children":18},"Empecemos","i-lucide-rocket","/extraccion/getting-started","1.extraccion/1.getting-started/index",[19,21],{"title":20,"path":16,"stem":17},"Introducción al API",{"title":22,"path":23,"stem":24},"Primeros Pasos","/extraccion/getting-started/installation","1.extraccion/1.getting-started/2.installation",{"title":26,"icon":27,"path":28,"stem":29,"children":30,"page":39},"Contribuyentes","i-lucide-users","/extraccion/taxpayers","1.extraccion/2.taxpayers",[31,35],{"title":32,"path":33,"stem":34},"Crear","/extraccion/taxpayers/create","1.extraccion/2.taxpayers/1.create",{"title":36,"path":37,"stem":38},"Actualizar","/extraccion/taxpayers/update","1.extraccion/2.taxpayers/2.update",false,{"title":41,"icon":42,"path":43,"stem":44,"children":45},"Extraer documentos","i-lucide-file-stack","/extraccion/extractions","1.extraccion/3.extractions/index",[46,48,52,81],{"title":47,"path":43,"stem":44},"Extracciones",{"title":49,"path":50,"stem":51},"RIDE","/extraccion/extractions/ride","1.extraccion/3.extractions/2.Ride",{"title":53,"path":54,"stem":55,"children":56,"page":39},"Documentos Recibidos","/extraccion/extractions/compras","1.extraccion/3.extractions/compras",[57,61,65,69,73,77],{"title":58,"path":59,"stem":60},"Compras","/extraccion/extractions/compras/purchases","1.extraccion/3.extractions/compras/1.purchases",{"title":62,"path":63,"stem":64},"Retenciones","/extraccion/extractions/compras/retentions","1.extraccion/3.extractions/compras/2.retentions",{"title":66,"path":67,"stem":68},"Notas de crédito","/extraccion/extractions/compras/credit-notes","1.extraccion/3.extractions/compras/3.credit-notes",{"title":70,"path":71,"stem":72},"Notas de débito","/extraccion/extractions/compras/debit-notes","1.extraccion/3.extractions/compras/4.debit-notes",{"title":74,"path":75,"stem":76},"Liquidaciones","/extraccion/extractions/compras/settlements","1.extraccion/3.extractions/compras/5.settlements",{"title":78,"path":79,"stem":80},"Anulados","/extraccion/extractions/compras/purchase-voids","1.extraccion/3.extractions/compras/6.purchase-voids",{"title":82,"path":83,"stem":84,"children":85,"page":39},"Documentos Emitidos","/extraccion/extractions/ventas","1.extraccion/3.extractions/ventas",[86,90,93,96,99],{"title":87,"path":88,"stem":89},"Ventas","/extraccion/extractions/ventas/invoices","1.extraccion/3.extractions/ventas/1.invoices",{"title":62,"path":91,"stem":92},"/extraccion/extractions/ventas/retentions","1.extraccion/3.extractions/ventas/2.retentions",{"title":66,"path":94,"stem":95},"/extraccion/extractions/ventas/credit-notes","1.extraccion/3.extractions/ventas/3.credit-notes",{"title":74,"path":97,"stem":98},"/extraccion/extractions/ventas/settlements","1.extraccion/3.extractions/ventas/4.settlements",{"title":78,"path":100,"stem":101},"/extraccion/extractions/ventas/sales-voids","1.extraccion/3.extractions/ventas/5.sales-voids",{"title":103,"path":104,"stem":105,"children":106,"icon":108},"Webhooks","/extraccion/webhooks","1.extraccion/4.webhooks/index",[107],{"title":103,"path":104,"stem":105},"i-lucide-webhook",{"title":110,"icon":111,"path":112,"stem":113,"children":114},"Consultas","i-lucide-search","/extraccion/consultas","1.extraccion/5.consultas/index",[115,117,121,125,129,133,137,141,145],{"title":116,"path":112,"stem":113},"Consultas y Solicitudes",{"title":118,"path":119,"stem":120},"Régimen Fiscal","/extraccion/consultas/regimen-fiscal","1.extraccion/5.consultas/1.regimen-fiscal",{"title":122,"path":123,"stem":124},"Obligaciones Fiscales","/extraccion/consultas/obligaciones-fiscales","1.extraccion/5.consultas/2.obligaciones-fiscales",{"title":126,"path":127,"stem":128},"Registro Público del Contribuyente (RUC)","/extraccion/consultas/registro-publico-ruc","1.extraccion/5.consultas/3.registro-publico-ruc",{"title":130,"path":131,"stem":132},"Solicitud de Extracción y Descarga de Documentos (RIDE/XML)","/extraccion/consultas/solicitud-extraccion-documentos","1.extraccion/5.consultas/4.solicitud-extraccion-documentos",{"title":134,"path":135,"stem":136},"Consulta y Búsqueda de Contribuyentes de la Organización","/extraccion/consultas/consulta-busqueda-contribuyentes","1.extraccion/5.consultas/5.consulta-busqueda-contribuyentes",{"title":138,"path":139,"stem":140},"Solicitud de Categorización de Documento con IA","/extraccion/consultas/solicitud-categorizacion-ia","1.extraccion/5.consultas/6.solicitud-categorizacion-ia",{"title":142,"path":143,"stem":144},"Solicitud de Descarga de Declaraciones (PDF) del SRI","/extraccion/consultas/solicitud-descarga-declaraciones","1.extraccion/5.consultas/7.solicitud-descarga-declaraciones",{"title":146,"path":147,"stem":148},"Buzón Tributario (Inbox) del Contribuyente","/extraccion/consultas/buzon-tributario-inbox","1.extraccion/5.consultas/8.buzon-tributario-inbox",{"title":150,"path":151,"stem":152},"Referencia de la API","/extraccion/referencia","1.extraccion/9.referencia",{"title":154,"icon":155,"path":156,"stem":157,"children":158},"Facturación","i-lucide-receipt","/facturacion","2.facturacion",[159,161,170,196,218],{"title":11,"path":156,"stem":160},"2.facturacion/index",{"title":162,"icon":15,"path":163,"stem":164,"children":165,"page":39},"Empezar","/facturacion/empezar","2.facturacion/1.empezar",[166],{"title":167,"path":168,"stem":169},"Autenticación","/facturacion/empezar/autenticacion","2.facturacion/1.empezar/1.autenticacion",{"title":171,"icon":172,"path":173,"stem":174,"children":175,"page":39},"Comprobantes","i-lucide-file-text","/facturacion/comprobantes","2.facturacion/2.comprobantes",[176,180,183,186,189,193],{"title":177,"path":178,"stem":179},"Facturas","/facturacion/comprobantes/facturas","2.facturacion/2.comprobantes/1.facturas",{"title":66,"path":181,"stem":182},"/facturacion/comprobantes/notas-de-credito","2.facturacion/2.comprobantes/2.notas-de-credito",{"title":70,"path":184,"stem":185},"/facturacion/comprobantes/notas-de-debito","2.facturacion/2.comprobantes/3.notas-de-debito",{"title":62,"path":187,"stem":188},"/facturacion/comprobantes/retenciones","2.facturacion/2.comprobantes/4.retenciones",{"title":190,"path":191,"stem":192},"Guías de remisión","/facturacion/comprobantes/guias-de-remision","2.facturacion/2.comprobantes/5.guias-de-remision",{"title":74,"path":194,"stem":195},"/facturacion/comprobantes/liquidaciones-de-compra","2.facturacion/2.comprobantes/6.liquidaciones-de-compra",{"title":197,"icon":198,"path":199,"stem":200,"children":201,"page":39},"Operaciones","i-lucide-workflow","/facturacion/operaciones","2.facturacion/3.operaciones",[202,206,210,214],{"title":203,"path":204,"stem":205},"Autorización","/facturacion/operaciones/autorizacion-de-comprobantes","2.facturacion/3.operaciones/1.autorizacion-de-comprobantes",{"title":207,"path":208,"stem":209},"Descarga","/facturacion/operaciones/descarga-de-comprobantes","2.facturacion/3.operaciones/2.descarga-de-comprobantes",{"title":211,"path":212,"stem":213},"Envío por correo","/facturacion/operaciones/envio-por-correo","2.facturacion/3.operaciones/3.envio-por-correo",{"title":215,"path":216,"stem":217},"Notificaciones","/facturacion/operaciones/notificaciones","2.facturacion/3.operaciones/4.notificaciones",{"title":219,"icon":220,"path":221,"stem":222,"children":223,"page":39},"Referencia","i-lucide-book-open","/facturacion/referencia","2.facturacion/4.referencia",[224,228,232,236],{"title":225,"path":226,"stem":227},"Objetos comunes","/facturacion/referencia/objetos-comunes","2.facturacion/4.referencia/1.objetos-comunes",{"title":229,"path":230,"stem":231},"Catálogo","/facturacion/referencia/catalogo","2.facturacion/4.referencia/2.catalogo",{"title":233,"path":234,"stem":235},"Consulta de catálogo","/facturacion/referencia/consulta-de-catalogo","2.facturacion/4.referencia/3.consulta-de-catalogo",{"title":237,"path":238,"stem":239},"Errores","/facturacion/referencia/errores","2.facturacion/4.referencia/4.errores",[241],{"title":242,"path":243,"stem":244,"children":245},"Mx","/mx","mx",[246,249,258,282],{"title":247,"path":243,"stem":248},"Documentación México","mx/index",{"title":14,"icon":39,"path":250,"stem":251,"children":252},"/mx/getting-started","mx/1.getting-started/index",[253,255],{"title":254,"path":250,"stem":251},"Introducción al API México",{"title":22,"path":256,"stem":257},"/mx/getting-started/installation","mx/1.getting-started/2.installation",{"title":26,"path":259,"stem":260,"children":261,"page":39},"/mx/taxpayers","mx/2.taxpayers",[262,266,270,274,278],{"title":263,"path":264,"stem":265},"Crear por CIEC","/mx/taxpayers/create-ciec","mx/2.taxpayers/1.create-ciec",{"title":267,"path":268,"stem":269},"1. Subir Certificados FIEL","/mx/taxpayers/upload-certificados-fiel","mx/2.taxpayers/2.upload-certificados-fiel",{"title":271,"path":272,"stem":273},"2. Registrar por FIEL","/mx/taxpayers/create-fiel","mx/2.taxpayers/3.create-fiel",{"title":275,"path":276,"stem":277},"Asociación CIEC / FIEL","/mx/taxpayers/asociar","mx/2.taxpayers/4.asociar",{"title":279,"path":280,"stem":281},"Consultar Taxpayers","/mx/taxpayers/consultar","mx/2.taxpayers/5.consultar",{"title":283,"path":284,"stem":285,"children":286},"Extracciones CFDI","/mx/extractions-cfdi","mx/3.extractions-cfdi/index",[287,288,292],{"title":283,"path":284,"stem":285},{"title":289,"path":290,"stem":291},"Extracción CFDI por CIEC","/mx/extractions-cfdi/ciec","mx/3.extractions-cfdi/1.ciec",{"title":293,"path":294,"stem":295},"Extracción CFDI por FIEL","/mx/extractions-cfdi/fiel","mx/3.extractions-cfdi/2.fiel",{"id":297,"title":58,"body":298,"datil":723,"description":724,"extension":725,"links":723,"meta":726,"navigation":455,"path":59,"seo":727,"stem":60,"__hash__":728},"docs/1.extraccion/3.extractions/compras/1.purchases.md",{"type":299,"value":300,"toc":719},"minimark",[301,305,322,327,332,339,641,645,707,715],[302,303,304],"p",{},"Para gestionar las facturas de compra utilizando el API de TAXO WS, puedes seguir este ejemplo práctico que muestra cómo hacer una petición POST para crear una tarea que descargará el tipo de documento seleccionado.",[306,307,309,312],"callout",{"icon":308},"i-heroicons-light-bulb",[302,310,311],{},"El campo startDownloadAt define el rango de descarga:",[313,314,315,319],"ul",{},[316,317,318],"li",{},"Si se ingresa solo año y mes (ej. \"2025-02\"), se descargarán todas las facturas del mes especificado.",[316,320,321],{},"Si se ingresa año, mes y día (ej. \"2025-02-03\"), solo se descargarán las facturas de ese día específico.",[323,324,326],"h3",{"id":325},"crear-solicitud-de-la-tarea","Crear solicitud de la tarea",[328,329],"api-endpoint",{"method":330,"path":331},"POST","/tasks",[302,333,334],{},[335,336,338],"a",{"href":337},"/extraccion/referencia#tag/tasks/POST/tasks","Ver en la referencia",[340,341,347],"pre",{"className":342,"code":343,"filename":344,"language":345,"meta":346,"style":346},"language-js shiki shiki-themes github-light github-light github-dark-default","const axios = require('axios');\nlet data = JSON.stringify({\n  \"type\": \"PURCHASE.BILL\",\n  \"taxpayerId\": \"1719932093001\",\n  \"startDownloadAt\": \"2025-02\"\n});\n\nlet config = {\n  method: 'post',\n  url: 'https://staging-api.taxo.ws/tasks',\n  headers: {\n    'x-api-key': 'tu_api_key',\n    'Content-Type': 'application/json'\n  },\n  data : data\n};\n\naxios.request(config)\n.then((response) => {\n  console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n  console.log(error);\n});\n","Javascript","js","",[348,349,350,381,405,420,433,444,450,457,470,481,492,498,511,522,528,534,540,545,557,580,601,607,626,636],"code",{"__ignoreMap":346},[351,352,355,359,363,366,370,374,378],"span",{"class":353,"line":354},"line",1,[351,356,358],{"class":357},"sQUWt","const",[351,360,362],{"class":361},"sr2uH"," axios",[351,364,365],{"class":357}," =",[351,367,369],{"class":368},"sKpWc"," require",[351,371,373],{"class":372},"swRb2","(",[351,375,377],{"class":376},"s2YLD","'axios'",[351,379,380],{"class":372},");\n",[351,382,384,387,390,393,396,399,402],{"class":353,"line":383},2,[351,385,386],{"class":357},"let",[351,388,389],{"class":372}," data ",[351,391,392],{"class":357},"=",[351,394,395],{"class":361}," JSON",[351,397,398],{"class":372},".",[351,400,401],{"class":368},"stringify",[351,403,404],{"class":372},"({\n",[351,406,408,411,414,417],{"class":353,"line":407},3,[351,409,410],{"class":376},"  \"type\"",[351,412,413],{"class":372},": ",[351,415,416],{"class":376},"\"PURCHASE.BILL\"",[351,418,419],{"class":372},",\n",[351,421,423,426,428,431],{"class":353,"line":422},4,[351,424,425],{"class":376},"  \"taxpayerId\"",[351,427,413],{"class":372},[351,429,430],{"class":376},"\"1719932093001\"",[351,432,419],{"class":372},[351,434,436,439,441],{"class":353,"line":435},5,[351,437,438],{"class":376},"  \"startDownloadAt\"",[351,440,413],{"class":372},[351,442,443],{"class":376},"\"2025-02\"\n",[351,445,447],{"class":353,"line":446},6,[351,448,449],{"class":372},"});\n",[351,451,453],{"class":353,"line":452},7,[351,454,456],{"emptyLinePlaceholder":455},true,"\n",[351,458,460,462,465,467],{"class":353,"line":459},8,[351,461,386],{"class":357},[351,463,464],{"class":372}," config ",[351,466,392],{"class":357},[351,468,469],{"class":372}," {\n",[351,471,473,476,479],{"class":353,"line":472},9,[351,474,475],{"class":372},"  method: ",[351,477,478],{"class":376},"'post'",[351,480,419],{"class":372},[351,482,484,487,490],{"class":353,"line":483},10,[351,485,486],{"class":372},"  url: ",[351,488,489],{"class":376},"'https://staging-api.taxo.ws/tasks'",[351,491,419],{"class":372},[351,493,495],{"class":353,"line":494},11,[351,496,497],{"class":372},"  headers: {\n",[351,499,501,504,506,509],{"class":353,"line":500},12,[351,502,503],{"class":376},"    'x-api-key'",[351,505,413],{"class":372},[351,507,508],{"class":376},"'tu_api_key'",[351,510,419],{"class":372},[351,512,514,517,519],{"class":353,"line":513},13,[351,515,516],{"class":376},"    'Content-Type'",[351,518,413],{"class":372},[351,520,521],{"class":376},"'application/json'\n",[351,523,525],{"class":353,"line":524},14,[351,526,527],{"class":372},"  },\n",[351,529,531],{"class":353,"line":530},15,[351,532,533],{"class":372},"  data : data\n",[351,535,537],{"class":353,"line":536},16,[351,538,539],{"class":372},"};\n",[351,541,543],{"class":353,"line":542},17,[351,544,456],{"emptyLinePlaceholder":455},[351,546,548,551,554],{"class":353,"line":547},18,[351,549,550],{"class":372},"axios.",[351,552,553],{"class":368},"request",[351,555,556],{"class":372},"(config)\n",[351,558,560,562,565,568,572,575,578],{"class":353,"line":559},19,[351,561,398],{"class":372},[351,563,564],{"class":368},"then",[351,566,567],{"class":372},"((",[351,569,571],{"class":570},"sV72G","response",[351,573,574],{"class":372},") ",[351,576,577],{"class":357},"=>",[351,579,469],{"class":372},[351,581,583,586,589,591,594,596,598],{"class":353,"line":582},20,[351,584,585],{"class":372},"  console.",[351,587,588],{"class":368},"log",[351,590,373],{"class":372},[351,592,593],{"class":361},"JSON",[351,595,398],{"class":372},[351,597,401],{"class":368},[351,599,600],{"class":372},"(response.data));\n",[351,602,604],{"class":353,"line":603},21,[351,605,606],{"class":372},"})\n",[351,608,610,612,615,617,620,622,624],{"class":353,"line":609},22,[351,611,398],{"class":372},[351,613,614],{"class":368},"catch",[351,616,567],{"class":372},[351,618,619],{"class":570},"error",[351,621,574],{"class":372},[351,623,577],{"class":357},[351,625,469],{"class":372},[351,627,629,631,633],{"class":353,"line":628},23,[351,630,585],{"class":372},[351,632,588],{"class":368},[351,634,635],{"class":372},"(error);\n",[351,637,639],{"class":353,"line":638},24,[351,640,449],{"class":372},[323,642,644],{"id":643},"respuesta-de-la-solicitud","Respuesta de la solicitud",[340,646,650],{"className":647,"code":648,"filename":593,"language":649,"meta":346,"style":346},"language-json shiki shiki-themes github-light github-light github-dark-default","{\n  \"taxpayerId\": \"1719932093001\",\n  \"type\": \"PURCHASE.BILL\",\n  \"creatstartDownloadAtedAt\": \"2025-02\",\n  \"triggerMethod\": \"MANUAL\",\n}\n","json",[348,651,652,657,668,678,690,702],{"__ignoreMap":346},[351,653,654],{"class":353,"line":354},[351,655,656],{"class":372},"{\n",[351,658,659,662,664,666],{"class":353,"line":383},[351,660,425],{"class":661},"svbbC",[351,663,413],{"class":372},[351,665,430],{"class":376},[351,667,419],{"class":372},[351,669,670,672,674,676],{"class":353,"line":407},[351,671,410],{"class":661},[351,673,413],{"class":372},[351,675,416],{"class":376},[351,677,419],{"class":372},[351,679,680,683,685,688],{"class":353,"line":422},[351,681,682],{"class":661},"  \"creatstartDownloadAtedAt\"",[351,684,413],{"class":372},[351,686,687],{"class":376},"\"2025-02\"",[351,689,419],{"class":372},[351,691,692,695,697,700],{"class":353,"line":435},[351,693,694],{"class":661},"  \"triggerMethod\"",[351,696,413],{"class":372},[351,698,699],{"class":376},"\"MANUAL\"",[351,701,419],{"class":372},[351,703,704],{"class":353,"line":446},[351,705,706],{"class":372},"}\n",[302,708,709,710,714],{},"Por defecto todas las tareas de extracciones empiezan en el estado ",[711,712,713],"strong",{},"INITIALIZED"," que nos indica que la tarea ha sido iniciada y podemos hacer su seguimiento en el webhook.",[716,717,718],"style",{},"html pre.shiki code .sQUWt, html code.shiki .sQUWt{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#FF7B72}html pre.shiki code .sr2uH, html code.shiki .sr2uH{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#79C0FF}html pre.shiki code .sKpWc, html code.shiki .sKpWc{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#D2A8FF}html pre.shiki code .swRb2, html code.shiki .swRb2{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E6EDF3}html pre.shiki code .s2YLD, html code.shiki .s2YLD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#A5D6FF}html pre.shiki code .sV72G, html code.shiki .sV72G{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#FFA657}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .svbbC, html code.shiki .svbbC{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#7EE787}",{"title":346,"searchDepth":354,"depth":383,"links":720},[721,722],{"id":325,"depth":407,"text":326},{"id":643,"depth":407,"text":644},null,"Cómo gestionar las facturas de compra utilizando el API de TAXO WS","md",{},{"title":58,"description":724},"xPIhVw5t1RszgQ47MYH7aWS7ja2T1ntBT0GY5cfwyt0",[730,732],{"title":49,"path":50,"stem":51,"description":731,"children":-1},"Proceso detallado para extraer un documento RIDE en formato XML, PDF o JSON.",{"title":62,"path":63,"stem":64,"description":733,"children":-1},"Cómo gestionar las retenciones recibidas utilizando el API de TAXO WS",1790201870471]