Invoices API

Read the invoices, receipts and credit notes of an order, search them, and download them as PDF with the Omnium Invoices API.

The Invoices API gives access to the sales documents of orders and projects: invoices, receipts and credit notes. Omnium creates these documents in order and return workflow steps, and external systems such as an ERP can add their own. Use the API to show a customer the receipts of an order in your webshop, to search documents, and to download a document as a PDF.

All endpoints are available at:

https://api.omnium.no/api/Invoices

The endpoints require an API user with read access to orders. Uploading a new invoice file with AddInvoice requires admin access to orders.

Endpoints

MethodEndpointDescription
GET/api/InvoicesList all invoices, paged, optionally filtered to paid or unpaid documents with isPaid
GET/api/Invoices/{invoiceId}Get one invoice
GET/api/Invoices/Orders/{orderId}List the invoices, receipts and credit notes of an order
GET/api/Invoices/Customers/{customerId}List the invoices of a customer
GET/api/Invoices/GetAsPdf/{invoiceId}Download an invoice, receipt or credit note as a PDF
POST/api/Invoices/SearchSearch invoices with filters, sorting and optional totals
PUT/api/Invoices/UpdateInvoiceAdd a new invoice, or replace an existing invoice
POST/api/Invoices/AddInvoiceUpload an invoice file and create a new invoice for it, optionally linked to an order (orderId) or project (projectId). Returns 201 Created.
POST/api/Invoices/{invoiceId}/AddFileToInvoiceUpload an invoice file and attach it to an existing invoice
POST/api/Invoices/{invoiceId}/AddAssetUpload a file and add it as an asset on an invoice. Pass assetId to update the asset with that ID, or to give the new asset that ID.
DELETE/api/Invoices/{invoiceId}Delete an invoice and its invoice file

Paging

The list endpoints (/api/Invoices, /Orders/{orderId} and /Customers/{customerId}) take the query parameters page (default 1), pageSize (default 20, maximum 1000) and isPaid. The product of page and pageSize must stay below 20000. isPaid=false returns only documents with an outstanding amount above 0. isPaid=true returns only documents with an outstanding amount of 0 or less, receipts included. Invoices from the Create Invoice step have no outstanding amount set, so isPaid=true returns them too. Leave isPaid out to get all documents.

Search takes page and take in the request body. Both are required and must be greater than 0.

Invoices, receipts and credit notes

The same invoice model holds three kinds of documents:

DocumentHow to recognize itWhat it is
InvoiceisCreditNote is false and invoiceType is not ReceiptA sales document the customer may still owe money on. Invoices from an ERP can carry amountOutstanding, invoiceDueDate and kid.
ReceiptinvoiceType is Receipt and isCreditNote is falseThe paid sales document for one delivered shipment, issued by the Create Receipt for Shipment workflow step.
Credit noteisCreditNote is trueA document that reverses all or part of an invoice or receipt, issued for a return.

Receipts

A receipt documents one shipment of an order. An order with several shipments has one receipt per shipment, so get all of them with GET /api/Invoices/Orders/{orderId}, or one with a search on shipmentId. On a receipt:

  • shipmentId is the shipment it documents and orderId is the order
  • lineItems are the delivered lines of the shipment, with the delivered quantity
  • payments are the payments that paid the shipment, and together they equal amount
  • amountOutstanding is 0, and invoiceDueDate is the same as invoiceDate
  • kid is empty
  • deliveryDate is the date the shipment was completed, or the issue date when the shipment has no completed date
  • origin is Omnium

Credit notes

A credit note from a return lists the receipts that hold the returned lines in creditedInvoiceIds. The credit note PDF prints them as the documents it credits.

Invoice model

FieldTypeDescription
IdstringInvoice ID. For documents Omnium creates, this is the number from the number series. An invoice gets a GUID when no invoice number series is configured.
InvoiceNumberstringInvoice number
InvoiceTypestringDocument type, for example Receipt for a receipt
InvoiceDatedatetimeWhen the document was issued
InvoiceDueDatedatetimeWhen an invoice is due. The same as InvoiceDate on a receipt or credit note.
DeliveryDatedatetimeWhen the goods were delivered
OrderIdstringThe order the document belongs to
ShipmentIdstringThe shipment of the order the document covers, when it covers one shipment only. A receipt always has one.
ProjectIdstringThe project the document belongs to
CustomerIdstringCustomer ID
CustomerNamestringCustomer name
CustomerEmailstringCustomer email
CustomerTypestringCustomer type, copied from the order (for example B2C or B2B)
AmountdecimalTotal amount including VAT, in the document currency
AmountExcludingTaxdecimalTotal amount excluding VAT
AmountRoundoffdecimalRounding to the nearest whole amount
AmountOutstandingdecimalThe amount not paid yet, as provided by the system that created the invoice. 0 on a receipt. Invoices from the Create Invoice step do not set it.
CurrencystringDocument currency
KidstringNorwegian customer identification number (KID) for the payment
IsCreditNoteboolTrue when the document is a credit note
CreditedInvoiceIdsarrayFor a credit note: the IDs of the invoices and receipts it reverses
OriginstringThe system that created the document, for example Omnium
StoreIdstringStore ID
MarketIdstringMarket ID
UrlstringLink to an uploaded invoice file or another external document
CommentstringComment
LineItemsarrayThe invoiced order lines, in the order line format
PaymentsarrayPayments, in the order payment format. On a receipt: the payments that paid the shipment.
CustomerAddressobjectBilling address
DeliveryAddressobjectDelivery address
InvoiceSenderAddressobjectThe sender's address
ExternalIdsarrayReferences to external systems
PropertiesarrayCustom properties
AssetsarrayFiles added to the invoice
CreateddatetimeWhen the record was created
ModifieddatetimeWhen the record was last changed

