---
title: "GET /companies/{companySlug}/ehf/{ehfDocumentId}"
method: GET
path: "/companies/{companySlug}/ehf/{ehfDocumentId}"
tags: ["ehf"]
---

# GET /companies/{companySlug}/ehf/{ehfDocumentId}

`GET /companies/{companySlug}/ehf/{ehfDocumentId}`

## Request

- Base URL: `https://api.fiken.no/api/v2`
- URL: `https://api.fiken.no/api/v2/companies/{companySlug}/ehf/{ehfDocumentId}`
- Auth: OAuth 2
  - Authorization code: `https://fiken.no/oauth/authorize`
  - Token URL: `https://fiken.no/oauth/token`

Returns the received EHF document with the specified id.

## Response `200`

OK

- EhfDocumentResult
  - `ehfDocumentId` integer
  - `status` 'unprocessed' | 'used' | 'processed' | 'deleted': Processing state of the document. Note that `used` and `processed` are distinct: attaching a document is not the same as booking it. Through this API the only state change available for an EHF document is attaching it (which sets `used`, see the attachment endpoints); booking and deleting are done in Fiken (the web application), so `processed` and `deleted` are never reached through this API. * `unprocessed` – received and still in the inbox, not yet handled. * `used` – attached as documentation to another record (a purchase, sale, or journal entry, or a draft of these) via the attachment endpoints. The document itself has not been booked. It stays `used` even when the record it is attached to is itself already booked — attaching does not transition it to `processed`. * `processed` – the document itself has been booked as a purchase, which populates `purchaseId`. Booking an EHF is done in Fiken; this API has no endpoint to book one, so a document does not become `processed` through the API, and attaching it to an existing purchase does not make it `processed`. * `deleted` – removed from the inbox (done in Fiken).
  - `documentType` 'invoice' | 'creditNote': Whether the document is an invoice or a credit note.
  - `invoiceNumber` string: The supplier's invoice or credit note number as stated in the EHF document.
  - `issueDate` string, date: Invoice/credit note date from the EHF document.
  - `dueDate` string, date: Payment due date, if present.
  - `supplierName` string: Supplier name as stated in the EHF document.
  - `supplierOrganizationNumber` string: Supplier organization number as stated in the EHF document.
  - `supplierContactId` integer: Id of the matched Fiken contact for the supplier, if any.
  - `net` integer: Total net amount in cents.
  - `vat` integer: Total VAT amount in cents.
  - `gross` integer: Total gross amount (= net + VAT) in cents.
  - `amountDue` integer: Total amount to be paid, in cents (NOK), if present.
  - `currency` string: ISO 4217 currency code.
  - `kid` string
  - `accountNumber` string: Bank account number for payment, if present.
  - `bic` string
  - `iban` string
  - `description` string: Free-text description of the document.
  - `purchaseId` integer: Id of the purchase this document was booked as (i.e. when `status` is `processed`). Null for documents that are `unprocessed`, `used`, or `deleted`. Booking is done in Fiken, not through this API.
  - `documentUrl` string: URL to download the document PDF. For use with API credentials (bearer token or oauth 2).
  - `documentUrlWithFikenNormalUserCredentials` string: URL to download the document PDF. Requires the user to login with username and password in Fiken.
  - `xmlUrl` string: URL to download the raw EHF XML. For use with API credentials (bearer token or oauth 2).
  - `xmlUrlWithFikenNormalUserCredentials` string: URL to download the raw EHF XML. Requires the user to login with username and password in Fiken.
  - `createdAt` string, date-time: When the document was received.
  - `lines` EhfDocumentLine[]
    - `description` string: Line description (product name and/or comment).
    - `net` integer: Net amount for the line in cents.
    - `vat` integer: VAT amount for the line in cents.
    - `vatType` string: VAT type resolved for purchase booking.

## Changes

- **2026-09-03** `2473dacdb89c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fiken/apis/fiken-api/changes/companies/:companySlug/ehf/:ehfDocumentId/get.md)

---

[API](https://skmtc.dev/fiken/apis/fiken-api.md) - [All operations](https://skmtc.dev/fiken/apis/fiken-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fiken/apis/fiken-api/revisions/29111da67f94?raw)
