Skip to content

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.

One of:
Get all commands by unique identifiers

Filter commands by their unique identifiers.

object
CommandIds
required

Unique identifiers of the commands to filter by.

Array<string>
>= 1 items <= 1000 items
ClientToken
required

Token identifying the client application.

string
>= 1 characters
AccessToken
required

Access token of the client application.

string
>= 1 characters
Client
required

Name and version of the client application.

string
>= 1 characters
Limitation
required

Limitation on the quantity of data returned and optional Cursor for the starting point of data.

object
Count
required
integer format: int32
Cursor
string format: uuid
nullable
EnterpriseIds

Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.

Array<string>
nullable >= 1 items <= 1000 items
Example
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"DeviceIds": [
"d117866d-78de-4459-9077-42d7ea0120e3",
"7dafffff-a727-4917-a203-bd53995f21bf"
],
"States": [
"Processed",
"Processing"
],
"UpdatedUtc": {
"StartUtc": "2025-01-10T00:00:00Z",
"EndUtc": "2025-01-17T00:00:00Z"
},
"EnterpriseIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"4d0201db-36f5-428b-8d11-4f0a65e960cc"
],
"Limitation": {
"Count": 100
}
}

OK

FiscalMachineCommandDataV20250623Result
object
Commands
required

The filtered fiscal machine commands.

Array<object>
Fiscal machine command data (ver. 2025-06-23)
object
Id
required

Unique identifier of the command.

string format: uuid
State
required
Command state

State of the command.

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.)

string
Allowed values: Pending Received Processing Processed Cancelled Error
CreatedUtc
required

Creation date and time of the command.

string format: date-time
>= 1 characters
Creator
Profile data

Creator of the command.

object
Discriminator
required
Profile data discriminator
string
Allowed values: Personal Enterprise Platform Static Integration
EnterpriseProfile
Enterprise profile data

Enterprise profile data.

object
ProfileId
required

Unique identifier of the profile.

string format: uuid
FiscalMachineId
required

Identifier of the fiscal machine.

string
>= 1 characters
ApiUrl
required

URL of the fiscal machine API.

string
>= 1 characters
FiscalMachineData
required

Custom JSON data.

string
>= 1 characters
TaxIdentifier

Tax identifier to be used for fiscalization.

string
nullable
Device
required

Device that the command should be executed on.

object
Id
required

Unique identifier of the device.

string format: uuid
Type
required
Device type

Type of the device.

Printer (Printer command data)

PaymentTerminal (Payment terminal command data)

KeyCutter (Key cutter command data)

FiscalMachine (Fiscal machine command data)

PassportScanner (Passport scanner command data)

string
Allowed values: Printer PaymentTerminal KeyCutter FiscalMachine PassportScanner
Name
required

Name of the device.

string
>= 1 characters
Identifier

Device identifier (for internal purposes).

string
nullable
Bill
required
Bill (ver 2025-06-23)

The issued bill that should be fiscalized.

object
Id
required

Unique identifier of the bill.

string format: uuid
Name

Name of the bill.

string
nullable
EnterpriseId
required

Unique identifier of the Enterprise.

string format: uuid
AccountId
required

Unique identifier of the account (Customer or Company) the bill is issued to.

string format: uuid
AssociatedAccountIds
required

Unique identifiers of the Customers or Companies that are associated to the bill.

Array<string>
nullable
CounterId

Unique identifier of the bill Counter.

string format: uuid
nullable
State
required
Bill state

Whether the bill is Open or Closed.

string
Allowed values: Open Closed
Type
required
Bill type

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.

string
Allowed values: Receipt Invoice
Number

Number of the bill.

string
nullable
VariableSymbol

Variable symbol of the bill.

string
nullable
CreatedUtc
required

Date and time of the bill creation in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
UpdatedUtc
required

Date and time when the bill was last updated, in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
IssuedUtc

Date and time of the bill issuance in UTC timezone in ISO 8601 format.

string format: date-time
nullable
TaxedUtc

Taxation date of the bill in UTC timezone in ISO 8601 format.

string format: date-time
nullable
PaidUtc

Date when the bill was paid in UTC timezone in ISO 8601 format.

string format: date-time
nullable
DueUtc

Bill due date and time in UTC timezone in ISO 8601 format.