Get the receipts of an order

GET /api/Invoices/Orders/1004812 HTTP/1.1
Host: api.omnium.no
Authorization: Bearer YOUR_API_KEY
{
  "totalHits": 1,
  "result": [
    {
      "id": "K-10235",
      "invoiceNumber": "K-10235",
      "invoiceType": "Receipt",
      "invoiceDate": "2026-10-24T09:14:02Z",
      "invoiceDueDate": "2026-10-24T09:14:02Z",
      "deliveryDate": "2026-10-24T09:00:00Z",
      "orderId": "1004812",
      "shipmentId": "2",
      "customerId": "C123456",
      "customerName": "Kari Nordmann",
      "amount": 1298.0,
      "amountExcludingTax": 1038.4,
      "amountOutstanding": 0.0,
      "currency": "NOK",
      "isCreditNote": false,
      "origin": "Omnium",
      "storeId": "oslo-sentrum",
      "marketId": "NOR",
      "lineItems": [
        {
          "code": "JKT-FJORD-M",
          "displayName": "Regnjakke Fjord",
          "quantity": 1,
          "extendedPrice": 1199.0,
          "taxRate": 25.0
        }
      ],
      "payments": [
        {
          "paymentMethodName": "Klarna",
          "transactionType": "Capture",
          "amount": 1098.0
        },
        {
          "paymentMethodName": "GiftCard",
          "transactionType": "Sale",
          "amount": 200.0
        }
      ]
    }
  ]
}

Search invoices

Send the filters in the request body. Every filter you set must match.

FieldTypeDescription
PageintPage number. Required, greater than 0.
TakeintNumber of documents per page. Required, greater than 0.
InvoiceIdstringDocuments with this ID
InvoiceTypesarrayDocuments with one of these invoice types, for example ["Receipt"]
OrderIdstringDocuments of this order
ShipmentIdstringDocuments of this shipment
CustomerIdstringDocuments of this customer
ProjectIdstringDocuments of this project
QuerystringFree text search in Id, OrderId, ProjectId, CustomerName, CustomerId, InvoiceNumber, Kid and the external IDs
IsPaidboolfalse for documents with an outstanding amount above 0, true for documents with an outstanding amount of 0 or less. Leave it out to get all documents.
CreatedFromdatetimeDocuments created at or after this time
CreatedTodatetimeDocuments created at or before this time
PropertiesarrayDocuments with these property keys and values
MarketIdsarrayDocuments in these markets
StoreIdsarrayDocuments in these stores
SortOrderstringCreatedAscending, CreatedDescending, ModifiedAscending, ModifiedDescending, InvoiceDueDateAscending or InvoiceDueDateDescending
IncludeTotalsboolAdd a totals object with totalAmountSum and totalAmountExcludingVatSum for all matching documents

This request finds the receipt of shipment 2 on order 1004812:

POST /api/Invoices/Search HTTP/1.1
Host: api.omnium.no
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
 
{
  "page": 1,
  "take": 10,
  "orderId": "1004812",
  "shipmentId": "2",
  "invoiceTypes": ["Receipt"]
}

Download a document as a PDF

GET /api/Invoices/GetAsPdf/{invoiceId} returns the document as application/pdf. A document that an ERP connector provides can come from that system. Omnium renders the documents it creates itself:

  • A receipt has the title RECEIPT in the market language and a paid line that names the payment methods, such as Paid with Klarna, instead of the due date, KID and bank account. It also shows the delivery date, the shipment, the payments, the VAT rate of each line and the VAT per rate.
  • A credit note shows the receipts it credits.

These documents use the standard layout unless the market has an invoice template.

Add or update an invoice

PUT /api/Invoices/UpdateInvoice takes an invoice in the model above. Without an id, Omnium adds a new invoice and takes the ID from the invoice number series of the invoice's market or tenant, or a GUID when no series is configured. With an id, the request replaces the stored invoice with that ID. The request fails with 400 Bad Request when customerId, orderId, projectId or storeId refers to something that does not exist, when marketId is not one of the tenant's markets, or when customerEmail is not a valid email address. The upload endpoints take the file content as the request body, with the file name in the fileName query parameter.

For the full interactive API reference, see the swagger documentation.

On this page