Gigstack icon

Gigstack

Interact with Gigstack API for Mexican tax-compliant invoicing and payments

Invoice → Create Draft

AI-generated

Overview

This node operation creates a draft invoice in the Gigstack system. It is useful for preparing invoices with detailed line items before finalizing and sending them. Users can specify the client, add multiple items with descriptions, quantities, unit prices, product and unit keys, and optionally include IVA tax. Additional invoice details such as currency, exchange rate, payment method, payment form, CFDI use, series, and metadata can also be set. This operation helps businesses manage invoice drafts efficiently, allowing review and adjustments before official issuance.

Use Case Examples

  1. Create a draft invoice for a client with multiple service items, specifying quantities and prices, and including IVA tax.
  2. Set additional invoice fields like currency (MXN), payment method (PUE), and metadata for internal tracking.

Properties

Name Meaning
Client ID The ID of the client for whom the draft invoice is being created.
Items The line items to include in the draft invoice, each with description, quantity, unit price, product key, unit key, service ID, and whether to include IVA tax.
Additional Fields Optional additional invoice fields such as currency, exchange rate, payment method, payment form, CFDI use, series, and metadata.
Team ID Team ID for multi-team access; leave empty to use the default team.

Output

JSON

  • client
    • id - The ID of the client associated with the draft invoice.
  • items - Array of line items included in the draft invoice, each with details such as description, quantity, unit price, product key, unit key, and taxes.
  • currency - Currency code of the draft invoice.
  • exchange_rate - Exchange rate applied to the draft invoice.
  • payment_method - Payment method code used in the draft invoice.
  • payment_form - SAT payment form code used in the draft invoice.
  • use - CFDI use code for the draft invoice.
  • series - Series identifier for the draft invoice.
  • metadata - Additional metadata associated with the draft invoice.

Dependencies

  • Gigstack API
  • An API key credential for authentication

Troubleshooting

  • Ensure the client ID provided exists and is valid; otherwise, the API will return an error.
  • Verify that the items array contains at least one item with valid quantity and unit price.
  • Check that the JSON metadata is correctly formatted to avoid parsing errors.
  • If the API returns authentication errors, confirm that the API key credential is correctly configured.
  • Network or API downtime can cause request failures; retry or check API status.

Discussion