invoices

GET /companies/{companySlug}/invoices

Changed on

Returns all invoices for given company. You can filter based on issue date, last modified date, customer ID, and if the invoice is settled or not.

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

Query parameters

pageinteger

Returns the number of the page to return. Valid page values are integers from 0 to the total number of pages. Default value is 0.

pageSizeinteger

Defines the number of entries to return on each page. Maximum number of results that can be returned at one time are 100. Default value is 25.

issueDatestring date

Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

issueDateLestring date

Filter based on date less than or equal to parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

issueDateLtstring date

Filter based on date strictly less than parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

issueDateGestring date

Filter based on date greater than or equal to parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

issueDateGtstring date

Filter based on date strictly greater than parameter value Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

lastModifiedstring date

Filter based on date of last modification. Returns results that were last modified on the date provided as a parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

lastModifiedLestring date

Returns results that have been last modified before or on the date provided as a parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

lastModifiedLtstring date

Returns results that have been last modified strictly before the date provided as a parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

lastModifiedGestring date

Returns results that have been last modified after or on the date provided as a parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

lastModifiedGtstring date

Returns results that have been last modified strictly after the date provided as a parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

dueDatestring date

Filter based on due date of invoice. Returns results from the date provided as a parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

dueDateLestring date

Returns invoices with a due date before or on the date provided as a parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

dueDateLtstring date

Returns invoices with a due date that have been last modified strictly before the date provided as a parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

dueDateGestring date

Returns invoices with a due date that have been last modified after or on the date provided as a parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

dueDateGtstring date

Returns invoices with a due date that have been last modified strictly after the date provided as a parameter value. Dates are represented as strings formatted as YYYY-MM-DD. Example: January 1st, 1970: "1970-01-01"

customerIdinteger

Returns only invoices sent to specified customer. Must be the contactId provided by a GET contacts call.

settledboolean

When set to true, returns only invoices that have been settled. Otherwise false returns all invoices that have not been fully settled.

orderReferencestring

Filter based on order reference for a given invoice

invoiceDraftUuidstring uuid

Filter based on the UUID of the invoice draft that was used to create a given invoice

invoiceNumberstring

Response

OK

invoiceIdinteger

Invoice Id

createdDatestring date

Date that the invoice was created in Fiken, format yyyy-mm-dd.

lastModifiedDatestring date

Date that invoices was last modified in Fiken, format yyyy-mm-dd.

invoiceNumberinteger

Unique invoice number generated by us.

kidstring

Norwegian KID number. Number from 2 to 25 digits long.

issueDatestring date

Issue date of the invoice, format yyyy-mm-dd

dueDatestring date

Due date of the invoice, format yyyy-mm-dd

originalDueDatestring date

Original due date of the invoice if the due date has been changed, format yyyy-mm-dd

netinteger

Net amount (in invoice currency) in cents.

vatinteger

VAT amount (in invoice currency) in cents.

grossinteger

Gross amount (= net+VAT) (in invoice currency) in cents.

netInNokinteger

Net amount in NOK (in cents)

vatInNokinteger

VAT amount in NOK (in cents)

grossInNokinteger

Gross amount in NOK (in cents)

cashboolean

Purchase associated with Invoice is a cash purchase.

invoiceTextstring

Comment/description printed above the invoice lines

yourReferencestring
ourReferencestring
orderReferencestring
invoiceDraftUuidstring

The UUID of invoice draft used to create the invoice.

recurringInvoiceIdinteger

If the invoice was generated by a recurring invoice ("Repeterende faktura"), the Id of that recurring invoice. Null otherwise.

recurringInvoiceJobIdinteger

If the invoice was generated by a recurring invoice, the Id of the specific job (one per customer) that generated it. Null otherwise.

currencystring

ISO 4217 currency code, default value is NOK

bankAccountNumberstring
sentManuallyboolean

If the invoice was not sent using Fiken this can be set to "true"

associatedCreditNotesinteger[]

Associated credit note Id(s)

Example response