string format: date-time
nullable
LastReminderDateUtc

Date and time when an email reminder to pay an invoice was last sent, in UTC timezone in ISO 8601 format.

string format: date-time
nullable
PurchaseOrderNumber

Unique number of the purchase order from the buyer.

string
nullable
Notes

Additional notes.

string
nullable
Options
Bill options

Options of the bill.

object
DisplayCustomer

Display customer information on a bill.

boolean
DisplayTaxation

Display taxation detail on a bill.

boolean
TrackReceivable

Tracking of payments is enabled for bill, only applicable for BillType of Invoice.

boolean
DisplayCid

Display CID number on bill, only applicable for BillType of Invoice.

boolean
Rebated

Whether the bill is rebated (both fully or partially).

boolean
Owner
Bill owner data

Additional information about owner of the bill. Can be a Customer or Company. Persisted at the time of closing of the bill.

object
Discriminator
Any of:
Bill associated account data discriminator
string
Allowed values: BillCustomerData BillCompanyData
BillCustomerData
Bill customer data

Associated account bill data for customer.

object
Id
required

ID of the Customer to whom the bill was assigned.

string
>= 1 characters
Address

Address of the customer.

object
Line1
string
nullable
Line2
string
nullable
City
string
nullable
PostalCode
string
nullable
SubdivisionCode
string
nullable
CountryCode
string
nullable
LegalIdentifiers

The set of LegalIdentifiers for the customer.

object
key
additional properties
string
BillingCode

A unique code for Mews to list on invoices it sends to the customer.

string
nullable
LastName
required

Last name of the customer.

string
>= 1 characters
FirstName

First name of the customer.

string
nullable
SecondLastName

Second last name of the customer.

string
nullable
TitlePrefix

Title prefix of the customer.

Mister (Mr.)

Miss (Ms.)

Misses (Mrs.)

string
Allowed values: Mister Miss Misses
TaxIdentifier

Tax identifier of the customer.

string
nullable
BillCompanyData
Bill company data

Associated account bill data for company.

object
Id
required

ID of the Company.

string
nullable
Address

Address of the company.

object
Line1
string
nullable
Line2
string
nullable
City
string
nullable
PostalCode
string
nullable
SubdivisionCode
string
nullable
CountryCode
string
nullable
LegalIdentifiers

The set of LegalIdentifiers for the company.

object
key
additional properties
string
BillingCode

A unique code for Mews to list on invoices it sends to the company.

string
nullable
Name
required

Name of the company.

string
>= 1 characters
FiscalIdentifier

Fiscal identifier of the company.

string
nullable
AdditionalTaxIdentifier

Additional tax identifier of the company.

string
nullable
DUNS

DUNS (Data Universal Numbering System) number of the company.

string
nullable
Telephone

Company telephone number.

string
nullable
TaxIdentifier

Tax identifier of the company.

string
nullable
InvoicingEmail

Invoicing email of the company.

string
nullable
Department

Department of the company.

string
nullable
AssociatedAccountsData

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.

Array<object>
nullable
Associated account bill data
object
Discriminator
Any of:
Bill associated account data discriminator
string
Allowed values: BillCustomerData BillCompanyData
BillCustomerData
Bill customer data

Associated account bill data for customer.

object
Id
required

ID of the Customer to whom the bill was assigned.

string
>= 1 characters
Address

Address of the customer.

object
Line1
string
nullable
Line2
string
nullable
City
string
nullable
PostalCode
string
nullable
SubdivisionCode
string
nullable
CountryCode
string
nullable
LegalIdentifiers

The set of LegalIdentifiers for the customer.

object
key
additional properties
string
BillingCode

A unique code for Mews to list on invoices it sends to the customer.

string
nullable
LastName
required

Last name of the customer.

string
>= 1 characters
FirstName

First name of the customer.

string
nullable
SecondLastName

Second last name of the customer.

string
nullable
TitlePrefix

Title prefix of the customer.

Mister (Mr.)

Miss (Ms.)

Misses (Mrs.)

string
Allowed values: Mister Miss Misses
TaxIdentifier

Tax identifier of the customer.

string
nullable
BillCompanyData
Bill company data

Associated account bill data for company.

object
Id
required

ID of the Company.

string
nullable
Address

Address of the company.

