sales

POST /companies/{companySlug}/sales

Changed on

Creates a new sale. This corresponds to "Annet salg" in Fiken and should be used when the invoice document and invoice number have been created outside Fiken. Otherwise the invoices-endpoints should be used.

Request

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

Request body

saleNumberstring

Identifier for sale.

datestring date required

Date of the invoice, format yyyy-mm-dd

kind'cash_sale' | 'invoice' | 'external_invoice' required

Either cash_sale, invoice, or external_invoice.

totalPaidinteger

Total amount paid in NOK

totalPaidInCurrencyinteger

Total amount paid in other currency.

customerIdinteger

customerId = contactId where customer = true

currencystring required

ISO 4217 currency code

dueDatestring date

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

kidstring

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

paymentAccountstring
paymentDatestring date

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

paymentFeeinteger

Fee associated with payment of sale.

projectIdinteger

Id of given project.

Example request

{
  "saleNumber": "XK455L",
  "date": "2018-04-03",
  "kind": "external_invoice",
  "totalPaid": 524500,
  "totalPaidInCurrency": 634550,
  "lines": [
    {
      "lineId": 2888156,
      "netPrice": 4500,
      "vat": 500,
      "account": "3000",
      "netPriceInCurrency": 4500,
      "vatInCurrency": 500,
      "projectId": 2815556
    }
  ],
  "currency": "NOK",
  "dueDate": "2018-04-03",
  "kid": "5855454756",
  "paymentAccount": "1920:10001",
  "paymentDate": "2018-04-03",
  "paymentFee": 634550,
  "projectId": 2888156
}

Response

Created

Changes