FastFaktura

FastFaktura API

v1 · 1.0.0

Integrer FastFaktura-fakturering i dine værktøjer: kunder, fakturaer, afsendelse og PDF'er via en enkel REST API. Sandbox-konti simulerer rigtig afsendelse og bruger Stripe i testtilstand.

OpenAPI-specifikationBasis-URLhttps://app.fastfaktura.io/api/v1

Hurtig start

Generer en API-nøgle fra dine kontoindstillinger, og kald derefter API'et med X-Api-Key-headeren.

curl
curl -X POST https://app.fastfaktura.io/api/v1/invoices \
  -H "X-Api-Key: ffk_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "1f0c4a9e-…",
    "currency": "EUR",
    "lines": [
      { "description": "Consulting", "quantity": 1, "unit_price_cents": 50000, "tax_rate": 20 }
    ]
  }'

Godkendelse

Hver anmodning skal indeholde din API-nøgle, enten i X-Api-Key-headeren eller som et Bearer-token. Begge metoder er ækvivalente.

X-Api-Key
curl https://app.fastfaktura.io/api/v1/clients \
  -H "X-Api-Key: ffk_xxxxxxxx"
Authorization: Bearer
curl https://app.fastfaktura.io/api/v1/clients \
  -H "Authorization: Bearer ffk_xxxxxxxx"

Endpoints

Virksomhed

get/api/v1/business

Profil entreprise

Svar

  • 200OK
put/api/v1/business

Mise à jour du profil

Svar

  • 200OK

Kunder

get/api/v1/clients

Liste des clients

Parametre

pagequeryinteger
qquerystringRecherche nom/email/téléphone

Svar

  • 200OK
post/api/v1/clients

Création client

Svar

  • 201Créé
get/api/v1/clients/{id}

Détail client

Svar

  • 200OK
  • 404Introuvable
put/api/v1/clients/{id}

Édition client

Svar

  • 200OK
delete/api/v1/clients/{id}

Archivage client (pas de suppression définitive)

Svar

  • 200OK

Fakturaer

get/api/v1/invoices

Liste des factures

Parametre

pagequeryinteger
statusquerystring

Svar

  • 200OK
post/api/v1/invoices

Création facture (avec lignes)

Anmodningsindhold

FeltTypeBeskrivelse
client_idpåkrævetuuid
currencypåkrævetstring
due_datestring | null
notesstring | null
linespåkrævetInvoiceLine[]

Svar

  • 201Créée
get/api/v1/invoices/{id}

Détail facture + lignes + événements

Svar

  • 200OK
get/api/v1/invoices/{id}/pdf

PDF de la facture

Svar

  • 200application/pdf
post/api/v1/invoices/{id}/send

Envoi (email / sms / lien), mode normal ou rappel

Anmodningsindhold

FeltTypeBeskrivelse
channelspåkrævetstring[]
reminderboolean

Svar

  • 200OK (sandbox: envoi simulé)
get/api/v1/invoices/{id}/events

Timeline d'événements

Svar

  • 200OK

Skemaer

Struktur for de objekter, der accepteres og returneres af API'et.

Client

FeltTypeBeskrivelse
iduuid
namestring
emailstring | null
phonestring | nullE.164
addressstring | null
countrystring | null
localestringfrennbsv
external_idstring | null
tagsstring[]
archived_atstring | null

InvoiceLine

FeltTypeBeskrivelse
descriptionpåkrævetstring
quantitypåkrævetnumber
unit_price_centspåkrævetintegerCentimes
tax_ratepåkrævetnumberPourcentage (ex. 20)

Invoice

FeltTypeBeskrivelse
iduuid
numberstring
client_iduuid
currencystringEURUSDGBPNOKSEKDKK
subtotal_centsinteger
tax_centsinteger
total_centsinteger
statusstringdraftsentopenedpaidoverduecancelled
due_datestring | null
public_urlstring