object
Line1
string
nullable
Line2
string
nullable
City
string
nullable
PostalCode
string
nullable
SubdivisionCode
string
nullable
CountryCode
string
nullable
LegalIdentifiers

The set of LegalIdentifiers for the company.

object
key
additional properties
string
BillingCode

A unique code for Mews to list on invoices it sends to the company.

string
nullable
Name
required

Name of the company.

string
>= 1 characters
FiscalIdentifier

Fiscal identifier of the company.

string
nullable
AdditionalTaxIdentifier

Additional tax identifier of the company.

string
nullable
DUNS

DUNS (Data Universal Numbering System) number of the company.

string
nullable
Telephone

Company telephone number.

string
nullable
TaxIdentifier

Tax identifier of the company.

string
nullable
InvoicingEmail

Invoicing email of the company.

string
nullable
Department

Department of the company.

string
nullable
EnterpriseData
Bill enterprise data

Additional information about the enterprise issuing the bill, including bank account details. Persisted at the time of closing of the bill.

object
AdditionalTaxIdentifier

Enterprise additional tax identifier.

string
nullable
CompanyName

Enterprise company name.

string
nullable
BankAccount

Enterprise bank account.

string
nullable
BankName

Enterprise bank name.

string
nullable
Iban

Enterprise IBAN (International Bank Account Number).

string
nullable
Bic

Enterprise BIC (Bank Identifier Code).

string
nullable
CorrectionState
required
Bill correction state

Whether the bill is a regular bill or a corrective bill.

Bill (Regular bill.)

CorrectiveBill (Corrective bill, i.e. the CorrectionType is either Edit, Cancellation, or ReceivablePaymentsBalance.)

string
Allowed values: Bill CorrectiveBill
CorrectionType

Type of correction.

Cancellation

Edit

CreditNote

Reinstatement

ReceivablePaymentsBalance

string
Allowed values: Cancellation Edit CreditNote Reinstatement ReceivablePaymentsBalance
CorrectedBillId

The ID of the bill that the corrective bill corrects. If the corrected bill was deleted, this field is null.

string format: uuid
nullable
CommandData

Additional data of the fiscal machine.

object
Discriminator

Type of additional data for Italian fiscal machine.

ItalianFiscalMachineData

ItalianFiscalMachinePayload

string
Allowed values: ItalianFiscalMachineData ItalianFiscalMachinePayload
ItalianFiscalMachineData
Italian fiscal machine data

Fiscal machine data for Italian fiscal machine.

object
IsRefund

Indicates if the transaction is a refund.

boolean
RebatedReceiptNumber

Number of the rebated receipt.

string
nullable
RebatedReceiptSequence

Sequence of the rebated receipt.

string
nullable
RebatedReceiptDateTimeUtc

Date and time of the rebated receipt in UTC.

string format: date-time
nullable
PrinterSerialNumber

Serial number of the printer.

string
nullable
ItalianFiscalMachinePayload
Italian fiscal machine payload.

Fiscal machine payload for Italian fiscal machine.

object
Payload
required

Base64-encoded data of the file to be printed.

string
>= 1 characters
Cursor

Unique identifier of the last returned command. This can be used in Limitation in a subsequent request to fetch the next batch of commands.

