Hoppa till innehållet

Fakturor

Sales invoices with their lines and totals. Addressed by invoiceNumber.

2 anrop GET Bas-URL https://api.erp.fluit.cloud/preview

Autentisering, felkoder, rate limits, idempotens och paginering gäller alla anrop och står samlade under Kom igång.

GET /invoices

List invoices

Returns a paginated list of sales invoices, newest invoice date first. Lines are omitted from the list — fetch a single invoice via its links.self for the full document. ?modifiedSince= returns both created and modified invoices, so it can be used for delta sync; deletions are reported by GET /preview/deletions.

Frågeparametrar

Fält Typ Beskrivning
search string Matches the invoice number and the customer's own document number, case-insensitively and on partial words.
status enum Filters on where the invoice stands in its payment lifecycle. Draft Posted Booked Cancelled Paid PartiallyPaid
customerNumber string Returns only the invoices issued to this customer number.
invoiceDateFrom string(date) Returns only invoices dated on or after this date (ISO 8601 date).
invoiceDateTo string(date) Returns only invoices dated on or before this date (ISO 8601 date).
modifiedSince string(date-time) Returns only records created or changed at or after this instant (ISO 8601 UTC datetime). A change anywhere inside the record counts, including on its lines.
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Svar

200 PagedResult_PublicInvoiceResponse

Paginerat svar: raderna nedan ligger i items[], omgivna av totalCount, page, pageSize, totalPages, hasPreviousPage och hasNextPage. Paginerad

Fält Typ Beskrivning
balance decimal Remaining amount to pay, including tax. Serialised as a decimal string.
comments string · nullable Free-text comment printed on the invoice. Null if not set.
createdDate string(date-time) UTC timestamp when the invoice was created.
currencyCode string · nullable ISO 4217 currency code for all monetary values on this invoice.
customerName string · nullable Display name of the customer.
customerNumber string · nullable Customer number of the invoice recipient.
dueDate string(date) Due date (ISO 8601 date).
externalDocumentNumber string · nullable Document number in the accounting system. Null until the invoice is posted.
invoiceDate string(date) Invoice date (ISO 8601 date).
invoiceNumber string · nullable Unique invoice number, e.g. `INV-2026-00042`.
lines InvoiceLine[] · nullable Invoice lines. Empty on a list response.
links Links Hypermedia links for a public API resource. Exposed as a computed `links` property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
paidAmount decimal Amount received so far. Serialised as a decimal string.
status enum Invoice status values exposed via the Public API. Mirrors `Domain.Invoices.InvoiceStatus` name-for-name and value-for-value so the query projections can cast directly — a cast is translatable to SQL where a switch over a helper method is not. `PublicInvoiceEnumParityTests` fails the build if the two ever drift apart, which is what stops a new domain value from silently serialising as a bare number. Draft Posted Booked Cancelled Paid PartiallyPaid
totalAmount decimal Total excluding tax. Serialised as a decimal string.
totalVat decimal Total tax. Serialised as a decimal string.
type enum Invoice type values exposed via the Public API. Mirrors `Domain.Invoices.InvoiceType`. Invoice CreditNote Receipt
400 ProblemDetails ?status= got a value outside its list.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/preview/invoices" \
  -H "X-Api-Key: fluit_live_sk_..."
