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.
Request Body
Section titled “Request Body ”object
Token identifying the client application.
Access token of the client application.
Name and version of the client application.
Example
{ "ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D", "AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D", "Client": "Sample Client 1.0.0"}
Responses
Section titled “ Responses ”OK
object
The active commands.
object
Unique identifier of the command.
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.)
Creation date and time of the command.
Creator of the command.
object
First name of the user.
Last name of the user.
URL of the profile image.
Device that the command should be executed on.
object
Unique identifier of the device.
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)
Name of the device.
Device identifier (for internal purposes).
object
Identifier of the payment terminal.
Unique identifier of the account.
Identifier of the bill.
Identifier of the Payment
.
Identifier of the Preauthorization
.
Amount to be processed.
object
ISO-4217 code of the Currency.
Net value without taxes.
Gross value including all taxes.
The tax values applied.
object
Code corresponding to tax type.
Amount of tax applied.
Information about individual tax amounts.
object
Tax breakdown items per each tax rate applied.
object
Tax rate code for the item. null
for untaxed amounts.
The net value that the tax is calculated from.
The value of the tax.
Payment fee to be processed.
object
ISO-4217 code of the Currency.
Net value without taxes.
Gross value including all taxes.
The tax values applied.
object
Code corresponding to tax type.
Amount of tax applied.
Information about individual tax amounts.
object
Tax breakdown items per each tax rate applied.
object
Tax rate code for the item. null
for untaxed amounts.
The net value that the tax is calculated from.
The value of the tax.
Custom JSON data.
Account data for the payment terminal command.
object
Type of the account.
Company
Customer
Customer data if the Discriminator
is Customer
.
object
Full name of the customer.
Company data if the Discriminator
is Company
.
object
Name of the company.
object
Number of copies to be printed.
MIME type of the file to be printed (e.g. application/pdf
).
Base64-encoded data of the file to be printed.
Name of the printer.
Name of the printer driver.
Name of the printer port.
object
Identifier of the key cutter.
URL of the key cutter server API.
Custom JSON data.
Count of keys to cut.
Identifiers of locks/rooms the key should open.
Reservation start.
Reservation end.
First name of the reservation owner.
Last name of the reservation owner.
Normalized first name of the customer without special characters.
Normalized last name of the customer without special characters.
Telephone of the reservation owner.
Email of the reservation owner.
Unique identifier of the reservation.
Confirmation number of the reservation in Mews.
object
Identifier of the fiscal machine.
URL of the fiscal machine API.
Custom JSON data.
The issued bill that should be fiscalized.
object
Unique identifier of the bill.
Name of the bill.
Unique identifier of the Enterprise
.
Unique identifier of the account (Customer
or Company
) the bill is issued to.
Unique identifier of the Customer
the bill is issued to.
Unique identifier of the Company
specified in CompanyDetails
or the Company
the bill is issued to.
Unique identifiers of the Customers
or Companies
that are associated to the bill.
Unique identifier of the bill Counter
.
Whether the bill is Open
or Closed
.
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 of the bill.
Variable symbol of the bill.
Date and time of the bill creation in UTC timezone in ISO 8601 format.
Date and time of the bill issuance in UTC timezone in ISO 8601 format.
Taxation date of the bill in UTC timezone in ISO 8601 format.
Date when the bill was paid in UTC timezone in ISO 8601 format.
Bill due date and time in UTC timezone in ISO 8601 format.
Date and time when an email reminder to pay an invoice was last sent, in UTC timezone in ISO 8601 format.
Date and time when the bill was last updated, in UTC timezone in ISO 8601 format.
Unique number of the purchase order from the buyer.
Additional notes.
Options of the bill.
object
Display customer information on a bill.
Display taxation detail on a bill.
Tracking of payments is enabled for bill, only applicable for BillType
of Invoice
.
Display CID number on bill, only applicable for BillType
of Invoice
.
Whether the bill is rebated (both fully or partially).
object
object
ISO-4217 code of the Currency.
Net value without taxes.
Gross value including all taxes.
The tax values applied.
object
Code corresponding to tax type.
Amount of tax applied.
Information about individual tax amounts.
object
Tax breakdown items per each tax rate applied.
object
Tax rate code for the item. null
for untaxed amounts.
The net value that the tax is calculated from.
The value of the tax.
Code of tax exemption reason. Restricted! This property is currently intended for Mews’ internal usage and may be subject to change.
object
object
ISO-4217 code of the Currency.
Net value without taxes.
Gross value including all taxes.
The tax values applied.
object
Code corresponding to tax type.
Amount of tax applied.
Information about individual tax amounts.
object
Tax breakdown items per each tax rate applied.
object
Tax rate code for the item. null
for untaxed amounts.
The net value that the tax is calculated from.
The value of the tax.
Code of tax exemption reason. Restricted! This property is currently intended for Mews’ internal usage and may be subject to change.
The order items (consumed items such as nights or products) on the bill.
object
Unique identifier of the item.
Unique identifier of the account (for example Customer) the item belongs to.
Unique identifier of the order (or Reservation which is a special type of order) the item belongs to.
Unique identifier of the Bill the item is assigned to.
Unique identifier of the Accounting category the item belongs to.
Unit count of item, i.e. the number of sub-items or units, if applicable.
object
ISO-4217 code of the Currency.
Net value without taxes.
Gross value including all taxes.
The tax values applied.
object
Code corresponding to tax type.
Amount of tax applied.
Information about individual tax amounts.
object
Tax breakdown items per each tax rate applied.
object
Tax rate code for the item. null
for untaxed amounts.
The net value that the tax is calculated from.
The value of the tax.
object
ISO-4217 code of the Currency.
Net value without taxes.
Gross value including all taxes.
The tax values applied.
object
Code corresponding to tax type.
Amount of tax applied.
Information about individual tax amounts.
object
Tax breakdown items per each tax rate applied.
object
Tax rate code for the item. null
for untaxed amounts.
The net value that the tax is calculated from.
The value of the tax.
object
ISO-4217 code of the Currency.
Net value without taxes.
Gross value including all taxes.
The tax values applied.
object
Code corresponding to tax type.
Amount of tax applied.
Information about individual tax amounts.
object
Tax breakdown items per each tax rate applied.
object
Tax rate code for the item. null
for untaxed amounts.
The net value that the tax is calculated from.
The value of the tax.
Revenue type of the item.
Date and time of the item consumption in UTC timezone in ISO 8601 format.
Date and time of the item bill closure in UTC timezone in ISO 8601 format.
Accounting state of the item.
Additional data specific to particular order item.
object
object
object
The payment items (such as cash, credit card payments or invoices) on the bill.
Payment item
object
Unique identifier of the item.
Unique identifier of the account (for example Customer) the item belongs to.
Unique identifier of the Bill the item is assigned to.
Unique identifier of the Accounting category the item belongs to.
object
ISO-4217 code of the Currency.
Net value without taxes.
Gross value including all taxes.
The tax values applied.
object
Code corresponding to tax type.
Amount of tax applied.
Information about individual tax amounts.
object
Tax breakdown items per each tax rate applied.
object
Tax rate code for the item. null
for untaxed amounts.
The net value that the tax is calculated from.
The value of the tax.
object
ISO-4217 code of the Currency.
Net value without taxes.
Gross value including all taxes.
The tax values applied.
object
Code corresponding to tax type.
Amount of tax applied.
Information about individual tax amounts.
object
Tax breakdown items per each tax rate applied.
object
Tax rate code for the item. null
for untaxed amounts.
The net value that the tax is calculated from.
The value of the tax.
object
ISO-4217 code of the Currency.
Net value without taxes.
Gross value including all taxes.
The tax values applied.
object
Code corresponding to tax type.
Amount of tax applied.
Information about individual tax amounts.
object
Tax breakdown items per each tax rate applied.
object
Tax rate code for the item. null
for untaxed amounts.
The net value that the tax is calculated from.
The value of the tax.
Additional notes.
Identifier of the settled payment from the external system (ApplePay/GooglePay).
Date and time of the item consumption in UTC timezone in ISO 8601 format.
Date and time of the item bill closure in UTC timezone in ISO 8601 format.
Accounting state of the item.
Payment state of the item.
Additional data specific to particular payment item.
object
object
object
object
object
ID of the Company
.
Address of the company.
object
The set of LegalIdentifiers
for the company.
object
A unique code for Mews to list on invoices it sends to the company.
Name of the company.
Fiscal identifier of the company.
Additional tax identifier of the company.
DUNS (Data Universal Numbering System) number of the company.
Company telephone number.
Tax identifier of the company.
Invoicing email of the company.
Department of the company.
object
ID of the Customer
to whom the bill was assigned.
Address of the customer.
object
The set of LegalIdentifiers
for the customer.
object
A unique code for Mews to list on invoices it sends to the customer.
Last name of the customer.
First name of the customer.
Second last name of the customer.
Title prefix of the customer.
Mister (Mr.)
Miss (Ms.)
Misses (Mrs.)
Tax identifier of the customer.
Additional information about owner of the bill. Can be a Customer or Company. Persisted at the time of closing of the bill.
object
object
ID of the Company
.
Address of the company.
object
The set of LegalIdentifiers
for the company.
object
A unique code for Mews to list on invoices it sends to the company.
Name of the company.
Fiscal identifier of the company.
Additional tax identifier of the company.
DUNS (Data Universal Numbering System) number of the company.
Company telephone number.
Tax identifier of the company.
Invoicing email of the company.
Department of the company.
object
ID of the Customer
to whom the bill was assigned.
Address of the customer.
object
The set of LegalIdentifiers
for the customer.
object
A unique code for Mews to list on invoices it sends to the customer.
Last name of the customer.
First name of the customer.
Second last name of the customer.
Title prefix of the customer.
Mister (Mr.)
Miss (Ms.)
Misses (Mrs.)
Tax identifier of the customer.
Additional information about the company assigned to the bill. Not the same as the owner. Persisted at the time of closing of the bill.
object
ID of the Company
.
Address of the company.
object
The set of LegalIdentifiers
for the company.
object
A unique code for Mews to list on invoices it sends to the company.
Name of the company.
Fiscal identifier of the company.
Additional tax identifier of the company.
DUNS (Data Universal Numbering System) number of the company.
Company telephone number.
Tax identifier of the company.
Invoicing email of the company.
Department of the company.
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.
object
Associated account bill data for customer.
object
ID of the Customer
to whom the bill was assigned.
Address of the customer.
object
The set of LegalIdentifiers
for the customer.
object
A unique code for Mews to list on invoices it sends to the customer.
Last name of the customer.
First name of the customer.
Second last name of the customer.
Title prefix of the customer.
Mister (Mr.)
Miss (Ms.)
Misses (Mrs.)
Tax identifier of the customer.
Associated account bill data for company.
object
ID of the Company
.
Address of the company.
object
The set of LegalIdentifiers
for the company.
object
A unique code for Mews to list on invoices it sends to the company.
Name of the company.
Fiscal identifier of the company.
Additional tax identifier of the company.
DUNS (Data Universal Numbering System) number of the company.
Company telephone number.
Tax identifier of the company.
Invoicing email of the company.
Department of the company.
Additional information about the enterprise issuing the bill, including bank account details. Persisted at the time of closing of the bill.
object
Enterprise additional tax identifier.
Enterprise company name.
Enterprise bank account.
Enterprise bank name.
Enterprise IBAN (International Bank Account Number).
Enterprise BIC (Bank Identifier Code).
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
.)
Type of correction.
Cancellation
Edit
CreditNote
Reinstatement
ReceivablePaymentsBalance
The ID of the bill that the corrective bill corrects. If the corrected bill was deleted, this field is null
.
Tax identifier to be used for fiscalization.
Fiscal machine data; currently only ItalianFiscalMachineData
is supported.
object
Discriminator of the object.
ItalianFiscalMachineData
Structure of the object depends on Discriminator
(currently only ItalianFiscalMachineData
is supported).
object
Indicates if the transaction is a refund.
Number of the rebated receipt.
Sequence of the rebated receipt.
Date and time of the rebated receipt in UTC.
Serial number of the printer.
Fiscal machine payload data; currently only ItalianFiscalMachinePayloadData
is supported.
object
Discriminator of the object.
ItalianFiscalMachine
Base64-encoded data of the file to be printed.
object
Identifier of the passport scanner.
Unique identifier of the Customer
who should be processed.
Unique identifier of the reservation whose companions should be processed.
Unique identifier of the last returned command. This can be used in Limitation in a subsequent request to fetch the next batch of commands.
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.
object
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).
object
Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
object
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.
object
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
object
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.
object
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.