invoices

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

Changed on

Returns invoice draft with specified 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

Response

OK

draftIdinteger

Invoice draft ID

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.

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

Type of invoice draft.

lastModifiedDatestring date

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

issueDatestring date

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

daysUntilDueDateinteger

Days until due date of the invoice draft.

invoiceTextstring

Comment/description printed above the invoice lines

currencystring

ISO 4217 currency code

yourReferencestring
ourReferencestring
orderReferencestring

Reference if sending invoice via EHF.

netinteger

The net amount to be invoiced in the specified currency.

grossinteger

The gross amount to be invoiced in the specified currency.

bankAccountNumberstring
ibanstring
bicstring
paymentAccountstring
createdFromInvoiceIdinteger
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. Only present when type is repeating_invoice.

endDatestring date

Date after which no more invoices are generated. Only present when type is repeating_invoice.

Example response

{
  "draftId": 2888156,
  "uuid": "123e4567-e89b-12d3-a456-426655440000",
  "type": "invoice",
  "lastModifiedDate": "2023-04-03",
  "issueDate": "2018-04-03",
  "daysUntilDueDate": 15,
  "currency": "NOK",
  "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"
    }
  ],
  "net": 4500,
  "gross": 5000,
  "bankAccountNumber": "11112233334",
  "paymentAccount": "1920:10001",
  "customers": [
    {
      "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"
        }
      ]
    }
  ],
  "attachments": [
    {
      "uuid": "745b2f15-1234-4408-8bf2-b1d2d7610cb2",
      "filename": "invoice_24760.pdf",
      "identifier": "24760",
      "type": "invoice"
    }
  ],
  "createdFromInvoiceId": 73408306,
  "projectId": 73408306,
  "roundingType": "none",
  "startDate": "2018-04-03",
  "endDate": "2019-04-03",
  "frequency": {
    "interval": 1,
    "intervalUnit": "MONTH"
  }
}

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

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

    • info

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

    • info

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

    • info

      response property customers/items/memberNumber deprecated