---
title: "Get invoice data"
method: GET
path: "/sales/invoice"
tags: ["Sales"]
---

# Get invoice data

`GET /sales/invoice`

Retrieve data for a particular invoice available in the system

This endpoint may be used as a base for new invoice data that we wish to create based on a set of related invoices

If you wish to generate such object base you will need to provide both:
* `related` parameter, listing the related invoices
* `invoiceType` of the new invoice we wish to create

The return object will be a temporary invoice object you may further extend before saving it.

## Query parameters

- `ref` integer
- `related` unknown[]
  - unknown
- `invoiceType` 'SALES' | 'CORRECTION' | 'INTERIM_FINAL'

## Response `200`

OK

- object
  - `result` string
  - `data` object
    - `invoice` Invoice — Invoice model for objects returned from server
      - `modelType` string
      - `readOnly` boolean
      - `basicInformation` object
        - `invoiceId` integer, required
        - `invoiceType` 'SALES' | 'PRO_FORMA' | 'INTERIM' | 'INTERIM_FINAL' | 'CORRECTION', required
        - `invoiceFormat` string, required
        - `invoiceNumber` string
        - `year` integer, required
        - `month` integer, required
        - `invoiceNumberInPeriod` integer
        - `statusId` string
        - `isReceipt` boolean
        - `isRelated` boolean
        - `netPrice` integer
        - `grossPrice` number
        - `currency` string
        - `exchangeRate` number
        - `vatPLN` number
        - `issueDate` string
        - `saleDate` string
        - `uploadDate` string
        - `relatedInvoicesIds` object[]
        - `priceTypeId` string
      - `contractor` object
        - `contractorName` string
        - `contractorId` integer
        - `taxIdentificationNumber` string
        - `country` string
        - `contractorType` string
        - `contractorRegion` string
        - `defaultCurrency` string
        - `city` string
        - `street` string
        - `houseNumber` string
        - `flatNumber` string
        - `postCode` string
        - `email` string
        - `phoneNumber` string
        - `areaNumber` string
      - `seller` object
        - `taxIdentificationNumber` string
        - `contractorName` string
      - `payments` object
        - `paymentMethod` string
        - `dueDate` string
        - `isSplitPayment` boolean
        - `isPaid` boolean
        - `paidAmount` integer
        - `bankAccountNumber` string
      - `ksef` object
        - `ksefId` string
        - `ksefSubmissionDate` string
        - `ksefStatus` 'ACCEPTED' | 'PENDING' | 'ERROR'
        - `ksefErrorMessage` string
        - `ksefRetryCount` integer
        - `ksefSourceXmlKey` string
      - `offlineMode` boolean
      - `offlineModeReason` string
      - `invoicePosition` object[]
        - `invoiceProductId` integer
        - `positionType` string
        - `productPosition` integer
        - `productCategory` string
        - `productCategoryId` integer
        - `productName` string
        - `unit` string
        - `unitNetPrice` integer
        - `unitGrossPrice` number
        - `quantity` integer
        - `discount` integer
        - `vat` string
        - `priceNet` integer
        - `netPrice` string
        - `vatAmt` number
        - `priceGross` number
        - `grossPrice` string
        - `gtu` string
    - `relatedInvoices` Invoice[]
      - `modelType` string
      - `readOnly` boolean
      - `basicInformation` object
        - `invoiceId` integer, required
        - `invoiceType` 'SALES' | 'PRO_FORMA' | 'INTERIM' | 'INTERIM_FINAL' | 'CORRECTION', required
        - `invoiceFormat` string, required
        - `invoiceNumber` string
        - `year` integer, required
        - `month` integer, required
        - `invoiceNumberInPeriod` integer
        - `statusId` string
        - `isReceipt` boolean
        - `isRelated` boolean
        - `netPrice` integer
        - `grossPrice` number
        - `currency` string
        - `exchangeRate` number
        - `vatPLN` number
        - `issueDate` string
        - `saleDate` string
        - `uploadDate` string
        - `relatedInvoicesIds` object[]
        - `priceTypeId` string
      - `contractor` object
        - `contractorName` string
        - `contractorId` integer
        - `taxIdentificationNumber` string
        - `country` string
        - `contractorType` string
        - `contractorRegion` string
        - `defaultCurrency` string
        - `city` string
        - `street` string
        - `houseNumber` string
        - `flatNumber` string
        - `postCode` string
        - `email` string
        - `phoneNumber` string
        - `areaNumber` string
      - `seller` object
        - `taxIdentificationNumber` string
        - `contractorName` string
      - `payments` object
        - `paymentMethod` string
        - `dueDate` string
        - `isSplitPayment` boolean
        - `isPaid` boolean
        - `paidAmount` integer
        - `bankAccountNumber` string
      - `ksef` object
        - `ksefId` string
        - `ksefSubmissionDate` string
        - `ksefStatus` 'ACCEPTED' | 'PENDING' | 'ERROR'
        - `ksefErrorMessage` string
        - `ksefRetryCount` integer
        - `ksefSourceXmlKey` string
      - `offlineMode` boolean
      - `offlineModeReason` string
      - `invoicePosition` object[]
        - `invoiceProductId` integer
        - `positionType` string
        - `productPosition` integer
        - `productCategory` string
        - `productCategoryId` integer
        - `productName` string
        - `unit` string
        - `unitNetPrice` integer
        - `unitGrossPrice` number
        - `quantity` integer
        - `discount` integer
        - `vat` string
        - `priceNet` integer
        - `netPrice` string
        - `vatAmt` number
        - `priceGross` number
        - `grossPrice` string
        - `gtu` string
    - `defaults` object

## Other responses

- `400` — Bad Request

## Changes

> 4 revisions in range; 1 could not be searched.

- **2024-08-26** `64c683372c45` — 1 info
  - endpoint added
- **2024-08-26** `a2d864f3a8db` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/altera-co/apis/openapi/changes/sales/invoice/get.md)

---

[API](https://skmtc.dev/altera-co/apis/openapi.md) · [All operations](https://skmtc.dev/altera-co/apis/openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/altera-co/openapi/revisions/39a4dd6ca527/schema)
