Commands
Get all commands by ids
Returns all commands by their identifiers.
Request
[PlatformAddress]/api/connector/v1/commands/getAllByIds
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.
CommandIds
array of string
required, max 1000 items
Limitation
optional
Limitation on the quantity of data returned.
Response
Commands
required
The active commands.
Cursor
string
optional
Unique identifier of the last returned command. This can be used in Limitation in a subsequent request to fetch the next batch of commands.
Command
Id
string
required
Unique identifier of the command.
State
required
State of the command.
CreatedUtc
string
required
Creation date and time of the command.
Creator
optional
Creator of the command.
Device
required
Device that the command should be executed on.
Data
object
required
Command state
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.
User
FirstName
string
optional
First name of the user.
LastName
string
required
Last name of the user.
ImageUrl
string
optional
URL of the profile image.
Payment terminal command data
PaymentTerminalId
string
required
Identifier of the payment terminal.
AccountId
string
required
Unique identifier of the account.
BillId
string
optional
Identifier of the bill.
PaymentId
string
optional
Identifier of the Payment
.
PreauthorizationId
string
optional
Identifier of the Preauthorization
.
Amount
required
Amount to be processed.
Fee
optional
Payment fee to be processed.
PaymentTerminalData
string
optional
Custom JSON data.
AccountData
required
Account data for the payment terminal command.
CustomerId
string
required
Deprecated! Use AccountId
instead.
FullName
string
optional
Deprecated! Use AccountData.Customer.FullName
, if AccountData.Discriminator
is Customer
.
Account data for payment terminal command
Discriminator
required
Type of the account.
Customer
optional
Customer data if the Discriminator
is Customer
.
Company
optional
Company data if the Discriminator
is Company
.
Customer data for payment terminal command.
FullName
string
required
Full name of the customer.
Company data for payment terminal command.
Name
string
required
Name of the company.
Printer command data
CopyCount
integer
required
Number of copies to be printed.
FileType
string
required
MIME type of the file to be printed (e.g. application/pdf
).
FileData
string
required
Base64-encoded data of the file to be printed.
PrinterName
string
required
Name of the printer.
PrinterDriverName
string
required
Name of the printer driver.
PrinterPortName
string
required
Name of the printer port.
Key cutter command data
KeyCutterId
string
optional
Identifier of the key cutter.
ApiUrl
string
optional
URL of the key cutter server API.
KeyCutterData
string
optional
Custom JSON data.
KeyCount
integer
required
Count of keys to cut.
LockIds
array of string
required
Identifiers of locks/rooms the key should open.
StartUtc
string
required
Reservation start.
EndUtc
string
required
Reservation end.
FirstName
string
optional
First name of the reservation owner.
LastName
string
required
Last name of the reservation owner.
NormalizedFirstName
string
optional
Normalized first name of the customer without special characters.
NormalizedLastName
string
optional
Normalized last name of the customer without special characters.
Telephone
string
optional
Telephone of the reservation owner.
Email
string
optional
Email of the reservation owner.
ReservationId
string
optional
Unique identifier of the reservation.
ReservationNumber
string
optional
Confirmation number of the reservation in Mews.
Fiscal machine command data
FiscalMachineId
string
optional
Identifier of the fiscal machine.
ApiUrl
string
optional
URL of the fiscal machine API.
FiscalMachineData
string
optional
Custom JSON data.
Bill
required
The issued bill that should be fiscalized.
TaxIdentifier
string
optional
Tax identifier to be used for fiscalization.
BillFiscalMachineData
optional
Fiscal machine data; currently only ItalianFiscalMachineData
is supported.
PayloadData
optional
Fiscal machine payload data; currently only ItalianFiscalMachinePayloadData
is supported.
Fiscal machine data
Discriminator
required
Discriminator of the object.
Value
required
Structure of the object depends on Discriminator
(currently only ItalianFiscalMachineData
is supported).
Fiscal machine data discriminator
ItalianFiscalMachineData
Fiscal machine data for Italian fiscal machine
IsRefund
boolean
required
Indicates if the transaction is a refund.
RebatedReceiptNumber
string
optional
Number of the rebated receipt.
RebatedReceiptSequence
string
optional
Sequence of the rebated receipt.
RebatedReceiptDateTimeUtc
string
optional
Date and time of the rebated receipt in UTC.
PrinterSerialNumber
string
optional
Serial number of the printer.
Fiscal machine payload
Discriminator
required
Discriminator of the object.
Value
string
required
Base64-encoded data of the file to be printed.
Fiscal machine payload discriminator
ItalianFiscalMachine
Passport scanner command data
PassportScannerId
string
optional
Identifier of the passport scanner.
CustomerId
string
optional
Unique identifier of the Customer
who should be processed.
ReservationId
string
optional
Unique identifier of the reservation whose companions should be processed.
Get all commands
Returns all commands the are still active from the client application point of view. That means commands that are in either Pending
or Received
state.
Request
[PlatformAddress]/api/connector/v1/commands/getAllActive
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.
Response
Commands
required
The active commands.
Cursor
string
optional
Unique identifier of the last returned command. This can be used in Limitation in a subsequent request to fetch the next batch of commands.
Add printer command
Request
[PlatformAddress]/api/connector/v1/commands/addPrinter
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.
EnterpriseId
string
optional
PrinterId
string
required
Unique identifier of the Printer
Device
where to print the document.
Data
string
required
Base64 encoded data of PDF document to print.
CopyCount
integer
required
Count of copies to be printed.
Response
CommandId
string
required
Unique identifier of the created Command
.
Add payment command
Restricted!
Adds a new Mews Payment Terminal command for taking a customer payment. The operation instructs a specified terminal device to take a payment from a specified customer for a specified amount.
Request
[PlatformAddress]/api/connector/v1/commands/addPaymentTerminal
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.
TerminalId
string
required
Unique identifier of the payment terminal.
CustomerId
string
required
Unique identifier of the Customer
.
Type
required
The type of payment, e.g. Preauthorization
.
Amount
required
Amount of the payment.
BillId
string
optional
Unique identifier of the Bill
.
PaymentRequestId
string
optional
Unique identifier of the PaymentRequest
.
ReservationId
string
optional
Unique identifier of the Reservation
.
Payment type
Payment
Preauthorization
Response
CommandId
string
required
Unique identifier of the created Command
.
Add key cutter command
Request
[PlatformAddress]/api/connector/v1/commands/addKeyCutter
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.
EnterpriseId
string
optional
KeyCutterId
string
required
ReservationId
string
required
Unique identifier of the reservation to encode the key for.
KeyCount
integer
required
Count of keys to encode.
Response
CommandId
string
required
Unique identifier of the created Command
.
Update command
Updates state of a command.
Request
[PlatformAddress]/api/connector/v1/commands/update
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.
CommandId
string
required
Identifier of the Command
to be updated.
State
required
New state of the command.
Progress
number
optional
Progress of the command processing. Only used if the State
is Processing
, otherwise ignored.
Notes
string
optional
Notes about command execution. Only used if the State
is Processed
, Cancelled
or Error
, otherwise ignored.
Response
Last updated
Was this helpful?