Zum Inhalt springen

Portugal Schnellstart

Dieser Schnellstart beschreibt die wesentlichen Schritte für den Einstieg in die SIGN PT API, von der Authentifizierung bis zur Erstellung Ihres ersten Steuerbelegs. Eine ausführlichere Anleitung finden Sie in unserem Integrationshandbuch.

  • Ein fiskaly-Konto (Registrierung unter hub.fiskaly.com)
  • Ein API-Key und Secret für eine Organisation GROUP in der TEST-Umgebung
  • AT Portal das Finanças Unterbenutzer-Zugangsdaten für den Steuerpflichtigen (echte Zugangsdaten nur in LIVE erforderlich)
  1. Authentifizieren

    curl -X POST https://test.api.fiskaly.com/tokens \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-05-04" \
      -d '{
        "content": {
          "type": "API_KEY",
          "key": "YOUR_API_KEY",
          "secret": "YOUR_API_SECRET"
        }
      }'
  2. Organisation UNIT erstellen

    curl -X POST https://test.api.fiskaly.com/organizations \
      -H "Authorization: Bearer ${ACCESS_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-05-04" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{
        "content": {
          "type": "UNIT",
          "name": "My Portuguese Merchant"
        }
      }'
  3. Subject-API-Key erstellen und authentifizieren

    Erstellen Sie einen API-Key für die UNIT und authentifizieren Sie sich damit:

    # Create Subject API Key (scoped to the `UNIT`)
    curl -X POST https://test.api.fiskaly.com/subjects \
      -H "Authorization: Bearer ${ACCESS_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-05-04" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -H "X-Scope-Identifier: ${ORG_ID}" \
      -d '{"content": {"type": "API_KEY"}}'
    
    # Authenticate with the new API Key
    curl -X POST https://test.api.fiskaly.com/tokens \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-05-04" \
      -d '{"content": {"type": "API_KEY", "key": "NEW_KEY", "secret": "NEW_SECRET"}}'
  4. Steuerpflichtigen, Standort und System erstellen

    # Create Taxpayer
    curl -X POST https://test.api.fiskaly.com/taxpayers \
      -H "Authorization: Bearer ${ACCESS_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-05-04" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{
        "content": {
          "type": "COMPANY",
          "name": {
            "legal": "Minha Empresa Lda."
          },
          "address": {
            "line": {
              "type": "STREET_NUMBER",
              "street": "Rua Augusta",
              "number": "28"
            },
            "code": "1100-053",
            "city": "Lisboa",
            "country": "PT"
          },
          "fiscalization": {
            "type": "PT",
            "tax_id_number": "512345678",
            "email": "fiscal@minhaempresa.pt",
            "registration": {
              "capital": "50000.00",
              "office": "CRC Lisboa",
              "other": "sob NIF 512345678"
            },
            "credentials": {
              "type": "AT",
              "username": "512345678/3",
              "password": "YOUR_AT_PASSWORD"
            }
          }
        }
      }'
    
    # Commission Taxpayer
    curl -X PATCH "https://test.api.fiskaly.com/taxpayers/${TAXPAYER_ID}" \
      -H "Authorization: Bearer ${ACCESS_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-05-04" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{"content": {"state": "COMMISSIONED"}}'
  5. Ersten Beleg erstellen

    Records erfordern zwei Aufrufe: eine INTENTION, gefolgt von einer TRANSACTION.

    # Part A: Intention
    curl -X POST https://test.api.fiskaly.com/records \
      -H "Authorization: Bearer ${ACCESS_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-05-04" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{
        "content": {
          "type": "INTENTION",
          "system": {"id": "YOUR_SYSTEM_ID"},
          "operation": {"type": "TRANSACTION"}
        }
      }'
    
    # Part B: Transaction
    curl -X POST https://test.api.fiskaly.com/records \
      -H "Authorization: Bearer ${ACCESS_TOKEN}" \
      -H "Content-Type: application/json" \
      -H "X-Api-Version: 2026-05-04" \
      -H "X-Idempotency-Key: $(uuidgen)" \
      -d '{
        "content": {
          "type": "TRANSACTION",
          "record": {"id": "YOUR_INTENTION_ID"},
          "operation": {
            "type": "RECEIPT",
            "document": {
              "number": "FS-2026/00001",
              "series": "FS-2026",
              "total_vat": {
                "amount": "2.30",
                "exclusive": "10.00",
                "inclusive": "12.30"
              }
            },
            "entries": [
              {
                "type": "SALE",
                "data": {
                  "type": "ITEM",
                  "text": "Product A",
                  "unit": {"quantity": "1.00", "price": "10.00"},
                  "value": {"base": "10.00"},
                  "vat": {
                    "type": "VAT_RATE",
                    "code": "STANDARD",
                    "percentage": "23.00",
                    "amount": "2.30",
                    "exclusive": "10.00",
                    "inclusive": "12.30"
                  }
                },
                "details": {"concept": "GOOD"}
              }
            ],
            "payments": [
              {
                "type": "CASH",
                "details": {"amount": "12.30", "currency": "EUR"}
              }
            ]
          }
        }
      }'

    Sobald der Record den Status COMPLETED erreicht, gibt SIGN PT die Compliance-Nutzlast für den Druck zurück: ATCUD-Code, QR-Code-Inhalt, Hash-Auszug und die Softwarezertifikatsnummer.

Was this page helpful?