Svar 200
{
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "balance": "299.00",
      "comments": "string",
      "createdDate": "2026-06-11T09:24:13.418",
      "currencyCode": "SEK",
      "customerName": "Acme AB",
      "customerNumber": "CUST-001",
      "dueDate": "2026-06-11",
      "externalDocumentNumber": "ABC-001",
      "invoiceDate": "2026-06-11",
      "invoiceNumber": "INV-2026-0912",
      "lines": [
        {
          "description": "string",
          "itemNumber": "WIDGET-A",
          "lineNumber": 1,
          "lineTotal": "299.00",
          "quantity": "10",
          "taxAmount": "299.00",
          "taxPercent": "12.50",
          "unit": "st",
          "unitPrice": "299.00"
        }
      ],
      "links": {
        "self": "string"
      },
      "paidAmount": "299.00",
      "status": "Draft",
      "totalAmount": "299.00",
      "totalVat": "299.00",
      "type": "Invoice"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

GET /invoices/{invoiceNumber}

Get an invoice by invoice number

Returns the invoice including its lines. Invoices are read-only over the public API — they are created from sales orders inside Fluit.

invoices:read

Sökvägsparametrar

Fält Typ Beskrivning
invoiceNumber Krävs string Invoice number of the invoice to read.

Svar

200 PublicInvoiceResponse
Fält Typ Beskrivning
balance decimal Remaining amount to pay, including tax. Serialised as a decimal string.
comments string · nullable Free-text comment printed on the invoice. Null if not set.
createdDate string(date-time) UTC timestamp when the invoice was created.
currencyCode string · nullable ISO 4217 currency code for all monetary values on this invoice.
customerName string · nullable Display name of the customer.
customerNumber string · nullable Customer number of the invoice recipient.
dueDate string(date) Due date (ISO 8601 date).
externalDocumentNumber string · nullable Document number in the accounting system. Null until the invoice is posted.
invoiceDate string(date) Invoice date (ISO 8601 date).
invoiceNumber string · nullable Unique invoice number, e.g. `INV-2026-00042`.
lines InvoiceLine[] · nullable Invoice lines. Empty on a list response.
links Links Hypermedia links for a public API resource. Exposed as a computed `links` property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
paidAmount decimal Amount received so far. Serialised as a decimal string.
status enum Invoice status values exposed via the Public API. Mirrors `Domain.Invoices.InvoiceStatus` name-for-name and value-for-value so the query projections can cast directly — a cast is translatable to SQL where a switch over a helper method is not. `PublicInvoiceEnumParityTests` fails the build if the two ever drift apart, which is what stops a new domain value from silently serialising as a bare number. Draft Posted Booked Cancelled Paid PartiallyPaid
totalAmount decimal Total excluding tax. Serialised as a decimal string.
totalVat decimal Total tax. Serialised as a decimal string.
type enum Invoice type values exposed via the Public API. Mirrors `Domain.Invoices.InvoiceType`. Invoice CreditNote Receipt
404 ProblemDetails No invoice with that invoice number.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/preview/invoices/{invoiceNumber}" \
  -H "X-Api-Key: fluit_live_sk_..."
Svar 200
{
  "balance": "299.00",
  "comments": "string",
  "createdDate": "2026-06-11T09:24:13.418",
  "currencyCode": "SEK",
  "customerName": "Acme AB",
  "customerNumber": "CUST-001",
  "dueDate": "2026-06-11",
  "externalDocumentNumber": "ABC-001",
  "invoiceDate": "2026-06-11",
  "invoiceNumber": "INV-2026-0912",
  "lines": [
    {
      "description": "string",
      "itemNumber": "WIDGET-A",
      "lineNumber": 1,
      "lineTotal": "299.00",
      "quantity": "10",
      "taxAmount": "299.00",
      "taxPercent": "12.50",
      "unit": "st",
      "unitPrice": "299.00"
    }
  ],
  "links": {
    "self": "string"
  },
  "paidAmount": "299.00",
  "status": "Draft",
  "totalAmount": "299.00",
  "totalVat": "299.00",
  "type": "Invoice"
}

Bas-URL https://api.erp.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

Scheman

Objekten som gruppens anrop refererar till. Fälttabellerna ovan går ett steg djupt och länkar hit i stället för att upprepa samma schema på varje endpoint.

InvoiceLine

PublicInvoiceLineResponse

A single line on an invoice.

Fält Typ Beskrivning
description string · nullable Line description as printed on the invoice.
itemNumber string · nullable Item number of the invoiced item. Null for charge and free-text lines.
lineNumber integer Line number within the invoice, starting at 1.
lineTotal decimal Line total excluding tax. Serialised as a decimal string.
quantity decimal Invoiced quantity. Serialised as a decimal string.
taxAmount decimal Tax amount on the line. Serialised as a decimal string.
taxPercent decimal Tax rate applied to the line, in percent. Serialised as a decimal string.
unit string · nullable Unit of measure, e.g. `st`.
unitPrice decimal Price per unit excluding tax. Serialised as a decimal string.