Skip to content

Get all commands

POST
/api/connector/v1/commands/getAllActive

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.

GetAllActiveCommandsParameters
object
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
Example
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0"
}

OK

DeviceCommandResult
object
Commands
required

The active commands.

Array<object>
Command
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
User

Creator of the command.

object
FirstName

First name of the user.

string
nullable
LastName
required

Last name of the user.

string
>= 1 characters
ImageUrl

URL of the profile image.

string format: uri
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
Data
required
One of:
Payment terminal command data
object
PaymentTerminalId
required

Identifier of the payment terminal.

string
>= 1 characters
CustomerId
required
string format: uuid
AccountId
required

Unique identifier of the account.

string format: uuid
FullName
string
nullable
BillId

Identifier of the bill.

string format: uuid
nullable
PaymentId

Identifier of the Payment.

string format: uuid
nullable
PreauthorizationId

Identifier of the Preauthorization.

string format: uuid
nullable
Amount
required
Extended amount

Amount to be processed.

object
Currency
required

ISO-4217 code of the Currency.

string format: currency
>= 1 characters
NetValue
required

Net value without taxes.

number format: double
GrossValue
required

Gross value including all taxes.

number format: double
TaxValues
required

The tax values applied.

Array<object>
Tax value
object
Code

Code corresponding to tax type.

string
nullable
Value
required

Amount of tax applied.

number format: double
Breakdown
required
Tax breakdown

Information about individual tax amounts.

object
Items
required

Tax breakdown items per each tax rate applied.

Array<object>
Tax breakdown item
object
TaxRateCode

Tax rate code for the item. null for untaxed amounts.

string
nullable
NetValue
required

The net value that the tax is calculated from.

number format: double
TaxValue
required

The value of the tax.

number format: double
Value
number format: double
nullable
Net
number format: double
nullable
Tax
number format: double
nullable
TaxRate
number format: double
nullable
Fee
Extended amount

Payment fee to be processed.

object
Currency
required

ISO-4217 code of the Currency.

string format: currency
>= 1 characters
NetValue
required

Net value without taxes.

number format: double
GrossValue
required

Gross value including all taxes.

number format: double
TaxValues
required

The tax values applied.

Array<object>
Tax value
object
Code

Code corresponding to tax type.

string
nullable
Value
required

Amount of tax applied.

number format: double
Breakdown
required
Tax breakdown

Information about individual tax amounts.

object
Items
required

Tax breakdown items per each tax rate applied.

Array<object>
Tax breakdown item
object
TaxRateCode

Tax rate code for the item. null for untaxed amounts.

string
nullable
NetValue
required

The net value that the tax is calculated from.

number format: double
TaxValue
required

The value of the tax.

number format: double
Value
number format: double
nullable
Net
number format: double
nullable
Tax
number format: double
nullable
TaxRate
number format: double
nullable
PaymentTerminalData

Custom JSON data.

string
nullable
AccountData
required
Account data for payment terminal command

Account data for the payment terminal command.

object
Discriminator
required
Account type

Type of the account.

Company

Customer

string
Allowed values: Company Customer
Customer
Customer data for payment terminal command.

Customer data if the Discriminator is Customer.

object
FullName
required

Full name of the customer.

string
>= 1 characters
Company
Company data for payment terminal command.

Company data if the Discriminator is Company.

object
Name
required

Name of the company.

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": "Pending",
"CreatedUtc": "2015-09-02T19:25:44Z",
"Creator": {
"FirstName": "Sample",
"LastName": "User",
"ImageUrl": "..."
},
"Device": {
"Id": "63efb573-fc58-4065-b687-9bdd51568529",
"Name": "Test Printer",
"Type": "Printer"
},
"Data": {
"CopyCount": 1,
"FileType": "application/pdf",
"FileData": "...",
"PrinterName": "Printer",
"PrinterDriverName": "",
"PrinterPortName": ""
}
}
]
}

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