---
title: Schema Reference
slug: devdocs/x2Tw-schema-reference
docTags: 
createdAt: 2026-10-22T08:35:59.687Z
---

The full schema of the Accounting API, from the sandbox introspection.

## Entry points

| **Root** | **Category**    | **Type**           |
| -------- | --------------- | ------------------ |
| Query    | `documents`     | `DocumentQuery`    |
| Query    | `miscellaneous` | `MiscQuery`        |
| Query    | `pms`           | `PMSQuery`         |
| Query    | `products`      | `ProductQuery`     |
| Query    | `companies`     | `CompanyQuery`     |
| Mutation | `documents`     | `DocumentMutation` |
| Mutation | `miscellaneous` | `MiscMutation`     |

## Document queries (`documents`)

| **Query**                 | **Arguments**                                                                                                                 | **Returns**                        |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| `purchaseInvoices`        | `after`, `first`, `before`, `last`, `organization`, `dateBegin`, `dateEnd`, `key`, `nOK`                                      | `PurchaseInvoiceConnection`        |
| `consumptionNotes`        | `after`, `first`, `before`, `last`, `organization`, `dateBegin`, `dateEnd`, `key`, `nOK`                                      | `ConsumptionNoteConnection`        |
| `transfers`               | `after`, `first`, `before`, `last`, `withPriceChanges`, `organization`, `dateBegin`, `dateEnd`, `key`, `nOK`                  | `TransferConnection`               |
| `inventoryAdjustments`    | `after`, `first`, `before`, `last`, `warehouse`, `organization`, `dateBegin`, `dateEnd`, `key`, `nOK`                         | `InventoryAdjustmentConnection`    |
| `productionNotes`         | `after`, `first`, `before`, `last`, `organization`, `dateBegin`, `dateEnd`, `key`, `nOK`                                      | `ProductionNoteConnection`         |
| `saleInvoices`            | `after`, `first`, `before`, `last`, `organization`, `dateBegin`, `dateEnd`, `key`, `nOK`                                      | `SaleInvoiceConnection`            |
| `businessDaySaleInvoices` | `after`, `first`, `before`, `last`, `organization`, `dateBegin`, `dateEnd`, `key`, `nOK`                                      | `BusinessDaySaleInvoiceConnection` |
| `businessDays`            | `after`, `first`, `before`, `last`, `location`, `closedOnly`, `billKey`, `organization`, `dateBegin`, `dateEnd`, `key`, `nOK` | `BusinessDayConnection`            |
| `productPhysicalStocks`   | `startDate`, `endDate`, `organizationKey`, `warehouseKey`, `productKey`, `withBatch`                                          | `[ProductPhysicalStockType]`       |

The connection types (`...Connection`) have `totalCount`, `pageInfo`, `edges` and `items`.

## Mutations

| **Mutation**                         | **Argument**                               | **Returns**                 |
| ------------------------------------ | ------------------------------------------ | --------------------------- |
| `documents.purchaseInvoiceCreate`    | `payload: PurchaseInvoiceCreateInputType!` | `PurchaseInvoiceTypeResult` |
| `miscellaneous.changeDocumentCursor` | `payload: DocumentCursorInputType!`        | `DocumentCursorType`        |

## Enum values

