limit
(integer, 1-100) - Number of results per page (default: 10)next
(string) - Pagination cursor for next pageteam
(string) - gigstack Connect: Target team ID
{
"message": "Invoices retrieved successfully",
"data": [
{
"uuid": "invoice_1234567890",
"client": {
"id": "client_1234567890",
"name": "Juan Pérez García",
"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 PUE invoice immediatelypayment_and_complement
- Create PPD invoice and payment complementnone
- 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"]
}
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 relación (requires substitution_uuid)02
- Comprobante emitido con errores sin relación03
- No se llevó a cabo la operación04
- Operación nominativa relacionada en una factura global
Code | Description |
---|---|
01 | Efectivo |
02 | Cheque nominativo |
03 | Transferencia electrónica de fondos |
04 | Tarjeta de crédito |
28 | Tarjeta de débito |
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 crédito de los documentos relacionados02
- Nota de débito de los documentos relacionados03
- Devolución de mercancía sobre facturas o traslados previos04
- Sustitución de los CFDI previos07
- CFDI por aplicación 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"
}