v1

latestOpenAPI 3.0.3Proprietaryraw.githubusercontent.com2026-03-067260437.0 KB
Clients

Upload CSF PDF to create or update client

Upload a CSF (Constancia de Situación Fiscal) PDF file from SAT to automatically extract fiscal information and create a new client or update an existing one.

How it works:

  1. Upload the CSF PDF file as multipart/form-data
  2. The system extracts RFC and CIF from the PDF
  3. Validates the fiscal information against SAT
  4. Creates a new client or updates an existing one with the fiscal data

Query Parameters:

  • client_id (optional): If provided, updates the existing client. If omitted, creates a new client.

Extracted Information:

  • Legal name (Razón Social)
  • RFC (Tax ID)
  • Fiscal regime (Régimen Fiscal)
  • Fiscal type (company/individual)
  • Fiscal status
  • Complete address (street, exterior/interior number, neighborhood, city, state, zip code)

gigstack Connect: Create or update clients for other teams using the team parameter.

post/clients/csf

Query parameters

teamstring

gigstack Connect: Target team ID for multi-team access.

Requires gigstack Connect enabled on your team and shared billing account.

Example: ?team=team_xyz789

client_idstring

Optional client ID to update. If not provided, creates a new client.

Response

Client updated successfully with CSF data

messagestring

Example response

{
  "message": "Client updated with CSF data",
  "data": {
    "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": {
      "issue_invoiceable_receipts": true
    }
  }
}