| **Enum**                      | **Values**                                                                                                                                                                                          |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AccountingDocumentType`      | `PurchaseInvoice`, `Transfer`, `ConsumptionNote`, `ProductionNote`, `InventoryAdjustment`, `SaleInvoice`, `BusinessDaySaleInvoice`, `BusinessDay`, `PMSSaleInvoice`, `PMSBusinessDay`, `Unknown`    |
| `AccountingDynamicEntityType` | `ProductCategory`, `Product`, `Location`, `Warehouse`, `PMSPropertyCode`                                                                                                                            |
| `AccountingProductType`       | `RawMaterial`, `ConsumableMaterial`, `FinishedProduct`, `SemiFinishedProduct`, `Merchandise`, `Packaging`, `InventoryObject`, `Unknown`                                                             |
| `DocumentStatusType`          | `Draft`, `Finalized`, `Processed`                                                                                                                                                                   |
| `DocumentType`                | `NIR`, `NPR`, `FacturaFiscala`, `BorderouDeAchizitie`, `FacturaRetur`, `BonDeConsum`, `AvizDeExpeditie`, `Z`, `ReglareInventar`, `Productie`, `Reparare`, `BonFiscal`, `CarnetAgricol`, `AvizRetur` |
| `PaymentMethodEnumType`       | `Cash`, `Card`, `Ticket`, `Virament`, `Mobile`, `PMS`, `ContactDebt`, `AccountDebt`, `ElectronicTicket`, `Cashless`                                                                                 |
| `ProductEnumType`             | `Product`, `Service`, `Recipe`, `Package`, `OpenItem`, `AdvancePay`, `GiftCard`, `Transportation`, `ServiceCharge`, `Pack`, `Tax`                                                                   |
| `WarehouseEnumType`           | `Unknown`, `Quantity`, `Value`, `Services`                                                                                                                                                          |

## Input types

### DocumentCursorInputType

| **Field**                     | **Type**                      | **Required** |
| ----------------------------- | ----------------------------- | ------------ |
| `accountingDocumentType`      | `AccountingDocumentType!`     | yes          |
| `cursorValue`                 | `String!`                     | yes          |
| `accountingDynamicEntityType` | `AccountingDynamicEntityType` | no           |
| `dynamicEntityKey`            | `String`                      | no           |

### PurchaseInvoiceCreateInputType

| **Field**              | **Type**                             | **Required** |
| ---------------------- | ------------------------------------ | ------------ |
| `organizationKey`      | `Guid!`                              | yes          |
| `documentNumber`       | `String!`                            | yes          |
| `documentDate`         | `DateTime!`                          | yes          |
| `documentType`         | `DocumentType!`                      | yes          |
| `companyKey`           | `Guid!`                              | yes          |
| `discountAmount`       | `Decimal`                            | no           |
| `discountRate`         | `Decimal`                            | no           |
| `discountVatAmount`    | `Decimal`                            | no           |
| `paymentAmount`        | `Decimal!`                           | yes          |
| `vatAmount`            | `Decimal!`                           | yes          |
| `dueDate`              | `DateTime`                           | no           |
| `vatCollect`           | `Boolean`                            | no           |
| `vatOnReceipt`         | `Boolean`                            | no           |
| `currencyKey`          | `Guid`                               | no           |
| `currencyExchangeRate` | `Decimal`                            | no           |
| `currencyAmount`       | `Decimal`                            | no           |
| `currencyVat`          | `Decimal`                            | no           |
| `products`             | `[PurchaseInvoiceProductInputType]!` | yes          |

### PurchaseInvoiceProductInputType

| **Field**           | **Type**   | **Required** |
| ------------------- | ---------- | ------------ |
| `productKey`        | `Guid!`    | yes          |
| `quantity`          | `Decimal!` | yes          |
| `price`             | `Decimal!` | yes          |
| `amount`            | `Decimal!` | yes          |
| `discountAmount`    | `Decimal`  | no           |
| `vatRate`           | `Decimal!` | yes          |
| `vatAmount`         | `Decimal!` | yes          |
| `discountVatAmount` | `Decimal`  | no           |
| `warehouseKey`      | `Guid!`    | yes          |
| `lotId`             | `Int`      | no           |
| `externalLot`       | `String`   | no           |

## Types

### AccountingNoteType

| **Field**               | **Type**                |
| ----------------------- | ----------------------- |
| `credit`                | `String`                |
| `debit`                 | `String`                |
| `note`                  | `String`                |
| `amount`                | `Decimal!`              |
| `documentType`          | `DocumentType`          |
| `accountingProductType` | `AccountingProductType` |

### AddressType

| **Field**     | **Type**  |
| ------------- | --------- |
| `city`        | `String!` |
| `county`      | `String!` |
| `countyCode`  | `String!` |
| `country`     | `String!` |
| `countryCode` | `String!` |
| `street`      | `String!` |

### AreaType

| **Field**       | **Type**            |
| --------------- | ------------------- |
| `key`           | `Guid!`             |
| `name`          | `String`            |
| `revenueCenter` | `RevenueCenterType` |

### BusinessDayOrderBillType

| **Field**   | **Type**    |
| ----------- | ----------- |
| `key`       | `Guid!`     |
| `createdOn` | `DateTime!` |
| `closedOn`  | `DateTime`  |

### BusinessDayOrderProductType

| **Field**                        | **Type**                |
| -------------------------------- | ----------------------- |
| `product`                        | `ProductType`           |
| `warehouse`                      | `WarehouseType`         |
| `quantity`                       | `Decimal!`              |
| `salePrice`                      | `Decimal!`              |
| `vatAmount`                      | `Decimal!`              |
| `vatRate`                        | `Decimal!`              |
| `discount`                       | `Decimal!`              |
| `subtotalDiscount`               | `Decimal!`              |
| `costAmount`                     | `Decimal`               |
| `saleAccount(inherit)`           | `String`                |
| `discountAccount(inherit)`       | `String`                |
| `accountingProductType(inherit)` | `AccountingProductType` |

### BusinessDayOrderType

| **Field**          | **Type**                        |
| ------------------ | ------------------------------- |
| `key`              | `Guid!`                         |
| `id`               | `Int!`                          |
| `number`           | `Int!`                          |
| `createdOn`        | `DateTime`                      |
| `isRefund`         | `Boolean`                       |
| `fiscalDocumentId` | `Int`                           |
| `clientTaxNumber`  | `String`                        |
| `bill`             | `BusinessDayOrderBillType!`     |
| `area`             | `AreaType!`                     |
| `discount`         | `Decimal!`                      |
| `products`         | `[BusinessDayOrderProductType]` |
| `payments`         | `[BusinessDayPaymentType]`      |
| `customer`         | `CustomerType`                  |
| `businessDay`      | `BusinessDayType!`              |

### BusinessDayPage

| **Field**      | **Type**               |
| -------------- | ---------------------- |
| `cursor`       | `Int!`                 |
| `pageSize`     | `Int!`                 |
| `totalRecords` | `Int!`                 |
| `items`        | `[PmsBusinessDayType]` |

### BusinessDayPaymentType

| **Field**       | **Type**             |
| --------------- | -------------------- |
| `paymentMethod` | `PaymentMethodType!` |
| `amount`        | `Decimal!`           |
| `ratio`         | `Decimal!`           |

### BusinessDayProductionNoteType

| **Field**   | **Type**                      |
| ----------- | ----------------------------- |
| `key`       | `Int!`                        |
| `date`      | `DateTime!`                   |
| `warehouse` | `WarehouseType`               |
| `products`  | `[ProductionNoteProductType]` |

### BusinessDayRawMaterialType

| **Field**                        | **Type**                |
| -------------------------------- | ----------------------- |
| `product`                        | `ProductType`           |
| `warehouse`                      | `WarehouseType`         |
| `revenueCenter`                  | `RevenueCenterType`     |
| `quantity`                       | `Decimal!`              |
| `costPrice`                      | `Decimal!`              |
| `stockAccount(inherit)`          | `String`                |
| `expenseAccount(inherit)`        | `String`                |
| `accountingProductType(inherit)` | `AccountingProductType` |
| `order`                          | `BusinessDayOrderType`  |

### BusinessDaySaleInvoiceType

| **Field**      | **Type**                   |
| -------------- | -------------------------- |
| `id`           | `Int!`                     |
| `key`          | `Guid!`                    |
| `documentType` | `DocumentType!`            |
| `number`       | `Int!`                     |
| `series`       | `String!`                  |
| `date`         | `DateTime!`                |
| `dueDate`      | `DateTime`                 |
| `createdOn`    | `DateTime`                 |
| `delegate`     | `String`                   |
| `company`      | `CompanyType`              |
| `location`     | `LocationType`             |
| `customer`     | `CustomerType`             |
| `products`     | `[SaleInvoiceProductType]` |
| `orders`       | `[BusinessDayOrderType]`   |

### BusinessDayType

| **Field**                                  | **Type**                          |
| ------------------------------------------ | --------------------------------- |
| `accountingNotes(withProduction, inherit)` | `[AccountingNoteType]`            |
| `key`                                      | `Guid!`                           |
| `group`                                    | `Short!`                          |
| `number`                                   | `Int!`                            |
| `id`                                       | `Int!`                            |
| `inventoryId`                              | `Int`                             |
| `createdOn`                                | `DateTime!`                       |
| `closedOn`                                 | `DateTime`                        |
| `location`                                 | `LocationType!`                   |
| `isBalanced`                               | `Boolean!`                        |
| `orders(fiscalReceiptOnly)`                | `[BusinessDayOrderType]`          |
| `rawMaterials`                             | `[BusinessDayRawMaterialType]`    |
| `production`                               | `[BusinessDayProductionNoteType]` |

### CityType

| **Field** | **Type** |
| --------- | -------- |
| `key`     | `Guid!`  |
| `name`    | `String` |
| `id`      | `Int`    |

### CompanyAddressType

| **Field**      | **Type**      |
| -------------- | ------------- |
| `key`          | `Guid!`       |
| `eMail`        | `String`      |
| `building`     | `String`      |
| `floor`        | `String`      |
| `postalCode`   | `String`      |
| `room`         | `String`      |
| `streetName`   | `String`      |
| `streetNumber` | `String`      |
| `city`         | `CityType`    |
| `county`       | `CountyType`  |
| `country`      | `CountryType` |

### CompanyCategoryType

| **Field** | **Type** |
| --------- | -------- |
| `key`     | `Guid!`  |
| `name`    | `String` |

### CompanyQuery

| **Field**                                                | **Type**                |
| -------------------------------------------------------- | ----------------------- |
| `companies(after, first, before, last, key, fiscalCode)` | `CompanyConnection`     |
| `companyCategories`                                      | `[CompanyCategoryType]` |

### CompanyType

| **Field**          | **Type**               |
| ------------------ | ---------------------- |
| `key`              | `Guid!`                |
| `name`             | `String`               |
| `fiscalCode`       | `String`               |
| `fiscalAttribute`  | `String`               |
| `registrationCode` | `String`               |
| `externalCode`     | `String`               |
| `bankName1`        | `String`               |
| `bankAccount1`     | `String`               |
| `bankName2`        | `String`               |
| `bankAccount2`     | `String`               |
| `defaultAddress`   | `CompanyAddressType`   |
| `addresses`        | `[CompanyAddressType]` |

### ConsumptionNoteProductType

| **Field**                        | **Type**                |
| -------------------------------- | ----------------------- |
| `product`                        | `ProductType`           |
| `warehouse`                      | `WarehouseType`         |
| `lineNumber`                     | `Int`                   |
| `quantity`                       | `Decimal!`              |
| `amount`                         | `Decimal!`              |
| `salePrice`                      | `Decimal`               |
| `stockAccount(inherit)`          | `String`                |
| `expenseAccount(inherit)`        | `String`                |
| `accountingProductType(inherit)` | `AccountingProductType` |

### ConsumptionNoteType

| **Field**                                  | **Type**                       |
| ------------------------------------------ | ------------------------------ |
| `accountingNotes(withProduction, inherit)` | `[AccountingNoteType]`         |
| `key`                                      | `Int!`                         |
| `date`                                     | `DateTime!`                    |
| `createdOn`                                | `DateTime!`                    |
| `status`                                   | `DocumentStatusType!`          |
| `warehouse`                                | `WarehouseType`                |
| `destination`                              | `Int!`                         |
| `destinationName`                          | `String!`                      |
| `consumptionType`                          | `Int!`                         |
| `consumptionTypeName`                      | `String!`                      |
| `products`                                 | `[ConsumptionNoteProductType]` |
| `rawMaterials`                             | `[RawMaterialType]`            |
| `production`                               | `[ProductionNoteProductType]`  |

### ConsumptionTypeType

| **Field** | **Type** |
| --------- | -------- |
| `id`      | `Int!`   |
| `name`    | `String` |

### CountryType

| **Field** | **Type** |
| --------- | -------- |
| `key`     | `Guid!`  |
| `name`    | `String` |
| `code`    | `String` |

### CountyType

| **Field** | **Type** |
| --------- | -------- |
| `key`     | `Guid!`  |
| `name`    | `String` |
| `code`    | `String` |

### CurrencyType

| **Field** | **Type**  |
| --------- | --------- |
| `key`     | `Int!`    |
| `name`    | `String`  |
| `rate`    | `Decimal` |

### CustomerAddressType

| **Field**      | **Type**      |
| -------------- | ------------- |
| `key`          | `Guid!`       |
| `building`     | `String`      |
| `floor`        | `String`      |
| `postalCode`   | `String`      |
| `room`         | `String`      |
| `streetName`   | `String`      |
| `streetNumber` | `String`      |
| `city`         | `CityType`    |
| `county`       | `CountyType`  |
| `country`      | `CountryType` |

### CustomerType

| **Field**                      | **Type**              |
| ------------------------------ | --------------------- |
| `key`                          | `Guid!`               |
| `id`                           | `Int!`                |
| `firstName`                    | `String`              |
| `lastName`                     | `String`              |
| `personalIdentificationNumber` | `String`              |
| `externalCode`                 | `String`              |
| `defaultAddress`               | `CustomerAddressType` |

### DocumentCursorType

| **Field**                     | **Type**                      |
| ----------------------------- | ----------------------------- |
| `accountingDocumentType`      | `AccountingDocumentType!`     |
| `dynamicEntityKey`            | `String`                      |
| `accountingDynamicEntityType` | `AccountingDynamicEntityType` |
| `cursorValue`                 | `String!`                     |
| `cursorData`                  | `String!`                     |

### DocumentMutation

| **Field**                        | **Type**                    |
| -------------------------------- | --------------------------- |
| `purchaseInvoiceCreate(payload)` | `PurchaseInvoiceTypeResult` |

### DocumentQuery

| **Field**                                                                                                             | **Type**                           |
| --------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| `purchaseInvoices(after, first, before, last, organization, dateBegin, dateEnd, key, nOK)`                            | `PurchaseInvoiceConnection`        |
| `consumptionNotes(after, first, before, last, organization, dateBegin, dateEnd, key, nOK)`                            | `ConsumptionNoteConnection`        |
| `transfers(after, first, before, last, withPriceChanges, organization, dateBegin, dateEnd, key, nOK)`                 | `TransferConnection`               |
| `inventoryAdjustments(after, first, before, last, warehouse, organization, dateBegin, dateEnd, key, nOK)`             | `InventoryAdjustmentConnection`    |
| `productionNotes(after, first, before, last, organization, dateBegin, dateEnd, key, nOK)`                             | `ProductionNoteConnection`         |
| `saleInvoices(after, first, before, last, organization, dateBegin, dateEnd, key, nOK)`                                | `SaleInvoiceConnection`            |
| `businessDaySaleInvoices(after, first, before, last, organization, dateBegin, dateEnd, key, nOK)`                     | `BusinessDaySaleInvoiceConnection` |
| `businessDays(after, first, before, last, location, closedOnly, billKey, organization, dateBegin, dateEnd, key, nOK)` | `BusinessDayConnection`            |
| `productPhysicalStocks(startDate, endDate, organizationKey, warehouseKey, productKey, withBatch)`                     | `[ProductPhysicalStockType]`       |

### InventoryAdjustmentProductType

| **Field**                        | **Type**                |
| -------------------------------- | ----------------------- |
| `product`                        | `ProductType`           |
| `quantity`                       | `Decimal!`              |
| `amount`                         | `Decimal!`              |
| `salePrice`                      | `Decimal`               |
| `stockAccount(inherit)`          | `String`                |
| `accountingProductType(inherit)` | `AccountingProductType` |

### InventoryAdjustmentType

| **Field**                                  | **Type**                           |
| ------------------------------------------ | ---------------------------------- |
| `accountingNotes(withProduction, inherit)` | `[AccountingNoteType]`             |
| `key`                                      | `Int!`                             |
| `date`                                     | `DateTime!`                        |
| `status`                                   | `DocumentStatusType!`              |
| `warehouse`                                | `WarehouseType`                    |
| `products`                                 | `[InventoryAdjustmentProductType]` |

### LocationType

| **Field**      | **Type** |
| -------------- | -------- |
| `key`          | `Guid!`  |
| `id`           | `Int!`   |
| `name`         | `String` |
| `externalCode` | `String` |

### MeasureUnitType

| **Field**      | **Type**   |
| -------------- | ---------- |
| `key`          | `Guid!`    |
| `name`         | `String`   |
| `symbol`       | `String`   |
| `externalCode` | `String`   |
| `eInvoiceCode` | `String`   |
| `parentRatio`  | `Decimal!` |

### MiscMutation

| **Field**                       | **Type**             |
| ------------------------------- | -------------------- |
| `changeDocumentCursor(payload)` | `DocumentCursorType` |

### MiscQuery

| **Field**          | **Type**                |
| ------------------ | ----------------------- |
| `cursor`           | `[DocumentCursorType]!` |
| `organizations`    | `[OrganizationType]`    |
| `locations`        | `[LocationType]`        |
| `payments`         | `[PaymentMethodType]`   |
| `warehouses`       | `[WarehouseType]`       |
| `currencies`       | `[CurrencyType]`        |
| `consumptionTypes` | `[ConsumptionTypeType]` |

### OrganizationType

| **Field**          | **Type** |
| ------------------ | -------- |
| `key`              | `Guid!`  |
| `name`             | `String` |
| `fiscalAttribute`  | `String` |
| `fiscalCode`       | `String` |
| `registrationCode` | `String` |

### PMSPaymentType

| **Field**      | **Type**   |
| -------------- | ---------- |
| `code`         | `String`   |
| `externalCode` | `String`   |
| `name`         | `String!`  |
| `amount`       | `Decimal!` |
| `saleAccount`  | `String`   |

### PMSProductType

| **Field**       | **Type**   |
| --------------- | ---------- |
| `code`          | `String`   |
| `externalCode`  | `String`   |
| `name`          | `String!`  |
| `quantity`      | `Decimal!` |
| `salePrice`     | `Decimal!` |
| `saleAccount`   | `String`   |
| `vatAmount`     | `Decimal!` |
| `vatRate`       | `Decimal!` |
| `amount`        | `Decimal!` |
| `revenueCenter` | `String`   |

### PMSQuery

| **Field**                                                                   | **Type**                |
| --------------------------------------------------------------------------- | ----------------------- |
| `enabled`                                                                   | `Boolean!`              |
| `pmsProperties`                                                             | `StringPage`            |
| `saleInvoiceHeaders(propertyCode, cursor, pageSize, dateBegin, nOK)`        | `SaleInvoiceHeaderPage` |
| `saleInvoice(propertyCode, id)`                                             | `PmsSaleInvoiceType`    |
| `businessDays(propertyCode, dateBegin, pageSize, nOK)`                      | `BusinessDayPage`       |
| `receiptHeaders(propertyCode, businessDayDate, receiptDateBegin, pageSize)` | `ReceiptHeaderPage`     |
| `receipt(propertyCode, account, number)`                                    | `PmsReceiptType`        |

### PageInfo

| **Field**         | **Type**   |
| ----------------- | ---------- |
| `hasNextPage`     | `Boolean!` |
| `hasPreviousPage` | `Boolean!` |
| `startCursor`     | `String`   |
| `endCursor`       | `String`   |

### PaymentMethodType

| **Field**      | **Type**                 |
| -------------- | ------------------------ |
| `key`          | `Guid!`                  |
| `name`         | `String`                 |
| `externalCode` | `String`                 |
| `paymentType`  | `PaymentMethodEnumType!` |

### PmsBusinessDayType

| **Field** | **Type**    |
| --------- | ----------- |
| `date`    | `DateTime!` |

### PmsCompanyType

| **Field**          | **Type**      |
| ------------------ | ------------- |
| `name`             | `String!`     |
| `fiscalCode`       | `String!`     |
| `registrationCode` | `String!`     |
| `address`          | `AddressType` |

### PmsCustomerType

| **Field**                      | **Type**      |
| ------------------------------ | ------------- |
| `name`                         | `String!`     |
| `personalIdentificationNumber` | `String!`     |
| `address`                      | `AddressType` |

### PmsReceiptHeaderType

| **Field**         | **Type**    |
| ----------------- | ----------- |
| `account`         | `String!`   |
| `number`          | `Long!`     |
| `date`            | `DateTime!` |
| `businessDayDate` | `DateTime!` |
| `property`        | `String!`   |

### PmsReceiptType

| **Field**  | **Type**             |
| ---------- | -------------------- |
| `account`  | `String!`            |
| `number`   | `Long!`              |
| `date`     | `DateTime!`          |
| `property` | `String!`            |
| `products` | `[PMSProductType]`   |
| `payments` | `[PMSPaymentType]`   |
| `invoice`  | `PmsSaleInvoiceType` |

### PmsSaleInvoiceHeaderType

| **Field**          | **Type**          |
| ------------------ | ----------------- |
| `key`              | `Int!`            |
| `number`           | `String!`         |
| `date`             | `DateTime!`       |
| `dueDate`          | `DateTime`        |
| `documentType`     | `DocumentType!`   |
| `hasFiscalReceipt` | `Boolean!`        |
| `property`         | `String!`         |
| `comments`         | `String!`         |
| `delegate`         | `String!`         |
| `company`          | `PmsCompanyType`  |
| `customer`         | `PmsCustomerType` |

### PmsSaleInvoiceType

| **Field**          | **Type**           |
| ------------------ | ------------------ |
| `key`              | `Int!`             |
| `number`           | `String!`          |
| `date`             | `DateTime!`        |
| `dueDate`          | `DateTime`         |
| `documentType`     | `DocumentType!`    |
| `hasFiscalReceipt` | `Boolean!`         |
| `property`         | `String!`          |
| `comments`         | `String!`          |
| `delegate`         | `String!`          |
| `company`          | `PmsCompanyType`   |
| `customer`         | `PmsCustomerType`  |
| `products`         | `[PMSProductType]` |
| `payments`         | `[PMSPaymentType]` |

### ProductCategoryType

| **Field**                      | **Type**              |
| ------------------------------ | --------------------- |
| `key`                          | `Guid!`               |
| `name`                         | `String!`             |
| `id`                           | `Int!`                |
| `externalCode(inherit)`        | `String`              |
| `parentProductCategory(level)` | `ProductCategoryType` |

### ProductPhysicalStockType

| **Field**       | **Type**         |
| --------------- | ---------------- |
| `warehouse`     | `WarehouseType!` |
| `product`       | `ProductType!`   |
| `price`         | `Decimal!`       |
| `batch`         | `Int`            |
| `startQuantity` | `Decimal!`       |
| `endQuantity`   | `Decimal!`       |

### ProductQuery

| **Field**                                                         | **Type**            |
| ----------------------------------------------------------------- | ------------------- |
| `products(after, first, before, last, lastModifiedOnGreaterThen)` | `ProductConnection` |

### ProductType

| **Field**         | **Type**               |
| ----------------- | ---------------------- |
| `key`             | `Guid!`                |
| `name`            | `String`               |
| `code`            | `String`               |
| `barCode`         | `String`               |
| `externalCode`    | `String`               |
| `cNC`             | `String!`              |
| `productCategory` | `ProductCategoryType!` |
| `measureUnit`     | `MeasureUnitType!`     |
| `productType`     | `ProductEnumType!`     |
| `createdOn`       | `DateTime`             |
| `lastModifiedOn`  | `DateTime`             |

### ProductionNoteProductType

| **Field**                        | **Type**                |
| -------------------------------- | ----------------------- |
| `product`                        | `ProductType`           |
| `warehouse`                      | `WarehouseType`         |
| `quantity`                       | `Decimal!`              |
| `amount`                         | `Decimal!`              |
| `stockAccount(inherit)`          | `String`                |
| `expenseAccount(inherit)`        | `String`                |
| `accountingProductType(inherit)` | `AccountingProductType` |

### ProductionNoteType

| **Field**                                  | **Type**                      |
| ------------------------------------------ | ----------------------------- |
| `accountingNotes(withProduction, inherit)` | `[AccountingNoteType]`        |
| `key`                                      | `Int!`                        |
| `date`                                     | `DateTime!`                   |
| `status`                                   | `DocumentStatusType!`         |
| `warehouse`                                | `WarehouseType`               |
| `products`                                 | `[ProductionNoteProductType]` |

### PurchaseInvoiceProductType

| **Field**                        | **Type**                |
| -------------------------------- | ----------------------- |
| `warehousePurchaseId`            | `Int!`                  |
| `product`                        | `ProductType`           |
| `warehouse`                      | `WarehouseType`         |
| `quantity`                       | `Decimal!`              |
| `amount`                         | `Decimal!`              |
| `vatAmount`                      | `Decimal!`              |
| `vatRate`                        | `Decimal!`              |
| `salePrice`                      | `Decimal`               |
| `salePriceVatRate`               | `Decimal`               |
| `stockAccount(inherit)`          | `String`                |
| `accountingProductType(inherit)` | `AccountingProductType` |

### PurchaseInvoiceType

| **Field**                                  | **Type**                       |
| ------------------------------------------ | ------------------------------ |
| `accountingNotes(withProduction, inherit)` | `[AccountingNoteType]`         |
| `key`                                      | `Int!`                         |
| `documentType`                             | `DocumentType!`                |
| `status`                                   | `DocumentStatusType!`          |
| `number`                                   | `String!`                      |
| `date`                                     | `DateTime!`                    |
| `dueDate`                                  | `DateTime`                     |
| `createdOn`                                | `DateTime`                     |
| `vatCollect`                               | `Boolean!`                     |
| `discount`                                 | `Decimal!`                     |
| `isEUPurchase`                             | `Boolean!`                     |
| `isNonEUPurchase`                          | `Boolean!`                     |
| `company`                                  | `CompanyType`                  |
| `currency`                                 | `CurrencyType`                 |
| `products`                                 | `[PurchaseInvoiceProductType]` |
| `crossDocuments`                           | `[PurchaseInvoiceType]`        |

### PurchaseInvoiceTypeResult

| **Field**      | **Type**              |
| -------------- | --------------------- |
| `result`       | `PurchaseInvoiceType` |
| `errorCode`    | `Int`                 |
| `errorMessage` | `String`              |
| `errorData`    | `String`              |

### RawMaterialType

| **Field**                        | **Type**                |
| -------------------------------- | ----------------------- |
| `product`                        | `ProductType`           |
| `warehouse`                      | `WarehouseType`         |
| `revenueCenter`                  | `RevenueCenterType`     |
| `quantity`                       | `Decimal!`              |
| `costPrice`                      | `Decimal!`              |
| `stockAccount(inherit)`          | `String`                |
| `expenseAccount(inherit)`        | `String`                |
| `accountingProductType(inherit)` | `AccountingProductType` |

### ReceiptHeaderPage

| **Field**      | **Type**                 |
| -------------- | ------------------------ |
| `cursor`       | `Int!`                   |
| `pageSize`     | `Int!`                   |
| `totalRecords` | `Int!`                   |
| `items`        | `[PmsReceiptHeaderType]` |

### RevenueCenterType

| **Field**      | **Type** |
| -------------- | -------- |
| `key`          | `Guid!`  |
| `name`         | `String` |
| `externalCode` | `String` |

### SaleInvoiceHeaderPage

| **Field**      | **Type**                     |
| -------------- | ---------------------------- |
| `cursor`       | `Int!`                       |
| `pageSize`     | `Int!`                       |
| `totalRecords` | `Int!`                       |
| `items`        | `[PmsSaleInvoiceHeaderType]` |

### SaleInvoiceProductType

| **Field**                        | **Type**                |
| -------------------------------- | ----------------------- |
| `product`                        | `ProductType`           |
| `warehouse`                      | `WarehouseType`         |
| `quantity`                       | `Decimal!`              |
| `amount`                         | `Decimal!`              |
| `vatAmount`                      | `Decimal!`              |
| `vatRate`                        | `Decimal!`              |
| `discount`                       | `Decimal!`              |
| `costAmount`                     | `Decimal!`              |
| `saleAccount(inherit)`           | `String`                |
| `accountingProductType(inherit)` | `AccountingProductType` |

### SaleInvoiceType

| **Field**                                  | **Type**                      |
| ------------------------------------------ | ----------------------------- |
| `accountingNotes(withProduction, inherit)` | `[AccountingNoteType]`        |
| `key`                                      | `Int!`                        |
| `documentType`                             | `DocumentType!`               |
| `number`                                   | `String!`                     |
| `series`                                   | `String!`                     |
| `date`                                     | `DateTime!`                   |
| `dueDate`                                  | `DateTime`                    |
| `createdOn`                                | `DateTime`                    |
| `status`                                   | `DocumentStatusType!`         |
| `company`                                  | `CompanyType`                 |
| `customer`                                 | `CustomerType`                |
| `products`                                 | `[SaleInvoiceProductType]`    |
| `rawMaterials`                             | `[RawMaterialType]`           |
| `production`                               | `[ProductionNoteProductType]` |

### StringPage

| **Field**      | **Type**   |
| -------------- | ---------- |
| `cursor`       | `Int!`     |
| `pageSize`     | `Int!`     |
| `totalRecords` | `Int!`     |
| `items`        | `[String]` |

### TransferProductType

| **Field**                                   | **Type**                |
| ------------------------------------------- | ----------------------- |
| `product`                                   | `ProductType`           |
| `quantity`                                  | `Decimal!`              |
| `costAmount`                                | `Decimal!`              |
| `sourceAmount`                              | `Decimal!`              |
| `destinationAmount`                         | `Decimal!`              |
| `sourceStockAccount(inherit)`               | `String`                |
| `sourceAccountingProductType(inherit)`      | `AccountingProductType` |
| `destinationStockAccount(inherit)`          | `String`                |
| `destinationAccountingProductType(inherit)` | `AccountingProductType` |

### TransferType

| **Field**                                  | **Type**                      |
| ------------------------------------------ | ----------------------------- |
| `accountingNotes(withProduction, inherit)` | `[AccountingNoteType]`        |
| `key`                                      | `Int!`                        |
| `date`                                     | `DateTime!`                   |
| `createdOn`                                | `DateTime!`                   |
| `status`                                   | `DocumentStatusType!`         |
| `source`                                   | `WarehouseType`               |
| `destination`                              | `WarehouseType`               |
| `products`                                 | `[TransferProductType]`       |
| `production`                               | `[ProductionNoteProductType]` |

### WarehouseType

| **Field**       | **Type**             |
| --------------- | -------------------- |
| `key`           | `Guid!`              |
| `name`          | `String`             |
| `externalCode`  | `String`             |
| `isActive`      | `String`             |
| `id`            | `Int`                |
| `warehouseType` | `WarehouseEnumType!` |
| `location`      | `LocationType`       |

