invoices

PUT /companies/{companySlug}/invoices/drafts/{draftId}

Changed on

Updates invoice draft with provided id.

Request

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

Request body

type'invoice' | 'cash_invoice' | 'offer' | 'order_confirmation' | 'credit_note' | 'repeating_invoice' required

Type of draft.

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.

issueDatestring date

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

daysUntilDueDateinteger required

Days until due date of the invoice draft.

invoiceTextstring

Comment/description printed above the invoice lines. If not present, and standard text is registered, standard text is printed.

yourReferencestring
ourReferencestring
orderReferencestring

Reference if sending invoice via EHF.

currencystring

ISO 4217 currency code

bankAccountNumberstring
ibanstring
bicstring
paymentAccountstring
customerIdinteger required

customerId = contactId where customer = true

contactPersonIdinteger

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

projectIdinteger
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.

startDatestring date

First issue date of the recurring invoice. Required only when type is repeating_invoice.

endDatestring date

Optional date after which no more invoices are generated. Only applicable when type is repeating_invoice.

Example request

{
  "type": "invoice",
  "uuid": "123e4567-e89b-12d3-a456-426655440000",
  "issueDate": "2018-04-03",
  "daysUntilDueDate": 15,
  "lines": [
    {
      "invoiceishDraftLineId": 2888156,
      "lastModifiedDate": "2018-04-03",
      "description": "Goatskin, with extra-long suede cuffs",
      "unitPrice": 4550,
      "quantity": 5,
      "discount": 25,
      "comment": "One size fits all",
      "incomeAccount": "3000"
    }
  ],
  "currency": "NOK",
  "bankAccountNumber": "11112233334",
  "paymentAccount": "1920:10001",
  "customerId": 7340852,
  "contactPersonId": 8588156,
  "projectId": 75408386,
  "roundingType": "none",
  "startDate": "2018-04-03",
  "endDate": "2019-04-03",
  "frequency": {
    "interval": 1,
    "intervalUnit": "MONTH"
  }
}

Response

Created

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request optional property // became read-only

    • info

      added the new repeating_invoice enum value to the request property

    • info

      added the new optional request property //