string format: uuid
nullable
Example
{
"Commands": [
{
"Id": "aa20961f-6d9e-4b35-ad25-071213530aec",
"State": "Processing",
"CreatedUtc": "2025-01-15T14:30:00Z",
"Creator": {
"Discriminator": "Enterprise",
"EnterpriseProfile": {
"ProfileId": "3cd637ef-4728-47f9-8fb1-afb900c9cdcf"
}
},
"FiscalMachineId": "FM-001",
"ApiUrl": "https://fiscal-machine.example.com/api",
"FiscalMachineData": "{\"printerPort\": \"COM1\", \"baudRate\": 9600}",
"TaxIdentifier": "12345678901",
"Device": {
"Id": "d117866d-78de-4459-9077-42d7ea0120e3",
"Type": "FiscalMachine",
"Name": "Fiscal Printer FP-001",
"Identifier": null
},
"Bill": {
"Id": "ea087d64-3901-4eee-b0b7-9fce4c58a005",
"Name": "Hotel Invoice #1001",
"EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"AccountId": "fadd5bb6-b428-45d5-94f8-fd0d89fece6d",
"AssociatedAccountIds": null,
"CounterId": null,
"State": "Closed",
"Type": "Invoice",
"Number": "1001",
"VariableSymbol": "VS001",
"CreatedUtc": "2025-01-15T10:00:00Z",
"UpdatedUtc": "2025-01-15T14:25:00Z",
"IssuedUtc": "2025-01-15T14:25:00Z",
"TaxedUtc": "2025-01-15T14:25:00Z",
"PaidUtc": null,
"DueUtc": "2025-01-29T23:59:59Z",
"LastReminderDateUtc": null,
"PurchaseOrderNumber": "PO-2025-001",
"Notes": "Hotel accommodation services",
"Options": null,
"Owner": null,
"AssociatedAccountsData": null,
"EnterpriseData": null,
"CorrectionState": "Bill",
"CorrectionType": null,
"CorrectedBillId": null
},
"CommandData": {
"Discriminator": "ItalianFiscalMachineData",
"ItalianFiscalMachineData": {
"IsRefund": false,
"RebatedReceiptNumber": null,
"RebatedReceiptSequence": null,
"RebatedReceiptDateTimeUtc": null,
"PrinterSerialNumber": "FP001-123456"
},
"ItalianFiscalMachinePayload": null
}
},
{
"Id": "f2e8c456-1234-4567-89ab-cdef01234567",
"State": "Processed",
"CreatedUtc": "2025-01-15T13:15:00Z",
"Creator": {
"Discriminator": "Enterprise",
"EnterpriseProfile": {
"ProfileId": "3cd637ef-4728-47f9-8fb1-afb900c9cdcf"
}
},
"FiscalMachineId": "FM-002",
"ApiUrl": "https://fiscal-machine-2.example.com/api",
"FiscalMachineData": "{\"printerPort\": \"USB001\", \"certificatePath\": \"/etc/fiscal/cert.p12\"}",
"TaxIdentifier": "98765432109",
"Device": {
"Id": "7dafffff-a727-4917-a203-bd53995f21bf",
"Type": "FiscalMachine",
"Name": "Fiscal Printer FP-002",
"Identifier": null
},
"Bill": {
"Id": "12345678-1234-1234-1234-123456789012",
"Name": "Restaurant Bill #2001",
"EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"AccountId": "fadd5bb6-b428-45d5-94f8-fd0d89fece6d",
"AssociatedAccountIds": null,
"CounterId": null,
"State": "Closed",
"Type": "Receipt",
"Number": "2001",
"VariableSymbol": "VS002",
"CreatedUtc": "2025-01-15T12:30:00Z",
"UpdatedUtc": "2025-01-15T13:10:00Z",
"IssuedUtc": "2025-01-15T13:10:00Z",
"TaxedUtc": "2025-01-15T13:10:00Z",
"PaidUtc": "2025-01-15T13:10:00Z",
"DueUtc": null,
"LastReminderDateUtc": null,
"PurchaseOrderNumber": null,
"Notes": "Restaurant services - Table 15",
"Options": null,
"Owner": null,
"AssociatedAccountsData": null,
"EnterpriseData": null,
"CorrectionState": "Bill",
"CorrectionType": null,
"CorrectedBillId": null
},
"CommandData": {
"Discriminator": "ItalianFiscalMachinePayload",
"ItalianFiscalMachineData": null,
"ItalianFiscalMachinePayload": {
"Payload": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGZ2cF9kb2M+CiAgPGhlYWRlcj4KICAgIDx0aW1lc3RhbXA+MjAyNS0wMS0xNVQxMzoxMDowMFo8L3RpbWVzdGFtcD4KICA8L2hlYWRlcj4KICA8Ym9keT4KICAgIDxyZWNlaXB0X2RhdGE+U2FtcGxlIGZpc2NhbCByZWNlaXB0IGRhdGE8L3JlY2VpcHRfZGF0YT4KICA8L2JvZHk+CjwvZnZwX2RvYz4="
}
}
}
],
"Cursor": "f2e8c456-1234-4567-89ab-cdef01234567"
}

Server has successfully fulfilled the request and there is no additional information to send back.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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).

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable

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.

ConnectorApiExceptionResult
object
Message
string
nullable
RequestId
string
nullable
Details
nullable