invoices

POST /companies/{companySlug}/invoices

Changed on

Creates an invoice. This corresponds to "Ny faktura" in Fiken. There are two types of invoice lines that can be added to an invoice line: product line or free text line. Provide a product Id if you are invoicing a product. All information regarding the price and VAT for this product will be added to the invoice. It is however also possible to override the unit amount by sending information in both fields "productId" and "unitAmount". An invoice line can also be a free text line meaning that no existing product will be associated with the invoiced line. In this case all information regarding the price and VAT of the product or service to be invoiced must be provided.

Request

  • Base URL
    https://api.fiken.no/api/v2
  • URL
    https://api.fiken.no/api/v2/companies/{companySlug}/invoices
  • Auth
    OAuth 2
    Authorization code: https://fiken.no/oauth/authorize
    Token URL: https://fiken.no/oauth/token

Request body

uuidstring

UUID are represented as 32 hexadecimal (base-16) digits, displayed in 5 groups separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters. If not provided, API will generate a UUID.

issueDatestring date required

Date that the invoice was issued, format yyyy-mm-dd

dueDatestring date required

Due date of invoice, format yyyy-mm-dd

ourReferencestring
yourReferencestring

Your reference for invoice, free string format

orderReferencestring

Reference if sending via EHF.

customerIdinteger required

customerId = contactId where customer = true

contactPersonIdinteger

Id of the contact person. Must be associated with the provided customer.

bankAccountCodestring required

Bank account code associated with invoice, format 1920:XXXXX

currencystring

ISO 4217 currency code. Defaults to "NOK" if unspecified.

invoiceTextstring

If not present, and standard text is registered, standard text is printed.

cashboolean required

Payment taken in cash (True) or not (False).

paymentAccountstring

For Cash Invoices only. For instance "1920:10001".

projectIdinteger

Optional - Associated project for the invoice to be created.

roundingType'none' | 'round_half' | 'round_whole' | 'round_down_half' | 'round_down_whole'

Type of øreavrunding (rounding) to apply to the total. 'none' means no rounding (default). 'round_half' rounds to nearest 50 øre, 'round_whole' rounds to nearest whole krone, 'round_down_half' rounds down to nearest 50 øre, 'round_down_whole' rounds down to nearest whole krone. Only applicable for NOK currency. Does not change the company's default rounding setting.

Example request

{
  "uuid": "123e4567-e89b-12d3-a456-426655440000",
  "issueDate": "2018-04-03",
  "dueDate": "2018-04-03",
  "lines": [
    {
      "net": 4500,
      "vat": 500,
      "vatType": "HIGH",
      "gross": 5000,
      "vatInPercent": 25,
      "unitPrice": 4550,
      "quantity": 5,
      "discount": 25,
      "productName": "Gardening Gloves VI2",
      "productId": 2888156,
      "description": "Goatskin, with extra-long suede cuffs",
      "comment": "One size fits all",
      "incomeAccount": "3000"
    }
  ],
  "customerId": 2888156,
  "contactPersonId": 8588156,
  "bankAccountCode": "1920:10002",
  "currency": "NOK",
  "invoiceText": "Invoice for services rendered during the Oslo Knitting Festival.",
  "paymentAccount": "1920:10001",
  "projectId": 15124866,
  "roundingType": "none"
}

Response

Created

Changes