gigstack API
  1. Drafts
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
    • Search clients
      GET
    • Upload CSF PDF to create or update client
      POST
    • Upload support document
      POST
    • List support documents
      GET
  • Services
    • Services API Guide
    • List services
    • Get service
    • Update service
    • Create service
    • Delete service
  • Invoices
    • Invoices API Guide
    • Income
      • List income invoices
      • Create income invoice
      • Get income invoice
    • Egress
      • List egress invoices
      • Create egress invoice
      • Get egress invoice
    • Drafts
      • Create draft invoice (pre-factura)
        POST
      • Stamp draft invoice (finalize)
        POST
      • Generate draft preview PDF (pre-factura)
        POST
      • Delete draft invoice
        DELETE
      • Update draft invoice
        PUT
      • Get draft invoice
        GET
      • List draft invoices
        GET
    • List CFDI errors
      GET
    • List payment complement invoices
      GET
    • Get payment complement invoice
      GET
    • Get invoice files
      GET
    • Upload support document
      POST
    • List support documents
      GET
    • Cancel invoice
      DELETE
    • Search invoices
      GET
  • Payments
    • Payments API Guide
    • List payments
    • Get payment
    • Request payment
    • Register payment
    • Mark payment as paid
    • Refund payment
    • Cancel payment
    • Search payments
    • Upload support document
    • List support documents
  • Receipts
    • Receipts API Guide
    • List receipts
    • Get receipt
    • Create receipt
    • Stamp receipt
    • Cancel receipt
    • Search receipts
  • 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
    • Upload SAT CSD certificates
    • Sign manifest document
  • Users
    • Users API Guide
    • List users
    • Get user
    • Update user
    • Create user
    • Reset user password
    • Generate login link
  • 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)
  • Webhooks
    • Webhooks
    • List webhooks
    • Create webhook
    • Get webhook
    • Update webhook
    • Delete webhook
  • Retentions
    • Retentions
    • List retentions
    • Create retention
    • Get retention
    • Cancel retention
    • Get retention files
  • Apidog connectivity test
    GET
  • Schemas
    • Schemas
      • ApiResponse
      • Category
      • Pet
      • Tag
      • Order
      • StandardizedSuccessResponse
      • StandardizedErrorResponse
      • ApiErrorCode
    • RequestBodies
      • UserArray
    • OrderDirection
    • ApiPublicClient
    • Client
    • DateRangeFilter
    • Service
    • ListQueryParams
    • ClientInput
    • ApiPublicService
    • ServiceInput
    • PaginationMeta
    • Invoice
    • InvoiceIncomeInput
    • Payment
    • PaymentInput
    • PaymentItem
    • InvoiceInput
    • InvoiceEgressInput
    • Team
    • PaymentAllowedMethod
    • TeamInput
    • TeamSettingsInput
    • CfdiError
    • ApiPublicPaymentProcessorDetails
    • User
    • DraftInvoiceInput
    • ApiPublicPayment
    • UserInput
    • ClientAddress
    • DraftInvoiceUpdateInput
    • DraftInvoiceOutput
    • TaxSchema
    • RequestPaymentInput
    • StandardSuccessResponse
    • RegisterPaymentInput
    • ListResponse
    • ErrorResponse
    • ApiPublicIncomeInvoice
    • ValidationErrorResponse
    • RefundPaymentInput
    • ApiPublicTeam
    • MarkPaymentAsPaidInput
    • UnauthorizedError
    • ApiPublicUser
    • ApiPublicSearch
    • NotFoundError
    • ApiPublicThirdParty
    • InternalServerError
    • ApiPublicInvoiceConfig
    • ApiPublicRefund
    • ApiPublicAutomations
    • TeamSettings
    • TaxElement
    • SeriesInput
    • Series
    • ApiPublicWebhook
    • WebhookInput
    • ReceiptInput
    • WebhookUpdateInput
    • PaymentMethodEnum
    • PaymentFormEnum
    • AutomationTypeEnum
    • ItemSchema
    • SATDocument
    • UploadSupportDocumentInput
  1. Drafts