[
  {
    "invoiceId": 2888156,
    "createdDate": "2023-04-03",
    "lastModifiedDate": "2018-04-03",
    "invoiceNumber": 10001,
    "kid": "5855454756",
    "issueDate": "2018-04-03",
    "dueDate": "2018-04-03",
    "originalDueDate": "2018-04-03",
    "net": 25000,
    "vat": 5000,
    "gross": 30000,
    "netInNok": 25000,
    "vatInNok": 5000,
    "grossInNok": 30000,
    "cash": true,
    "invoiceDraftUuid": "123e4567-e89b-12d3-a456-426655440000",
    "recurringInvoiceId": 2345678,
    "recurringInvoiceJobId": 3456789,
    "address": {
      "streetAddress": "Karl Johan 34",
      "streetAddressLine2": "H0405",
      "city": "Oslo",
      "postCode": "0550",
      "country": "Norway"
    },
    "lines": [
      {
        "net": 4500,
        "vat": 500,
        "vatType": "HIGH",
        "gross": 5000,
        "netInNok": 4500,
        "vatInNok": 500,
        "grossInNok": 5000,
        "vatInPercent": 25,
        "unitPrice": 4550,
        "quantity": 5,
        "discount": 25,
        "productId": 2888156,
        "productName": "Gardening Gloves VI2",
        "description": "Goatskin, with extra-long suede cuffs",
        "comment": "One size fits all",
        "incomeAccount": "3000"
      }
    ],
    "bankAccountNumber": "11112233334",
    "invoicePdf": {
      "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
      "filename": "invoice_24760.pdf",
      "identifier": "24760",
      "type": "invoice"
    },
    "attachments": [
      {
        "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
        "filename": "invoice_24760.pdf",
        "identifier": "24760",
        "type": "invoice"
      }
    ],
    "customer": {
      "contactId": 2747365,
      "createdDate": "2018-04-03",
      "lastModifiedDate": "2018-04-03",
      "name": "Fiken AS",
      "email": "kontakt@fiken.gmail",
      "organizationNumber": "913312465",
      "customerNumber": 51248,
      "customerAccountCode": "1500:20001",
      "phoneNumber": "62158537",
      "memberNumber": 5464,
      "memberNumberString": "5464",
      "supplierAccountCode": "2400:20001",
      "bankAccountNumber": "11112233334",
      "contactPerson": [
        {
          "contactPersonId": 2747365,
          "name": "Betty Boop",
          "email": "bb@gmail.com",
          "phoneNumber": "98573564",
          "address": {
            "streetAddress": "Karl Johan 34",
            "streetAddressLine2": "H0405",
            "city": "Oslo",
            "postCode": "0550",
            "country": "Norway"
          }
        }
      ],
      "notes": [
        {
          "author": "Betty Boop",
          "note": "Garage 45"
        }
      ],
      "currency": "NOK",
      "language": "Norwegian",
      "inactive": true,
      "daysUntilInvoicingDueDate": 15,
      "discount": 25,
      "address": {
        "streetAddress": "Karl Johan 34",
        "streetAddressLine2": "H0405",
        "city": "Oslo",
        "postCode": "0550",
        "country": "Norway"
      },
      "documents": [
        {
          "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
          "filename": "invoice_24760.pdf",
          "identifier": "24760",
          "type": "invoice"
        }
      ]
    },
    "sale": {
      "saleId": 2888156,
      "lastModifiedDate": "2018-04-03",
      "transactionId": 3458156,
      "saleNumber": "XK455L",
      "date": "2018-04-03",
      "kind": "external_invoice",
      "netAmount": 4500,
      "vatAmount": 5400,
      "settled": true,
      "settledDate": "2023-04-03",
      "totalPaid": 524500,
      "totalPaidInCurrency": 634550,
      "outstandingBalance": 145,
      "outstandingBalanceInCurrency": 65,
      "lines": [
        {
          "lineId": 2888156,
          "netPrice": 4500,
          "vat": 500,
          "account": "3000",
          "netPriceInCurrency": 4500,
          "vatInCurrency": 500,
          "projectId": 2815556
        }
      ],
      "customer": {
        "contactId": 2747365,
        "createdDate": "2018-04-03",
        "lastModifiedDate": "2018-04-03",
        "name": "Fiken AS",
        "email": "kontakt@fiken.gmail",
        "organizationNumber": "913312465",
        "customerNumber": 51248,
        "customerAccountCode": "1500:20001",
        "phoneNumber": "62158537",
        "memberNumber": 5464,
        "memberNumberString": "5464",
        "supplierAccountCode": "2400:20001",
        "bankAccountNumber": "11112233334",
        "contactPerson": [
          {
            "contactPersonId": 2747365,
            "name": "Betty Boop",
            "email": "bb@gmail.com",
            "phoneNumber": "98573564",
            "address": {
              "streetAddress": "Karl Johan 34",
              "streetAddressLine2": "H0405",
              "city": "Oslo",
              "postCode": "0550",
              "country": "Norway"
            }
          }
        ],
        "notes": [
          {
            "author": "Betty Boop",
            "note": "Garage 45"
          }
        ],
        "currency": "NOK",
        "language": "Norwegian",
        "inactive": true,
        "daysUntilInvoicingDueDate": 15,
        "discount": 25,
        "address": {
          "streetAddress": "Karl Johan 34",
          "streetAddressLine2": "H0405",
          "city": "Oslo",
          "postCode": "0550",
          "country": "Norway"
        },
        "documents": [
          {
            "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
            "filename": "invoice_24760.pdf",
            "identifier": "24760",
            "type": "invoice"
          }
        ]
      },
      "currency": "NOK",
      "dueDate": "2018-04-03",
      "kid": "5855454756",
      "paymentAccount": "1920:10001",
      "salePayments": [
        {
          "paymentId": 2888156,
          "date": "2018-04-03",
          "account": "1920:10001",
          "amount": 34000,
          "amountInNok": 500000,
          "currency": "NOK"
        }
      ],
      "saleAttachments": [
        {
          "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
          "filename": "invoice_24760.pdf",
          "identifier": "24760",
          "type": "invoice"
        }
      ],
      "paymentDate": "2018-04-03",
      "project": {
        "projectId": 73408306,
        "startDate": "2018-04-03",
        "endDate": "2018-04-03",
        "contact": {
          "contactId": 2747365,
          "createdDate": "2018-04-03",
          "lastModifiedDate": "2018-04-03",
          "name": "Fiken AS",
          "email": "kontakt@fiken.gmail",
          "organizationNumber": "913312465",
          "customerNumber": 51248,
          "customerAccountCode": "1500:20001",
          "phoneNumber": "62158537",
          "memberNumber": 5464,
          "memberNumberString": "5464",
          "supplierAccountCode": "2400:20001",
          "bankAccountNumber": "11112233334",
          "contactPerson": [
            {
              "contactPersonId": 2747365,
              "name": "Betty Boop",
              "email": "bb@gmail.com",
              "phoneNumber": "98573564",
              "address": {
                "streetAddress": "Karl Johan 34",
                "streetAddressLine2": "H0405",
                "city": "Oslo",
                "postCode": "0550",
                "country": "Norway"
              }
            }
          ],
          "notes": [
            {
              "author": "Betty Boop",
              "note": "Garage 45"
            }
          ],
          "currency": "NOK",
          "language": "Norwegian",
          "inactive": true,
          "daysUntilInvoicingDueDate": 15,
          "discount": 25,
          "address": {
            "streetAddress": "Karl Johan 34",
            "streetAddressLine2": "H0405",
            "city": "Oslo",
            "postCode": "0550",
            "country": "Norway"
          },
          "documents": [
            {
              "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
              "filename": "invoice_24760.pdf",
              "identifier": "24760",
              "type": "invoice"
            }
          ]
        }
      },
      "notes": [
        {
          "author": "James Jones",
          "note": "Invoice sent after telephone conversation with customer"
        }
      ]
    },
    "project": {
      "projectId": 73408306,
      "startDate": "2018-04-03",
      "endDate": "2018-04-03",
      "contact": {
        "contactId": 2747365,
        "createdDate": "2018-04-03",
        "lastModifiedDate": "2018-04-03",
        "name": "Fiken AS",
        "email": "kontakt@fiken.gmail",
        "organizationNumber": "913312465",
        "customerNumber": 51248,
        "customerAccountCode": "1500:20001",
        "phoneNumber": "62158537",
        "memberNumber": 5464,
        "memberNumberString": "5464",
        "supplierAccountCode": "2400:20001",
        "bankAccountNumber": "11112233334",
        "contactPerson": [
          {
            "contactPersonId": 2747365,
            "name": "Betty Boop",
            "email": "bb@gmail.com",
            "phoneNumber": "98573564",
            "address": {
              "streetAddress": "Karl Johan 34",
              "streetAddressLine2": "H0405",
              "city": "Oslo",
              "postCode": "0550",
              "country": "Norway"
            }
          }
        ],
        "notes": [
          {
            "author": "Betty Boop",
            "note": "Garage 45"
          }
        ],
        "currency": "NOK",
        "language": "Norwegian",
        "inactive": true,
        "daysUntilInvoicingDueDate": 15,
        "discount": 25,
        "address": {
          "streetAddress": "Karl Johan 34",
          "streetAddressLine2": "H0405",
          "city": "Oslo",
          "postCode": "0550",
          "country": "Norway"
        },
        "documents": [
          {
            "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
            "filename": "invoice_24760.pdf",
            "identifier": "24760",
            "type": "invoice"
          }
        ]
      }
    },
    "dispatches": [
      {
        "date": "2024-04-03",
        "dispatchType": "email"
      }
    ]
  }
]

Changes

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      the response optional property //// became not write-only for the status

    • info

      added the new optional query request parameter dueDate

    • info

      added the new optional query request parameter dueDateGe

    • info

      added the new optional query request parameter dueDateGt

    • info

      added the new optional query request parameter dueDateLe

    • info

      added the new optional query request parameter dueDateLt

    • info

      added the new optional query request parameter invoiceNumber

    • info

      added the optional property // to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      the response optional property //// became not read-only for the status

    • info

      the response optional property // became read-only for the status

    • info

      added the optional write-only property items/customer/memberNumberString to the response with the status

    • info

      added the optional write-only property items/project/contact/memberNumberString to the response with the status

    • info

      added the optional write-only property items/sale/customer/memberNumberString to the response with the status

    • info

      added the optional write-only property items/sale/project/contact/memberNumberString to the response with the status

    • info

      the response property //// became required for the status

    • info

      response property items/customer/memberNumber deprecated

    • info

      response property items/project/contact/memberNumber deprecated

    • info

      response property items/sale/customer/memberNumber deprecated

    • info

      response property items/sale/project/contact/memberNumber deprecated