Ir al contenido

Inicio rápido de Francia

Este inicio rápido te guía para crear tu primer registro fiscal firmado con fiskaly SIGN FR, cumpliendo las tres obligaciones fiscales francesas clave: firma, registro y archivado.

  • Una cuenta fiskaly (regístrate en hub.fiskaly.com)
  • Una clave de API y un secreto para una organización GROUP en el entorno de PRUEBA
  • Información del contribuyente: nombre de empresa, número SIREN, dirección
  1. Autenticar

    curl -X POST https://test.api.fiskaly.com/tokens \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-02-03" \
      -d '{
        "content": {
          "type": "API_KEY",
          "key": "YOUR_API_KEY",
          "secret": "YOUR_API_SECRET"
        }
      }'
  2. Crear Organización, Contribuyente, Ubicación y Sistema

    La configuración sigue el mismo patrón que SIGN IT — crea una organización UNIT, luego un Contribuyente, Ubicación y Sistema, poniendo en servicio cada recurso:

    # Crear Organización UNIT
    curl -X POST https://test.api.fiskaly.com/organizations \
      -H "Authorization: Bearer ${ACCESS_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-02-03" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{"content": {"type": "UNIT", "name": "My French Company"}}'
    
    # Crear clave API de Sujeto para la UNIT, volver a autenticar, luego:
    
    # Crear Contribuyente
    curl -X POST https://test.api.fiskaly.com/taxpayers \
      -H "Authorization: Bearer ${UNIT_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-02-03" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{
        "content": {
          "type": "COMPANY",
          "name": {"legal": "Ma Societe SARL"},
          "address": {"street": "1 Rue de Rivoli", "zip": "75001", "city": "Paris", "country_code": "FR"},
          "fiscalization": {
            "type": "FR",
            "tax_id_number": "123456789"
          }
        }
      }'
    
    # Poner en servicio el Contribuyente, crear + poner en servicio Ubicación y Sistema
    # (mismo patrón que SIGN IT — consulta la guía de integración completa)
  3. Crear tu primer Registro

    # Parte A: Intención
    curl -X POST https://test.api.fiskaly.com/records \
      -H "Authorization: Bearer ${UNIT_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-02-03" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{
        "content": {
          "type": "INTENTION",
          "system": {"id": "YOUR_SYSTEM_ID"},
          "operation": {"type": "TRANSACTION"}
        }
      }'
    
    # Parte B: Transacción
    curl -X POST https://test.api.fiskaly.com/records \
      -H "Authorization: Bearer ${UNIT_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-02-03" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{
        "content": {
          "type": "TRANSACTION",
          "intention": {"id": "INTENTION_ID"},
          "operation": {
            "type": "RECEIPT",
            "document": {
              "number": "1",
              "date": "2026-02-27",
              "amounts": {
                "total_including_vat": "12.00",
                "total_excluding_vat": "10.00"
              }
            },
            "entries": [{
              "type": "SALE",
              "description": "Product A",
              "nature": "GOOD",
              "quantity": "1",
              "amounts": {
                "unit_including_vat": "12.00",
                "total_including_vat": "12.00",
                "total_excluding_vat": "10.00",
                "vat": {"rate": "20.00", "amount": "2.00"}
              }
            }]
          }
        }
      }'

    Una vez creados, los datos se firman, registran y archivan automáticamente — cumpliendo las tres obligaciones fiscales clave de NF525.

Was this page helpful?