sales

POST /companies/{companySlug}/sales/{saleId}/accruals

Changed on

Sets up accrual for a single line on the sale, spreading the line amount evenly over a number of monthly periods. Mirrors the "Periodiser / fordel inntekter over tid" action in Fiken. Only lines on result accounts (3000–7999) can be accrued. Accrual of sales with sales-cost lines (salgskostnad) is not supported.

Request

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

Request body

lineIdinteger required

The purchase/sale line (orderLine.lineId) to accrue. Must be a line on a result account (3000–7999).

startDatestring date required

First period (month) of the accrual, format yyyy-mm-dd.

periodsinteger required

Number of monthly periods to spread the line amount over.

accountstring

Account to accrue the amount to. Required. Must be one of the accounts available in Fiken for the kind of trade — for purchases: 1397, 1700, 1710, 1742, 1743, 1744, 1749, 2961; for sales: 1530, 2965.

Example request

{
  "lineId": 2888156,
  "startDate": "2018-04-01",
  "periods": 12,
  "account": "1749"
}

Response

Created

Changes