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

# POST /companies/{companySlug}/sales

`POST /companies/{companySlug}/sales`

## Request

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

Creates a new sale. This corresponds to "Annet salg" in Fiken and should be used when the invoice document and invoice number have been created outside Fiken. Otherwise the invoices-endpoints should be used.

## Request body

- SaleRequest
  - `saleNumber` string: Identifier for sale.
  - `date` string, date, required: Date of the invoice, format yyyy-mm-dd
  - `kind` 'cash_sale' | 'invoice' | 'external_invoice', required: Either cash_sale, invoice, or external_invoice.
  - `totalPaid` integer: Total amount paid in NOK
  - `totalPaidInCurrency` integer: Total amount paid in other currency.
  - `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.
  - `customerId` integer: customerId = contactId where customer = true
  - `currency` string, required: ISO 4217 currency code
  - `dueDate` string, date: Due date of the invoice, format yyyy-mm-dd
  - `kid` string: Norwegian KID number. Number from 2 to 25 digits long.
  - `paymentAccount` string
  - `paymentDate` string, date: Payment date of the invoice, format yyyy-mm-dd
  - `paymentFee` integer: Fee associated with payment of sale.
  - `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
  - the request property `lines/items/description` became required
- **2023-05-26** `e093a0c9db87`: 2 warning, 1 info
  - removed the request property `outstandingBalance`
  - removed the request property `settled`
  - the request optional property `lines/items/projectId` became write-only
- **2021-12-08** `4813e5666340`: 3 info
  - the endpoint scheme security `fiken_api_oauth` was removed from the API
  - the request optional property `paymentDate` became not read-only
  - the request optional property `paymentAccount` became not write-only

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