diff --git a/apps/web/lib/api/cfdi.ts b/apps/web/lib/api/cfdi.ts index 2eb2895..7cca27a 100644 --- a/apps/web/lib/api/cfdi.ts +++ b/apps/web/lib/api/cfdi.ts @@ -89,3 +89,10 @@ export async function createManyCfdis( export async function deleteCfdi(id: string): Promise { await apiClient.delete(`/cfdi/${id}`); } + +export async function getCfdiXml(id: string): Promise { + const response = await apiClient.get(`/cfdi/${id}/xml`, { + responseType: 'text' + }); + return response.data; +}