Commands
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
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| array of Command | required | The active commands. |
Command
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the command. |
| string Command state | required | State of the command. |
| string | required | Creation date and time of the command. |
| optional | Creator of the command. | |
| required | Device that the command should be executed on. | |
| object | required | Structure of the object depends on Device type. |
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
Property | Type | Contract | Description |
---|---|---|---|
| string | optional | First name of the user. |
| string | required | Last name of the user. |
| string | optional | URL of the profile image. |
Command data
Printer command data
Property | Type | Contract | Description |
---|---|---|---|
| number | required | Number of copies to be printed. |
| string | required | MIME type of the file to be printed (e.g. |
| string | required | Base64-encoded data of the file to be printed. |
| string | required | Name of the printer. |
| string | required | Name of the printer driver. |
| string | required | Name of the printer port. |
Payment terminal command data
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Identifier of the payment terminal. |
| string | required | Identifier of the Customer. |
| string | optional | Identifier of the Bill. |
| required | Amount to be processed. | |
| string | optional | Custom JSON data. |
Passport scanner command data
Property | Type | Contract | Description |
---|---|---|---|
| string | optional | Identifier of the passport scanner. |
| string | optional | Unique identifier of the Customer who should be processed. |
| string | optional | Unique identifier of the reservation whose companions should be processed. |
Fiscal machine command data
Property | Type | Contract | Description |
---|---|---|---|
| string | optional | Identifier of the fiscal machine. |
| string | optional | Custom JSON data. |
| string | optional | URL of the fiscal machine API. |
| required | The issued bill that should be fiscalized. | |
| string | optional | Tax identifier to be used for fiscalization. |
Key cutter command data
Property | Type | Contract | Description |
---|---|---|---|
| string | optional | Identifier of the key cutter. |
| string | optional | Custom JSON data. |
| string | optional | URL of the key cutter server API. |
| string | optional | Unique identifier of the reservation. |
| string | optional | Confirmation number of the reservation in Mews. |
| string | required | Reservation start. |
| string | required | Reservation end. |
| string | optional | First name of the reservation owner. |
| string | required | Last name of the reservation owner. |
| string | optional | Telephone of the reservation owner. |
| string | optional | Email of the reservation owner. |
| number | required | Count of keys to cut. |
| array of string | required | Identifiers of locks/rooms the key should open. |
Get all commands by ids
Returns all commands by their identifiers.
Request
[PlatformAddress]/api/connector/v1/commands/getAllByIds
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| array of string | required, max 1000 items | Unique identifiers of Commands to be returned. |
Response
Same structure as in Get all commands operation.
Add printer command
Adds a new printer command representing printing of the specified document on a printer. Note this operation supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/commands/addPrinter
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| string | optional | Unique identifier of the Enterprise. Required when using a Portfolio Access Token, ignored otherwise. |
| string | required | Uniqque identifier of the |
| int | required | Count of copies to be printed. |
| string | required | Base64 encoded data of PDF document to print. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the created Command. |
Add key cutter command
Adds a new key cutter command representing cutting of a key for the specified reservation. Note this operation supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/commands/addKeyCutter
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| string | optional | Unique identifier of the Enterprise. Required when using a Portfolio Access Token, ignored otherwise. |
| string | required | Unique identifier of the |
| string | required | Unique identifier of the reservation to encode the key for. |
| int | required | Count of keys to encode. |
Response
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the created Command. |
Add payment command
Restricted!This operation is part of a custom workflow for Mews partners such as POS systems to access Mews Payment Terminals. See Mews Payment Terminals.
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
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token authenticating the client application. |
| string | required | Token authenticating access to the enterprise integration. |
| string | required | Name and version of the client application. |
| string Payment type | required | The type of payment, e.g. "preauthorization". |
| string | required | Unique identifier of the payment terminal. |
| string | required | Unique identifier of the Customer. |
| string | optional | Unique identifier of the Bill. |
| string | optional | Unique identifier of the Reservation. |
| required | Amount of the payment. |
Payment type
Payment
Preauthorization
...
Response
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Unique identifier of the created Command. |
Update command
Updates state of a command.
Request
[PlatformAddress]/api/connector/v1/commands/update
Property | Type | Contract | Description |
---|---|---|---|
| string | required | Token identifying the client application. |
| string | required | Access token of the client application. |
| string | required | Name and version of the client application. |
| string | required | Identifier of the Command to be updated. |
| string Command state | required | New state of the command. |
| number | optional | Progress of the command processing. Only used if the |
| string | optional | Notes about command execution. Only used if the |
Response
Last updated