code (string) - Filter by exact error code (e.g., CFDI140223)q (string) - Search across code, description, explanation, and solutiontype (string) - Filter by error type: invoice, receiver, sender, unknownlimit (integer, 1-100) - Number of results per page (default: 50)page (integer) - Page number for pagination (default: 1){
"success": true,
"data": [
{
"code": "CFDI140223",
"description": "El campo Rfc del receptor no es valido",
"explanation": "The RFC (tax ID) provided for the receiver does not meet the validation requirements or format specified by SAT",
"solution": "Verify that the receiver's RFC is correct, properly formatted (13 characters for individuals, 12 for legal entities), and matches SAT's registered information",
"type": "receiver"
}
],
"total": 1,
"page": 1,
"limit": 20,
"message": "CFDI errors retrieved successfully",
"timestamp": "2025-12-19T10:30:00.000Z"
}| Parameter | Type | Description |
|---|---|---|
limit | integer (1-100) | Number of results per page (default: 10) |
next | string | Pagination cursor for next page |
team | string | gigstack Connect: Target team ID |
order_by | string | Field to sort by (e.g., created_at) |
sort | string | Sort direction (asc, desc) |
created_gte | integer | Filter by creation date (greater than or equal to timestamp) |
created_lte | integer | Filter by creation date (less than or equal to timestamp) |
metadata.{key} | string | Filter by metadata field using dot notation (e.g., metadata.order_id=ORD-123) |
metadata_{key} | string | Filter by metadata field using underscore notation (e.g., metadata_order_id=ORD-123) |
page | integer | Page number for pagination when using metadata filters (default: 1) |
page parameter instead of the next cursor.{
"message": "Invoices retrieved successfully",
"data": [
{
"uuid": "invoice_1234567890",
"client": {
"id": "client_1234567890",
"name": "Juan Perez Garcia",
"tax_id": "PEGJ800101ABC"
},
"folio_number": 123,
"series": "A",
"invoice_type": "I",
"total": 1160.0,
"subtotal": 1000.0,
"taxes": 160.0,
"currency": "MXN",
"payment_method": "PUE",
"status": "valid",
"created_at": 1677651234,
"stamp": {
"stamp_at": 1677651234,
"sello": "ABC123..."
}
}
],
"has_more": false,
"total_results": 1
}payment - Create invoice with payment automationnone - No automation, create invoice only{
"automation_type": "payment",
"client": {
"id": "client_1234567890"
},
"currency": "MXN",
"exchange_rate": 1.0,
"items": [
{
"description": "Consulting services",
"quantity": 2,
"unit_price": 1000.0,
"product_key": "80141503",
"unit_key": "E48",
"unit_name": "Servicio",
"taxes": [
{
"type": "IVA",
"rate": 0.16,
"factor": "Tasa",
"withholding": false
}
]
}
],
"use": "P01",
"payment_form": "03",
"payment_method": "PUE",
"series": "A",
"folio_number": 123,
"send_email": true,
"emails": ["client@example.com"]
}| Parameter | Type | Description |
|---|---|---|
limit | integer (1-100) | Number of results per page (default: 10) |
next | string | Pagination cursor for next page |
team | string | gigstack Connect: Target team ID |
order_by | string | Field to sort by (e.g., created_at) |
sort | string | Sort direction (asc, desc) |
created_gte | integer | Filter by creation date (greater than or equal to timestamp) |
created_lte | integer | Filter by creation date (less than or equal to timestamp) |
metadata.{key} | string | Filter by metadata field using dot notation (e.g., metadata.order_id=ORD-123) |
metadata_{key} | string | Filter by metadata field using underscore notation (e.g., metadata_order_id=ORD-123) |
page | integer | Page number for pagination when using metadata filters (default: 1) |
page parameter instead of the next cursor.file_type (string) - Type of file: "pdf", "xml" (optional, returns both if not specified)team (string) - gigstack Connect: Target team ID{
"message": "Invoice files retrieved successfully",
"data": {
"pdf": "https://storage.gigstack.io/invoices/invoice_1234567890.pdf",
"xml": "https://storage.gigstack.io/invoices/invoice_1234567890.xml"
}
}{
"motive": "02",
"substitution_uuid": "12345678-1234-1234-1234-123456789012"
}01 - Comprobante emitido con errores con relacion (requires substitution_uuid)02 - Comprobante emitido con errores sin relacion03 - No se llevo a cabo la operacion04 - Operacion nominativa relacionada en una factura globalinvoices collection with a draft: true flag and do not consume credits until stamped.invoice_type is required at creation; all other fields can be added later via update.{
"invoice_type": "I",
"client": {
"id": "client_1234567890"
},
"currency": "MXN",
"items": [
{
"description": "Consulting services",
"quantity": 1,
"unit_price": 1000.00,
"product_key": "80141503",
"unit_key": "E48",
"taxes": [{"type": "IVA", "rate": 0.16}]
}
],
"use": "G03",
"payment_form": "03",
"payment_method": "PUE"
}{
"invoice_type": "I"
}{
"message": "Draft created successfully",
"data": {
"id": "draft_abc123",
"draft": true,
"invoice_type": "I",
"client": {
"id": "client_1234567890",
"name": "Juan Perez Garcia"
},
"currency": "MXN",
"items": [...],
"status": "draft",
"created_at": 1709090576567
}
}| Parameter | Type | Description |
|---|---|---|
limit | integer (1-100) | Number of results per page (default: 10) |
next | string | Pagination cursor for next page |
invoice_type | string | Filter by invoice type: I (income) or E (egress) |
client_id | string | Filter by client ID |
client with valid fiscal datause (CFDI use code)payment_formpayment_methodcurrency{
"send_email": true,
"return_files": true
}send_email (boolean) - Set to false to suppress email delivery. Default: true.return_files (boolean) - Set to true to include base64-encoded XML and PDF in the response.{
"message": "Invoice created from draft",
"data": {
"uuid": "12345678-1234-1234-1234-123456789012",
"folio_number": 456,
"series": "A",
"total": 29000.00,
"status": "valid",
"stamp": {
"stamp_at": 1709090576567,
"sello": "ABC123..."
},
"files": {
"xml": "PD94bWwgdmVyc2lvbj...",
"pdf": "JVBERi0xLjQK..."
}
}
}{
"message": "Draft is incomplete — a client and at least one item are required to stamp"
}{
"message": "Team credit limit reached",
"error": "No remaining credits",
"credit_limit": 100,
"used_credits": 100
}PREFACTURA-0000-0000-0000-SINVALIDEZ). The preview is saved to the draft's files subcollection.{
"message": "Preview generated successfully",
"data": {
"pdf_base64": "JVBERi0xLjQK...",
"draft_id": "draft_abc123",
"watermark": true
}
}| Code | Description |
|---|---|
| 01 | Efectivo |
| 02 | Cheque nominativo |
| 03 | Transferencia electronica de fondos |
| 04 | Tarjeta de credito |
| 28 | Tarjeta de debito |
| 99 | Por definir |
{
"automation_type": "payment",
"client": {
"id": "client_1234567890"
},
"currency": "MXN",
"exchange_rate": 1.0,
"items": [
{
"description": "Consulting services - Phase 1",
"quantity": 10,
"unit_price": 1000.0,
"product_key": "80141503",
"unit_key": "HUR",
"taxes": [
{
"type": "IVA",
"rate": 0.16,
"withholding": false
}
]
},
{
"description": "Software license",
"quantity": 1,
"unit_price": 5000.0,
"product_key": "81111500",
"unit_key": "H87",
"taxes": [
{
"type": "IVA",
"rate": 0.16,
"withholding": false
}
]
}
],
"use": "G03",
"payment_form": "03",
"payment_method": "PUE"
}{
"automation_type": "payment",
"client": {
"id": "client_1234567890"
},
"currency": "MXN",
"exchange_rate": 1.0,
"items": [
{
"description": "Professional services",
"quantity": 1,
"unit_price": 10000.0,
"product_key": "80141503",
"unit_key": "E48",
"taxes": [
{
"type": "IVA",
"rate": 0.16,
"withholding": false
},
{
"type": "ISR",
"rate": 0.1,
"withholding": true
},
{
"type": "IVA",
"rate": 0.106667,
"withholding": true
}
]
}
],
"use": "G03",
"payment_form": "03",
"payment_method": "PUE"
}{
"automation_type": "none",
"client": {
"id": "client_1234567890"
},
"currency": "MXN",
"exchange_rate": 1.0,
"items": [
{
"description": "Large project - Total amount",
"quantity": 1,
"unit_price": 100000.0,
"product_key": "80141503",
"unit_key": "E48",
"taxes": [
{
"type": "IVA",
"rate": 0.16
}
]
}
],
"use": "G03",
"payment_form": "99",
"payment_method": "PPD"
}{
"automation_type": "none",
"client": {
"id": "client_publico_general"
},
"currency": "MXN",
"exchange_rate": 1.0,
"global": {
"periodicity": "04",
"months": "01",
"year": 2024
},
"items": [
{
"description": "Ventas del periodo",
"quantity": 1,
"unit_price": 50000.0,
"product_key": "01010101",
"unit_key": "ACT",
"taxes": [
{
"type": "IVA",
"rate": 0.16
}
]
}
],
"use": "P01",
"payment_form": "03",
"payment_method": "PUE"
}{
"related_documents": [
{
"relationship": "04",
"documents": ["12345678-1234-1234-1234-123456789012"]
}
]
}01 - Nota de credito de los documentos relacionados02 - Nota de debito de los documentos relacionados03 - Devolucion de mercancia sobre facturas o traslados previos04 - Sustitucion de los CFDI previos07 - CFDI por aplicacion de anticipo{
"message": "Invalid request body",
"error": "client is required"
}{
"message": "Tax validation failed",
"error": "IVA rate must be 0.16 for standard rate"
}{
"message": "Failed to stamp invoice",
"error": "Stamping service unavailable"
}{
"message": "Cannot cancel invoice",
"error": "Invoice has dependent payment complements"
}