Create draft invoice (pre-factura)

POST
https://api.gigstack.io/v2/invoices/draft
Create a new draft invoice (pre-factura) that can be edited and stamped later.
Only the invoice_type field is required. All other fields are optional, allowing you to build the invoice incrementally:
1.
Create a draft with minimal data (invoice_type)
2.
Update the draft as data becomes available (client, items, payment details)
3.
Preview the draft to generate a PDF with "Sin Validez Fiscal" watermark
4.
Stamp the draft when ready to finalize it into a valid CFDI
gigstack Connect: Create drafts 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

🟢201Created
application/json
Draft created successfully
Body

🟠400Bad Request
🟠401Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.gigstack.io/v2/invoices/draft?team' \
--header 'Content-Type: application/json' \
--data-raw '{
    "invoice_type": "I",
    "currency": "MXN",
    "use": "G03",
    "payment_form": "03",
    "payment_method": "PUE",
    "client": {
        "id": "client_1234567890"
    },
    "items": [
        {
            "quantity": 1,
            "description": "Servicio de consultoría",
            "product_key": "80141503",
            "unit_key": "ACT",
            "unit_name": "Actividad",
            "unit_price": 5000,
            "taxes": [
                {
                    "type": "IVA",
                    "rate": 0.16,
                    "factor": "Tasa",
                    "withholding": false,
                    "inclusive": false
                }
            ]
        }
    ],
    "metadata": {
        "project_id": "PROJ-2024-001"
    }
}'
Response Response Example
201 - Example 1
{
    "message": "Draft created",
    "data": {
        "id": "abc123def456",
        "draft": true,
        "invoice_type": "I",
        "client": {
            "id": "client_1234567890",
            "address": {
                "country": "MEX",
                "street": "Av. Insurgentes Sur",
                "zip": "03100",
                "city": "Ciudad de México",
                "state": "CDMX",
                "exterior": "123",
                "interior": "4B",
                "municipality": "Benito Juárez",
                "neighborhood": "Del Valle"
            },
            "name": "Juan Pérez García",
            "company": "Empresa SA de CV",
            "phone": "+52 55 1234 5678",
            "email": "juan.perez@ejemplo.com",
            "bcc": [
                "admin@empresa.com"
            ],
            "metadata": {
                "custom_field": "value"
            },
            "is_valid": true,
            "from": "api",
            "legal_name": "Juan Pérez García",
            "livemode": true,
            "owner": "user_1234567890",
            "tax_id": "PEGJ800101ABC",
            "use": "P01",
            "tax_system": "601",
            "team": "team_1234567890",
            "created_at": 1677651234,
            "efos": {
                "is_valid": true
            },
            "defaults": {
                "keep_full_legal_name": false,
                "issue_automatic_invoices": false,
                "issue_invoiceable_receipts": true
            }
        },
        "created_at": 1677651234000,
        "updated_at": 1677651234000,
        "currency": "MXN",
        "exchange_rate": 1,
        "total": 5800,
        "subtotal": 5000,
        "discount": 0,
        "series": "A",
        "folio_number": 0,
        "use": "G03",
        "payment_form": "03",
        "payment_method": "PUE",
        "date": 0,
        "livemode": true,
        "owner": "string",
        "from": "api",
        "status": "draft",
        "items": [
            {}
        ],
        "addenda": "string",
        "exports": "string",
        "invoice_pdf_notes": "string",
        "global": {},
        "related_documents": [
            {}
        ],
        "complements": [
            {}
        ],
        "metadata": {
            "property1": "string",
            "property2": "string"
        },
        "emails": [
            "string"
        ]
    }
}
Modified at 2026-03-12 15:02:23
Previous
Get egress invoice
Next
Stamp draft invoice (finalize)
Built with