gigstack API
  1. Egress
gigstack API
  • Welcome to gigstack API
  • gigstack Connect API Guide
  • Migrar de API v1 a v2 de gigstack
  • Clients
    • Clients API Guide
    • List clients
      GET
    • Get client
      GET
    • Update client
      PUT
    • Create client
      POST
    • Validate client fiscal information
      POST
    • Get client customer portal access token
      POST
    • Stamp pending receipts
      POST
    • Delete client
      DELETE
  • Services
    • Services API Guide
    • List services
      GET
    • Get service
      GET
    • Update service
      PUT
    • Create service
      POST
    • Delete service
      DELETE
  • Invoices
    • Invoices API Guide
    • Income
      • List income invoices
      • Get income invoice
      • Create income invoice
    • Egress
      • List egress invoices
        GET
      • Get egress invoice
        GET
      • Create egress invoice
        POST
    • Get invoice files
      GET
    • Cancel invoice
      DELETE
  • Payments
    • Payments API Guide
    • List payments
    • Get payment
    • Request payment
    • Register payment
    • Mark payment as paid
    • Refund payment
    • Cancel payment
  • Receipts
    • Receipts API Guide
    • List receipts
    • Get receipt
    • Create receipt
    • Stamp receipt
    • Cancel receipt
  • Teams
    • Teams API Guide
    • List teams
    • Get team
    • Get team integrations
    • Get team series
    • Get team onboarding URL
    • Update team
    • Update team series
    • Update team settings
    • Create team
    • Add team member
    • Remove team member
    • Create team series
  • Users
    • Users API Guide
    • List users
    • Get user
    • Update user
    • Create user
    • Reset user password
  • Catalogs
    • Tax Regimes Catalog (Régimen Fiscal)
    • Payment Forms | Formas de pago
    • CFDI Usage Catalog (Uso CFDI)
    • Payment Methods Catalog (Método de Pago)
    • Months and Bimesters Catalog (Meses y Bimestres)
    • Invoice Relationships Catalog (Relación entre Facturas)
  1. Egress

Create egress invoice

POST
https://api.gigstack.io/v2/invoices/egress
Create a new egress invoice (expense/credit note) with CFDI 4.0 compliance.
gigstack Connect: Create invoices for other teams using the team parameter.

Request

Authorization
API Key
Add parameter in header
Authorization
Example:
Authorization: ********************
or
Query Params

Body Params application/jsonRequired

Examples

Responses

🟢200Correcto
application/json
Invoice created successfully
Body

🟠400Solicitud incorrecta
🟠401No autenticado
🟠403Permiso insuficiente
🔴500Error interno del servidor
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.gigstack.io/v2/invoices/egress?team' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "automation_type": "payment",
    "currency": "MXN",
    "use": "P01",
    "payment_form": "03",
    "client": {
        "id": "client_1234567890"
    },
    "items": [
        {
            "quantity": 1,
            "description": "Purchased materials",
            "sku": "MAT-001",
            "product_key": "80141503",
            "unit_key": "E48",
            "unit_name": "Unidad",
            "unit_price": 500,
            "taxability": "02",
            "taxes": [
                {
                    "type": "IVA",
                    "rate": 0.16,
                    "factor": "Tasa",
                    "withholding": false,
                    "inclusive": false
                }
            ]
        }
    ],
    "send_email": true,
    "emails": [
        "proveedor@empresa.com"
    ],
    "metadata": {
        "purchase_order": "PO-2024-001",
        "department": "procurement"
    }
}'
Response Response Example
200 - Éxito
{
    "message": "Invoice created successfully",
    "data": {
        "uuid": "invoice_1234567890",
        "client": {
            "id": "client_1234567890",
            "name": "Proveedor ABC SA",
            "email": "proveedor@empresa.com",
            "tax_id": "PABC800101ABC"
        },
        "status": "stamped",
        "currency": "MXN",
        "exchange_rate": 1,
        "total": 580,
        "subtotal": 500,
        "taxes": 80,
        "discount": 0,
        "series": "E",
        "folio_number": 123,
        "invoice_type": "E",
        "items": [
            {
                "id": "item_1234567890",
                "description": "Purchased materials",
                "quantity": 1,
                "unit_price": 500,
                "product_key": "80141503",
                "unit_key": "E48"
            }
        ],
        "created_at": 1677651234,
        "livemode": true,
        "owner": "user_1234567890"
    }
}
Modified at 2025-10-09 23:51:05
Previous
Get egress invoice
Next
Get invoice files
Built with