---
title: "Get all fiscal machine commands"
method: POST
path: "/api/connector/v1/fiscalMachineCommands/getAll"
tags: ["Commands"]
---

# Get all fiscal machine commands

`POST /api/connector/v1/fiscalMachineCommands/getAll`

Returns fiscal machine commands. The commands can be filtered either by unique command identifiers or by `Device` unique identifiers and command states. Note this operation supports [Portfolio Access Tokens](https://mews-systems.gitbook.io/connector-api/concepts/multi-property/).

## Request body

- union
  - CommandsGetAllFilterByCommandIdParameters
    - `ClientToken` string, required — Token identifying the client application.
    - `AccessToken` string, required — Access token of the client application.
    - `Client` string, required — Name and version of the client application.
    - `Limitation` Limitation, required — Limitation on the quantity of data returned.
      - `Count` integer, required
      - `Cursor` string, uuid, nullable
    - `EnterpriseIds` string[], nullable — Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
  - CommandsGetAllFilterByStatesParameters
    - `ClientToken` string, required — Token identifying the client application.
    - `AccessToken` string, required — Access token of the client application.
    - `Client` string, required — Name and version of the client application.
    - `Limitation` Limitation, required — Limitation on the quantity of data returned.
      - `Count` integer, required
      - `Cursor` string, uuid, nullable
    - `EnterpriseIds` string[], nullable — Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.

## Response `200`

OK

- FiscalMachineCommandDataV20250623Result
  - `Commands` FiscalMachineCommandDataV20250623[], required — The filtered fiscal machine commands.
    - `Id` string, uuid, required — Unique identifier of the command.
    - `State` 'Pending' | 'Received' | 'Processing' | 'Processed' | 'Cancelled' | 'Error', required — Pending (Created in Mews, but not yet received by the client application.) Received (Received by the client application.) Processing (Being processed by the client application.) Processed (Successfully processed command.) Cancelled (A command whose execution has been canceled before (or during) processing.) Error (A command whose execution or processing was terminated by an error.)
    - `CreatedUtc` string, date-time, required — Creation date and time of the command.
    - `Creator` ProfileData — The profile data of the user who created or last updated the record.
      - `Discriminator` 'Personal' | 'Enterprise' | 'Platform' | 'Static' | 'Integration', required
      - `EnterpriseProfile` EnterpriseProfileData
        - `ProfileId` string, uuid, required — Unique identifier of the profile.
    - `FiscalMachineId` string, required — Identifier of the fiscal machine.
    - `ApiUrl` string, required — URL of the fiscal machine API.
    - `FiscalMachineData` string, required — Custom JSON data.
    - `TaxIdentifier` string, nullable — Tax identifier to be used for fiscalization.
    - `Device` Device, required
      - `Id` string, uuid, required — Unique identifier of the device.
      - `Type` 'Printer' | 'PaymentTerminal' | 'KeyCutter' | 'FiscalMachine' | 'PassportScanner', required — Type of the device. Printer ([Printer command data](https://mews-systems.gitbook.io/connector-api/operations/commands#printer-command-data)) PaymentTerminal ([Payment terminal command data](https://mews-systems.gitbook.io/connector-api/operations/commands#payment-terminal-command-data)) KeyCutter ([Key cutter command data](https://mews-systems.gitbook.io/connector-api/operations/commands#key-cutter-command-data)) FiscalMachine ([Fiscal machine command data](https://mews-systems.gitbook.io/connector-api/operations/commands#fiscal-machine-command-data)) PassportScanner ([Passport scanner command data](https://mews-systems.gitbook.io/connector-api/operations/commands#passport-scanner-command-data))
      - `Name` string, required — Name of the device.
      - `Identifier` string, nullable — Device identifier (for internal purposes).
    - `Bill` BillV20250623, required
      - `Id` string, uuid, required — Unique identifier of the bill.
      - `Name` string, nullable — Name of the bill.
      - `EnterpriseId` string, uuid, required — Unique identifier of the `Enterprise`.
      - `AccountId` string, uuid, required — Unique identifier of the account (`Customer` or `Company`) the bill is issued to.
      - `AccountType` 'Company' | 'Customer', required — A discriminator specifying the account type, e.g. `Customer` or `Company` Company Customer
      - `AssociatedAccountIds` string[], nullable, required — Unique identifiers of the `Customers` or `Companies` that are associated to the bill.
      - `CounterId` string, uuid, nullable — Unique identifier of the bill `Counter`.
      - `State` 'Open' | 'Closed', required — Whether the bill is `Open` or `Closed`.
      - `Type` 'Receipt' | 'Invoice', required — After a bill is closed, the Bill Type is set to `Receipt` or `Invoice`. `Receipt` indicates that the bill has been fully paid and the balance is zero. `Invoice` indicates that the bill has not yet been fully paid but an invoice has been issued. Prior to closing, Bill Type should not be used.
      - `Number` string, nullable — Number of the bill.
      - `VariableSymbol` string, nullable — Variable symbol of the bill.
      - `CreatedUtc` string, date-time, required — Date and time of the bill creation in UTC timezone in ISO 8601 format.
      - `UpdatedUtc` string, date-time, required — Date and time when the bill was last updated, in UTC timezone in ISO 8601 format.
      - `IssuedUtc` string, date-time, nullable — Date and time of the bill issuance in UTC timezone in ISO 8601 format.
      - `TaxedUtc` string, date-time, nullable — Taxation date of the bill in UTC timezone in ISO 8601 format.
      - `PaidUtc` string, date-time, nullable — Date when the bill was paid in UTC timezone in ISO 8601 format.
      - `DueUtc` string, date-time, nullable — Bill due date and time in UTC timezone in ISO 8601 format.
      - `LastReminderDateUtc` string, date-time, nullable — Date and time when an email reminder to pay an invoice was last sent, in UTC timezone in ISO 8601 format.
      - `PurchaseOrderNumber` string, nullable — Unique number of the purchase order from the buyer.
      - `Notes` string, nullable — Additional notes.
      - `Options` BillOptions — Options of the bill.
        - `DisplayCustomer` boolean — Display customer information on a bill.
        - `DisplayTaxation` boolean — Display taxation detail on a bill.
        - `TrackReceivable` boolean — Tracking of payments is enabled for bill, only applicable for `BillType` of `Invoice`.
        - `DisplayCid` boolean — Display CID number on bill, only applicable for `BillType` of `Invoice`.
        - `Rebated` boolean — Whether the bill is rebated (both fully or partially).
      - `Owner` BillAccountData
        - `Discriminator` 'BillCustomerData' | 'BillCompanyData', required — Determines type of value.
        - `BillCustomerData` BillCustomerData
          - `Id` string, required — ID of the `Customer` to whom the bill was assigned.
          - `Address` Address
            - `Line1` string, nullable
            - `Line2` string, nullable
            - `City` string, nullable
            - `PostalCode` string, nullable
            - `SubdivisionCode` string, nullable
            - `CountryCode` string, nullable
          - `LegalIdentifiers` object, nullable — The set of `LegalIdentifiers` for the customer.
          - `BillingCode` string, nullable — A unique code for Mews to list on invoices it sends to the customer.
          - `LastName` string, required — Last name of the customer.
          - `FirstName` string, nullable — First name of the customer.
          - `SecondLastName` string, nullable — Second last name of the customer.
          - `TitlePrefix` 'Mister' | 'Miss' | 'Misses' — Type of the title prefix of the customer. Note that the value should not be used as-is, but localized. For example, the value `Misses` should be displayed as `Mrs.` in English and `Fr.` in German. Mister (Mr.) Miss (Ms.) Misses (Mrs.)
          - `TaxIdentifier` string, nullable — Tax identifier of the customer.
        - `BillCompanyData` BillCompanyData
          - `Id` string, nullable, required — ID of the `Company`.
          - `Address` Address
            - `Line1` string, nullable
            - `Line2` string, nullable
            - `City` string, nullable
            - `PostalCode` string, nullable
            - `SubdivisionCode` string, nullable
            - `CountryCode` string, nullable
          - `LegalIdentifiers` object, nullable — The set of `LegalIdentifiers` for the company.
          - `BillingCode` string, nullable — A unique code for Mews to list on invoices it sends to the company.
          - `Name` string, required — Name of the company.
          - `FiscalIdentifier` string, nullable — Fiscal identifier of the company.
          - `AdditionalTaxIdentifier` string, nullable — Additional tax identifier of the company.
          - `DUNS` string, nullable — DUNS (Data Universal Numbering System) number of the company.
          - `Telephone` string, nullable — Company telephone number.
          - `TaxIdentifier` string, nullable — Tax identifier of the company.
          - `InvoicingEmail` string, nullable — Invoicing email of the company.
          - `Department` string, nullable — Department of the company.
      - `AssociatedAccountsData` BillAccountData[], nullable — Additional information about the associated account of the bill. Can be a `Customer` or `Company`. Persisted at the time of closing of the bill. Currently only one account can be associated with a bill, but this may be extended in future.
        - `Discriminator` 'BillCustomerData' | 'BillCompanyData', required — Determines type of value.
        - `BillCustomerData` BillCustomerData
          - `Id` string, required — ID of the `Customer` to whom the bill was assigned.
          - `Address` Address
            - `Line1` string, nullable
            - `Line2` string, nullable
            - `City` string, nullable
            - `PostalCode` string, nullable
            - `SubdivisionCode` string, nullable
            - `CountryCode` string, nullable
          - `LegalIdentifiers` object, nullable — The set of `LegalIdentifiers` for the customer.
          - `BillingCode` string, nullable — A unique code for Mews to list on invoices it sends to the customer.
          - `LastName` string, required — Last name of the customer.
          - `FirstName` string, nullable — First name of the customer.
          - `SecondLastName` string, nullable — Second last name of the customer.
          - `TitlePrefix` 'Mister' | 'Miss' | 'Misses' — Type of the title prefix of the customer. Note that the value should not be used as-is, but localized. For example, the value `Misses` should be displayed as `Mrs.` in English and `Fr.` in German. Mister (Mr.) Miss (Ms.) Misses (Mrs.)
          - `TaxIdentifier` string, nullable — Tax identifier of the customer.
        - `BillCompanyData` BillCompanyData
          - `Id` string, nullable, required — ID of the `Company`.
          - `Address` Address
            - `Line1` string, nullable
            - `Line2` string, nullable
            - `City` string, nullable
            - `PostalCode` string, nullable
            - `SubdivisionCode` string, nullable
            - `CountryCode` string, nullable
          - `LegalIdentifiers` object, nullable — The set of `LegalIdentifiers` for the company.
          - `BillingCode` string, nullable — A unique code for Mews to list on invoices it sends to the company.
          - `Name` string, required — Name of the company.
          - `FiscalIdentifier` string, nullable — Fiscal identifier of the company.
          - `AdditionalTaxIdentifier` string, nullable — Additional tax identifier of the company.
          - `DUNS` string, nullable — DUNS (Data Universal Numbering System) number of the company.
          - `Telephone` string, nullable — Company telephone number.
          - `TaxIdentifier` string, nullable — Tax identifier of the company.
          - `InvoicingEmail` string, nullable — Invoicing email of the company.
          - `Department` string, nullable — Department of the company.
      - `EnterpriseData` BillEnterpriseData — Additional information about the enterprise issuing the bill, including bank account details. Persisted at the time of closing of the bill.
        - `AdditionalTaxIdentifier` string, nullable — Enterprise additional tax identifier.
        - `CompanyName` string, nullable — Enterprise company name.
        - `BankAccount` string, nullable — Enterprise bank account.
        - `BankName` string, nullable — Enterprise bank name.
        - `Iban` string, nullable — Enterprise IBAN (International Bank Account Number).
        - `Bic` string, nullable — Enterprise BIC (Bank Identifier Code).
      - `CorrectionState` 'Bill' | 'CorrectiveBill', required — Bill (Regular bill.) CorrectiveBill (Corrective bill, i.e. the `CorrectionType` is either `Edit`, `Cancellation`, or `ReceivablePaymentsBalance`.)
      - `CorrectionType` 'Cancellation' | 'Edit' | 'CreditNote' | 'Reinstatement' | 'ReceivablePaymentsBalance' — Cancellation Edit CreditNote Reinstatement ReceivablePaymentsBalance
      - `CorrectedBillId` string, uuid, nullable — The ID of the bill that the corrective bill corrects. If the corrected bill was deleted, this field is `null`.
    - `CommandData` FiscalMachineAdditionalData
      - `Discriminator` 'ItalianFiscalMachineData' | 'ItalianFiscalMachinePayload' — ItalianFiscalMachineData ItalianFiscalMachinePayload
      - `ItalianFiscalMachineData` ItalianFiscalMachineDataV20250623
        - `IsRefund` boolean — Indicates if the transaction is a refund.
        - `RebatedReceiptNumber` string, nullable — Number of the rebated receipt.
        - `RebatedReceiptSequence` string, nullable — Sequence of the rebated receipt.
        - `RebatedReceiptDateTimeUtc` string, date-time, nullable — Date and time of the rebated receipt in UTC.
        - `PrinterSerialNumber` string, nullable — Serial number of the printer.
      - `ItalianFiscalMachinePayload` ItalianFiscalMachinePayloadV20250623
        - `Payload` string, required — Base64-encoded data of the file to be printed.
  - `Cursor` string, uuid, nullable — Unique identifier of the last returned command. This can be used in Limitation in a subsequent request to fetch the next batch of commands.

## Other responses

- `204` — Server has successfully fulfilled the request and there is no additional information to send back.
- `400` — Error caused by the client app, e.g. in case of malformed request or invalid identifier of a resource. In most cases, such an error signifies a bug in the client app (consumer of the API).
- `401` — Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
- `403` — Server error that should be reported to the end user of the client app. Happens for example when the server-side validation fails or when a business-logic check is violated.
- `408` — Error caused by heavy request that takes too long to process (typically tens of seconds). To get around this, request data in smaller batches. For more information, see [Request timeouts](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-timeouts)
- `429` — Error caused by too many requests sent in a given amount of time. Response contains `Retry-After` header indicating how long the user agent should wait before making a follow-up request. For more information, see [Request limits](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-limits).
- `500` — Unexpected error on the Mews side. This may be due to a software fault. If such a situation occurs, the error will be logged and the development team notified, however you can raise an issue through GitHub on our [documentation repository](https://github.com/MewsSystems/gitbook-connector-api).

---

[API](https://skmtc.net/mews/apis/connector-api.md) · [All operations](https://skmtc.net/mews/apis/connector-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mews/connector-api/versions/81933a8ff730/schema)
