---
title: "POST /companies/{companySlug}/purchases"
method: POST
path: "/companies/{companySlug}/purchases"
tags: ["purchases"]
---

# POST /companies/{companySlug}/purchases

`POST /companies/{companySlug}/purchases`

## Request

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

Creates a new purchase.

## Request body

- PurchaseRequest
  - `transactionId` integer
  - `identifier` string: Invoice/sale number or similar.
  - `date` string, date, required: Payment date, format yyyy-mm-dd
  - `dueDate` string, date: Due date of the invoice, format yyyy-mm-dd
  - `kind` 'cash_purchase' | 'supplier', required: Purchased with cash or through a supplier.
  - `lines` OrderLine[], required
    - `lineId` integer: Stable identifier of this purchase/sale line, returned in GET responses. Use this value as `lineId` when setting up accrual for the line. Ignored if sent in a create/update request.
    - `description` string, required: Description of the product or service.
    - `netPrice` integer: Net amount of order line in cents. Either netPrice or netPriceInCurrency must be provided.
    - `vat` integer: VAT amount of order line in cents.
    - `account` string: Expense account (kostnadskonto) associated with payment.
    - `vatType` string, required: Vat Types for SALES: [NONE, HIGH, MEDIUM, RAW_FISH, LOW, EXEMPT_IMPORT_EXPORT, EXEMPT, OUTSIDE, EXEMPT_REVERSE] Vat Types for PURCHASES: [NONE, HIGH, MEDIUM, RAW_FISH, LOW, HIGH_DIRECT, HIGH_BASIS, MEDIUM_DIRECT, MEDIUM_BASIS, NONE_IMPORT_BASIS, HIGH_FOREIGN_SERVICE_DEDUCTIBLE, HIGH_FOREIGN_SERVICE_NONDEDUCTIBLE, LOW_FOREIGN_SERVICE_DEDUCTIBLE, LOW_FOREIGN_SERVICE_NONDEDUCTIBLE, HIGH_PURCHASE_OF_EMISSIONSTRADING_OR_GOLD_DEDUCTIBLE, HIGH_PURCHASE_OF_EMISSIONSTRADING_OR_GOLD_NONDEDUCTIBLE]
    - `netPriceInCurrency` integer: Net amount in currency (in cents)
    - `vatInCurrency` integer: VAT amount in currency (in cents)
    - `projectId` integer: If a purchase is split over several projects, project/line can be specified. This field is only to be used for purchases.
  - `supplierId` integer: Id of supplier if not a cash purchase.
  - `currency` string, required: ISO 4217 currency code
  - `paymentAccount` string
  - `paymentDate` string, date: Payment date, format yyyy-mm-dd
  - `paymentAmountInNok` integer: Required when creating a purchase with payment in a foreign currency. This is the actual NOK amount paid from the bank account. Formatted in cents (115000 = 1150.00 NOK)
  - `kid` string: Norwegian KID number. Number from 2 to 25 digits long.
  - `projectId` integer: Id of given project.

## Response `201`

Created

## Changes

- **2026-09-03** `2473dacdb89c`: 1 info
  - the request optional property `lines/items/projectId` became not write-only
- **2026-03-28** `dff97b55851e`: 1 breaking, 1 info
  - the request property `lines/items/description` became required
  - added the new optional request property `paymentAmountInNok`
- **2023-05-26** `e093a0c9db87`: 1 info
  - the request optional property `lines/items/projectId` became write-only
- **2021-12-08** `4813e5666340`: 1 info
  - the endpoint scheme security `fiken_api_oauth` was removed from the API

[Operation history](https://skmtc.dev/fiken/apis/fiken-api/changes/companies/:companySlug/purchases/post.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)
