---
title: "Query Accounting Data"
method: GET
path: "/v2/accountingData"
tags: ["accountingData"]
---

# Query Accounting Data

`GET /v2/accountingData`

Delivers a paginated overview of finalized accounting transactions, including invoices, credits, and their cancellations and corrections.

## Query parameters

- `from` string, date-time
- `to` string, date-time
- `companyId` string, uuid — Represents a key for identifying a firm within the application.
- `type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 — 0 = SalesInvoice, 1 = SalesCredit, 2 = SalesInvoiceCorrection, 3 = SalesInvoiceCancellation, 4 = SalesCreditCancellation, 5 = SalesInvoiceCorrectionCancellation, 6 = SalesLiquidation, 7 = SalesLiquidationCancellation
- `exportCurrencyInDepartureCountry` boolean
- `pageNumber` integer
- `pageSize` integer

## Headers

- `x-tenant-id` string, uuid, required
- `x-runas` string
- `x-companyid` string

## Response `200`

Provides a detailed overview of all non-pending sales orders, including invoices, credits, invoice corrections, invoice cancellations, credit cancellations, and invoice correction cancellations, along with their associated line items

- JTLWawiRestContractsModelsPagedListOfJTLWawiRestContractsModelsV2AccountingDataAccountingData — Represents a paginated list of items
  - `totalItems` integer — Gets or sets the total number of items available in the data source.
  - `pageNumber` integer — Gets or sets the current page number in the paginated list.
  - `pageSize` integer — Gets or sets the number of items per page in the paginated list.
  - `items` JTLWawiRestContractsModelsV2AccountingDataAccountingData[] — Gets or sets the collection of items contained in the paged list.
    - `documentNumber` string — The number of the document.
    - `documentType` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 — 0 = SalesInvoice, 1 = SalesCredit, 2 = SalesInvoiceCorrection, 3 = SalesInvoiceCancellation, 4 = SalesCreditCancellation, 5 = SalesInvoiceCorrectionCancellation, 6 = SalesLiquidation, 7 = SalesLiquidationCancellation
    - `documentDate` string, date-time — The date and time when the document was created.
    - `serviceDate` string, date-time — The service date of the invoice or the related invoice if the document is an invoice correction.
    - `salesInvoiceCorrectionId` string, uuid
    - `salesInvoiceId` string, uuid
    - `salesOrderId` string, uuid
    - `salesOrderNumber` string — The internal number of the sales order.
    - `externalSalesOrderNumber` string — The external number of the sales order.
    - `currencyIso` string — ISO code of the currency of the departure country.
    - `companyId` string, uuid — Represents a key for identifying a firm within the application.
    - `companyVatId` string — The VAT Id of the Company
    - `customerVatId` string — The VAT ID of the customer, if applicable.
    - `salesChannelId` string — Identifier for the sales channel through which the order was placed.
    - `isCancelled` boolean — Indicates if the document has been cancelled.
    - `departureCountry` JTLWawiRestContractsModelsV1AccountingDataCountry — Model Class: Country
      - `countryISO` string — ISO code of the country.
      - `stateISO` string — ISO code of the state within the country.
    - `shipmentCountry` JTLWawiRestContractsModelsV1AccountingDataCountry — Model Class: Country
      - `countryISO` string — ISO code of the country.
      - `stateISO` string — ISO code of the state within the country.
    - `billingAddress` JTLWawiRestContractsModelsV1CommonAddress — Model Class: Address
      - `id` string, uuid
      - `company` string — Description of the Company.
      - `company2` string — Additional company information
      - `formOfAddress` string — Customer form of address
      - `title` string — Official title
      - `firstName` string — Customer first name
      - `lastName` string — Customer last name
      - `street` string — Street name in the customer's address
      - `address2` string — Additional address information
      - `postalCode` string — Postal code of the customer's address
      - `city` string — Name of city in the customer's address
      - `state` string — Name of state in the customer's address
      - `countryIso` string — Country ISO code
      - `vatID` string — Supplier VAT ID number
      - `phoneNumber` string — Landline phone number
      - `mobilePhoneNumber` string — Mobile phone number
      - `emailAddress` string — Email address
      - `fax` string — Fax number
    - `shipmentAddress` JTLWawiRestContractsModelsV1CommonAddress — Model Class: Address
      - `id` string, uuid
      - `company` string — Description of the Company.
      - `company2` string — Additional company information
      - `formOfAddress` string — Customer form of address
      - `title` string — Official title
      - `firstName` string — Customer first name
      - `lastName` string — Customer last name
      - `street` string — Street name in the customer's address
      - `address2` string — Additional address information
      - `postalCode` string — Postal code of the customer's address
      - `city` string — Name of city in the customer's address
      - `state` string — Name of state in the customer's address
      - `countryIso` string — Country ISO code
      - `vatID` string — Supplier VAT ID number
      - `phoneNumber` string — Landline phone number
      - `mobilePhoneNumber` string — Mobile phone number
      - `emailAddress` string — Email address
      - `fax` string — Fax number
    - `accountDataLineItems` JTLWawiRestContractsModelsV2AccountingDataAccountingDataLineItem[] — Detailed list of items included in the document.
      - `salesInvoiceCorrectionLineItemId` string, uuid
      - `salesInvoiceLineItemId` string, uuid
      - `itemId` string, uuid
      - `lineItemType` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 — 0 = CustomLineItem, 1 = Item, 2 = ShippingItem, 3 = Coupon, 4 = Voucher, 5 = PaymentMethod, 6 = ShippingSurcharge, 7 = NewCustomerCoupon, 8 = CashOnDeliveryFee, 9 = ItemShippingSurcharge, 10 = GiftWrapping, 11 = FreeGift, 12 = TrustedShopsFee, 13 = InterestSurcharge, 14 = HandlingFee, 15 = CardboardBoxes, 16 = Return, 17 = MultiPurposeVoucher, 18 = MultiPurposeDigitalVoucher, 19 = SinglePurposeVoucher, 20 = SinglePurposeDigitalVoucher, 21 = SinglePurposeVoucherRedemption
      - `name` string — The description of the line item.
      - `taxClassId` string, uuid
      - `taxClassName` string — The name of the tax class.
      - `taxClassType` 0 | 1 | 2 | 3 | 4 | 5 — 0 = None, 1 = SuperReducedTaxRate, 2 = ReducedTaxRateLow, 3 = ReducedTaxRate, 4 = StandardTaxRate, 5 = IntermediaryRate
      - `generalLedgerAccount` string — An account or record used to sort, store and summarize a company's transactions.
      - `quantity` number — The number of items.
      - `netSalesPricePerUnit` number — The net sales price per unit of this line item.
      - `vatRate` number — Applicable VAT rate in percent.
      - `vatAmount` number — Total VAT charged for this item.
      - `discountInPercent` number — Discount in percent for this line item.
      - `totalDiscountGrossAmount` number — Total discount amount including VAT.
      - `totalDiscountNetAmount` number — Total discount amount excluding VAT.
      - `totalGrossAmount` number — Total item price including VAT.
      - `totalNetAmount` number — Total item price excluding VAT.
      - `sortOrder` integer — The order in which the line item appears in the document.
  - `totalPages` integer — Gets the total number of pages based on the total number of items and the page size.
  - `hasPreviousPage` boolean — Gets a value indicating whether there is a previous page available in the paginated list.
  - `hasNextPage` boolean — Gets a value indicating whether there is a next page available.
  - `nextPageNumber` integer — Gets the number of the next page if there is one; otherwise, returns the total number of pages.
  - `previousPageNumber` integer — Gets the number of the previous page. If there is no previous page, it returns 1.

## Other responses

- `401`
- `402` — No licence available or the app has not been authorised by JTL.
- `404` — No registration request was found for the specified identifier

---

[API](https://skmtc.net/jtl-software/apis/scx-authentication-api.md) · [All operations](https://skmtc.net/jtl-software/apis/scx-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jtl-software/scx-authentication-api/revisions/f979b1ea6951/schema)
