Finance

Get all exchange rates

Returns all available exchange rates among currencies of the Enterprise.

Request

[PlatformAddress]/api/connector/v1/exchangeRates/getAll

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0"
}

Property

Type

Contract

Description

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

{
"ExchangeRates": [
{
"SourceCurrency": "EUR",
"TargetCurrency": "GBP",
"Value": 0.85053421
},
{
"SourceCurrency": "GBP",
"TargetCurrency": "EUR",
"Value": 1.17573165
}
]
}

Property

Type

Contract

Description

ExchangeRates

array of Exchange rate

required

The available exchange rates.

Exchange rate

Property

Type

Contract

Description

SourceCurrency

string

required

ISO-4217 code of the source Currency.

TargetCurrency

string

required

ISO-4217 code of the target Currency.

Value

number

required

The exchange rate from the source currency to the target currency.

Get all cashiers

Returns all cashiers in the enterprise.

Request

[PlatformAddress]/api/connector/v1/cashiers/getAll

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0"
}

Property

Type

Contract

Description

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

{
"Cashiers": [
{
"Id": "9a36e3fa-2299-474b-a8a2-5ea4da317abc",
"IsActive": true,
"Name": "Main Cashier"
}
]
}

Property

Type

Contract

Description

Cashiers

array of Cashier

required

Cashiers in the enterprise.

Cashier

Property

Type

Contract

Description

Id

string

required

Unique identifier of the cashier.

IsActive

boolean

required

Whether the cashier is still active.

Name

string

required

Name of the cashier.

Get all cashier transactions

Returns all cashier transactions created within the specified interval.

Request

[PlatformAddress]/api/connector/v1/cashierTransactions/getAll

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"CreatedUtc": {
"StartUtc": "2020-01-05T00:00:00Z",
"EndUtc": "2020-01-10T00:00:00Z"
}
}

Property

Type

Contract

Description

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.

CreatedUtc

Time interval

required, max length 3 months

Interval in which the Transaction was created.

Response

{
"CashierTransactions": [
{
"Amount": {
"Currency": "EUR",
"Value": 100
},
"CashierId": "9a36e3fa-2299-474b-a8a2-5ea4da317abc",
"CreatedUtc": "2017-01-10T00:00:00Z",
"Id": "177740c3-fec9-4338-a224-a3b03a35b3e1",
"Notes": "Cash payment EUR",
"Number": "47",
"PaymentId": "a68ef257-2fbc-4a4f-85de-59d808cef657"
}
]
}

Property

Type

Contract

Description

CashierTransactions

array of Cashier transaction

required

Cashier transactions created in the interval.

Cashier transaction

Property

Type

Contract

Description

Id

string

required

Unique identifier of the transaction.

CashierId

string

required

Unique identifier of the Cashier.

PaymentId

string

optional

Unique identifier of the corresponding payment Accounting item.

CreatedUtc

string

required

Creation date and time of the transaction.

Number

string

required

Number of the transaction.

Notes

string

optional

Additional notes of the transaction.

Amount

Currency value

required

Value of the transaction.

Get all accounting categories

Returns all accounting categories of the enterprise associated with the connector integration.

Request

[PlatformAddress]/api/connector/v1/accountingCategories/getAll

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0"
}

Property

Type

Contract

Description

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

{
"AccountingCategories": [
{
"Classification": "Accommodation",
"Code": "345",
"CostCenterCode": "2589",
"ExternalCode": "3010",
"Id": "0cf7aa90-736f-43e9-a7dc-787704548d86",
"IsActive": true,
"LedgerAccountCode": "311100",
"Name": "Accommodation",
"PostingAccountCode": "602020"
},
{
"Classification": null,
"Code": "100",
"CostCenterCode": "2589",
"ExternalCode": "ABVG",
"Id": "0b9560fb-055d-47d3-a6d4-e579c44ca558",
"IsActive": true,
"LedgerAccountCode": "311100",
"Name": "Alcoholic Beverage",
"PostingAccountCode": "602020"
}
]
}

Property

Type

Contract

Description

AccountingCategories

array of Accounting category

required

Accounting categories of the enterprise.

Accounting category

Property

Type

Contract

Description

Id

string

required

Unique identifier of the category.

IsActive

boolean

required

Whether the accounting category is still active.

Name

string

required

Name of the category.

Code

string

optional

Code of the category within Mews.

Classification

string Accounting category classification

optional

Classification of the accounting category allowing cross-enterprise reporting.

ExternalCode

string

optional

Code of the category in external systems.

LedgerAccountCode

string

optional

Code of the ledger account (double entry accounting).

PostingAccountCode

string

optional

Code of the posting account (double entry accounting).

CostCenterCode

string

optional

Code of cost center.

Accounting category classification

  • Accommodation

  • FoodAndBeverage

  • Taxes

  • Payments

  • ExternalRevenue

  • SundryIncome

  • Wellness

  • Sport

  • Technology

  • Facilities

  • Events

  • Tourism

  • ...

Get all accounting items

Returns all accounting items of the enterprise that were consumed (posted) or will be consumed within the specified interval. If the Currency is specified, costs of the items are converted to that currency.

Request

[PlatformAddress]/api/connector/v1/accountingItems/getAll

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ConsumedUtc": {
"StartUtc": "2020-01-05T00:00:00Z",
"EndUtc": "2020-01-10T00:00:00Z"
},
"ClosedUtc": {
"StartUtc": "2020-01-05T00:00:00Z",
"EndUtc": "2020-01-10T00:00:00Z"
},
"ItemIds": [
"e654f217-d1b5-46be-a820-e93ba568dfac"
]
}

Property

Type

Contract

Description

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.

ConsumedUtc

Time interval

optional, max length 3 months

Interval in which the accounting item was consumed. Required if no other filter is provided.

ClosedUtc

Time interval

optional, max length 3 months

Interval in which the accounting item was closed. Required if no other filter is provided.

ItemIds

array of string

optional, max 1000 items

Unique identifiers of the Accounting items. Required if ConsumedUtc or ClosedUtc are not specified.

Currency

string

optional

ISO-4217 code of the Currency the item costs should be converted to.

Extent

Accounting item extent

required

Extent of data to be returned. E.g. it is possible to specify that together with the accounting items, credit card transactions should be also returned.

States

array of string Accounting state

optional

States the accounting items should be in. If not specified, accounting items in Open or Closed states are returned.

Accounting item extent

Property

Type

Contract

Description

AccountingItems

bool

optional

Whether the response should contain Accounting items.

CreditCardTransactions

bool

optional

Whether the response should contain Credit card transactions of the accounting items.

Accounting item state

  • Open - Accounting items which carry a non-zero value, are open, and have not been closed on a bill or invoice.

  • Closed - Accounting items which carry a non-zero value and have been closed on a bill or invoice.

  • Inactive - Accounting items which are either of zero value and have not been canceled, if the state of the payment item is Pending or Failed, or items of optional reservations. Until the reservation is confirmed, all its accounting items are Inactive.

  • Canceled - Accounting items which have been canceled, regardless of whether the item is of zero value

Response

{
"AccountingItems": [
{
"Id": "89b93f7c-5c63-4de2-bd17-ec5fee5e3120",
"CustomerId": "2a1a4315-7e6f-4131-af21-402cec59b8b9",
"OrderId": "810b8c3a-d358-4378-84a9-534c830016fc",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"ProductId": null,
"BillId": null,
"InvoiceId": null,
"AccountingCategoryId": "4ac8ce68-5732-4f1d-bf0d-e557072c926f",
"CreditCardId" : null,
"Type": "ServiceRevenue",
"SubType": "CustomItem",
"Name": "Caramel, Pepper & Chilli Popcorn",
"Notes": null,
"ConsumptionUtc": "2016-07-27T12:48:39Z",
"ClosedUtc": "2017-02-41T10:41:54Z",
"State": "Closed",
"SubState": null,
"Amount": {
"Currency": "GBP",
"NetValue": 2.08,
"GrossValue": 2.5,
"TaxValues": [
{
"Code": "UK-S",
"Value": 0.42
}
]
}
}
],
"CreditCardTransactions": null
}

Property

Type

Contract

Description

AccountingItems

array of Accounting item

optional

The accounting items.

CreditCardTransactions

array of Credit card transaction

optional

The credit card payment transactions.

Accounting item

Property

Type

Contract

Description

Id

string

required

Unique identifier of the item.

CustomerId

string

required

Unique identifier of the Customer whose account the item belongs to.

OrderId

string

optional

Unique identifier of the order (or Reservation which is a special type of order) the item belongs to.

ServiceId

string

optional

Unique identifier of the Service the item belongs to.

ProductId

string

optional

Unique identifier of the Product.

BillId

string

optional

Unique identifier of the bill the item is assigned to.

InvoiceId

string

optional

Unique identifier of the invoiced Bill the item is receivable for.

AccountingCategoryId

string

optional

Unique identifier of the Accounting category the item belongs to.

CreditCardId

string

optional

Unique identifier of the Credit card the item is associated to.

Type

string Accounting item type

required

Type of the item.

SubType

string Accounting item subtype

required

subtype of the item. Note that the subtype depends on the Type of the item.

Name

string

required

Name of the item.

Notes

string

optional

Additional notes.

ConsumptionUtc

string

required

Date and time of the item consumption in UTC timezone in ISO 8601 format.

ClosedUtc

string

optional

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

State

string Accounting state

required

State of the accounting item.

SubState

string Accounting item substate

optional

Substate of the item. Note that the substate depends on the Type of the item.

Amount

Amount value

required

Item's amout, negative amount represents either rebate or a payment.

Accounting item type

  • ServiceRevenue

  • ProductRevenue

  • AdditionalRevenue

  • Payment

Accounting item subtype

  • Revenue subtypes

    • CancellationFee

    • Rebate

    • Deposit

    • ExchangeRateDifference

    • CustomItem

    • Surcharge

    • SurchargeDiscount

    • SpaceOrder

    • ProductOrder

    • Other

  • Payment subtypes

    • CreditCard

    • Invoice

    • Cash

    • Unspecified

    • BadDebts

    • WireTransfer

    • ExchangeRateDifference

    • ExchangeRoundingDifference

    • BankCharges

    • Cheque

    • Other

Accounting item substate

  • Payment substates

    • Pending

    • Verifying

    • Charged

    • Canceled

    • Failed

Currency value

Property

Type

Contract

Description

Currency

string

required

ISO-4217 code of the Currency.

Value

number

optional

Amount in the currency.

Amount Value

Property

Type

Contract

Description

Currency

string

required

ISO-4217 code of the Currency.

NetValue

number

optional

Net value in case the item is taxed.

GrossValue

number

optional

Gross value including all taxes.

TaxValues

array of Tax Value

optional

The tax values applied.

For most amounts, precision of values depends on TaxPrecision of Enterprise or Currency precision. But in some cases, precision can be higher.

Tax value

Property

Type

Contract

Description

Code

number

required

Code corresponding to tax type.

Value

number

required

Amount of tax applied.

Credit card transaction

Property

Type

Contract

Description

Id

string

required

Unique identifier of the credit card transaction.

PaymentId

string

required

Unique identifier of the Accounting item.

ChargedAmount

Amount

required

Charged amount of the transaction.

SettledAmount

Amount

optional

Settled amount of the transaction.

Fee

Amount

optional

Fee of the transaction.

SettlementId

string

optional

Identifier of the settlement.

SettledUtc

string

optional

Settlement date and time in UTC timezone in ISO 8601 format.

Update accounting items

Updates specified accounting items. Allows to change to which account or bill the item is assigned to.

Request

[PlatformAddress]/api/connector/v1/accountingItems/update

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"AccountingItemUpdates": [
{
"AccountingItemId": "ee425738-8112-446f-b764-abd7007ba880",
"AccountId": {
"Value": "a5786a7b-a388-43cc-a838-abd7007b5ff7"
},
"BillId": {
"Value": "30b4b0c2-5e9c-4247-91d3-abd8005e2a0a"
}
},
{
"AccountingItemId": "0a0c3367-8b43-4327-ab2f-abd700e7f64f",
"AccountId": null,
"BillId": {
"Value": "b9402ab6-07d4-436f-b682-abdd00d077ea"
}
}
]
}

Property

Type

Contract

Description

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.

AccountingItemUpdates

array of Accounting item update

required

List of requested updates.

Accounting item update

Property

Type

Contract

Description

AccountingItemId

string

required

Unique identifier of the Accounting item.

AccountId

String update value

optional

Unique identifier of the account (for example Customer) the item is assigned to (or null if the assigned account should not be updated). If defined, valid account identifier must be provided.

BillId

String update value

required

Unique identifier of the Bill the items is assigned to. It's possible to assign item to bill belonging to another account, in that case both AccountId and BillId must be provided.

Response

{
"AccountingItems": [
{
"Id": "ee425738-8112-446f-b764-abd7007ba880",
"CustomerId": "a5786a7b-a388-43cc-a838-abd7007b5ff7",
"OrderId": "5cb9dc38-642d-412a-a7eb-abd7007b9ecb",
"ServiceId": "bc69c610-f0f8-4645-8bb3-ab3a00c97c1e",
"ProductId": null,
"BillId": "30b4b0c2-5e9c-4247-91d3-abd8005e2a0a",
"InvoiceId": null,
"AccountingCategoryId": "13cd6f3a-be61-4ce3-9a19-ab3a00b98f49",
"CreditCardId": null,
"Type": "ProductRevenue",
"SubType": "Surcharge",
"Name": "Service / Product",
"Notes": null,
"ConsumptionUtc": "2020-06-11T07:29:00Z",
"ClosedUtc": null,
"State": "Open",
"Amount": {
"Value": 52.8,
"Net": 48.0,
"Tax": 4.8,
"TaxRate": 0.1,
"Currency": "USD",
"NetValue": 48.0,
"GrossValue": 52.8,
"TaxValues": [
{
"Code": "US-DC-I",
"Value": 4.8
}
]
}
}
]
}

Property

Type

Contract

Description

AccountingItems

array of Accounting item

optional

The updated accounting items.

Get all bills

Returns all bills, possibly filtered by customers, identifiers and other filters.

Request

[PlatformAddress]/api/connector/v1/bills/getAll

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"BillIds": [
"e654f217-d1b5-46be-a820-e93ba568dfac"
],
"CustomerIds": [
"fe795f96-0b64-445b-89ed-c032563f2bac"
],
"State": "Closed",
"ClosedUtc": {
"StartUtc": "2020-02-05T00:00:00Z",
"EndUtc": "2020-02-10T00:00:00Z"
},
"CreatedUtc": {
"StartUtc": "2020-02-05T00:00:00Z",
"EndUtc": "2020-02-10T00:00:00Z"
},
"DueUtc": null,
"PaidUtc": null,
"Extent": {
"Items": false
}
}

Property

Type

Contract

Description

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.

BillIds

array of string

optional, max 1000 items

Unique identifiers of the Bills. Required if no other filter is provided.

CustomerIds

array of string

optional, max 1000 items

Unique identifiers of the Customers.

State

string

optional

Bill state the bills should be in. If not specified Open and Closed bills are returned.

ClosedUtc

Time interval

optional, max length 3 months

Interval in which the Bill was closed.

CreatedUtc

Time interval

optional, max length 3 months

Interval in which the Bill was created.

DueUtc

Time interval

optional , max length 3 months

Interval in which the Bill is due to be paid.

PaidUtc

Time interval

optional, max length 3 months

Interval in which the Bill was paid.

Extent

Bill extent

required

Extent of data to be returned. E.g. it is possible to specify that together with the bills, payments and revenue items should be also returned.

Bill state

  • Open

  • Closed

Bill extent

Property

Type

Contract

Description

Items

bool

required

Whether the response should contain payments and revenue items.

Response

{
"Bills": [
{
"Id": "26afba60-06c3-455b-92db-0e3983be0b1d",
"AccountId": "fe795f96-0b64-445b-89ed-c032563f2bac",
"CustomerId": "fe795f96-0b64-445b-89ed-c032563f2bac",
"CompanyId": null,
"CounterId": null,
"State": "Closed",
"Type": "Invoice",
"Number": "29",
"VariableSymbol": null,
"CreatedUtc": "2017-01-31T10:48:06Z",
"IssuedUtc": "2017-01-31T10:58:06Z",
"TaxedUtc": null,
"PaidUtc": null,
"DueUtc": null,
"Notes": "",
"Options": {
"DisplayCustomer": true,
"DisplayTaxation": true,
"TrackReceivable": true,
"DisplayCid": false,
"Rebated": false
},
"Payments": [],
"Revenue": [],
"AssigneeData": {
"Discriminator": "BillCustomerData",
"Value": {
"ItalianFiscalCode": null
}
}
}
]
}

Property

Type

Contract

Description

Bills

array of Bill

required

The filtered bills.

Bill

Property

Type

Contract

Description

Id

string

required

Unique identifier of the bill.

AccountId

string

required

Unique identifier of the account (for example Customer) the bill is issued to.

CustomerId

string

optional

Unique identifier of the Customer the bill is issued to.

CompanyId

string

optional

Unique identifier of the Company the bill is issued to.

CounterId

string

optional

Unique identifier of the bill Counter.

State

string Bill state

required

State of the bill.

Type

string Bill type

required

Type of the bill.

Number

string

required

Number of the bill.

VariableSymbol

string

optional

Variable symbol of the bill.

CreatedUtc

string

required

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

IssuedUtc

string

required

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

TaxedUtc

string

optional

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

PaidUtc

string

optional

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

DueUtc

string

optional

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

Notes

string

optional

Additional notes.

Options

Bill options

required

Options of the bill.

Revenue

array of Accounting item

required

The revenue items on the bill.

Payments

array of Accounting item

required

The payments on the bill.

AssigneeData

Bill assignee data

optional

Additional information about assignee of the bill. Persisted at the time of closing of the bill.

Bill type

A bill is either a Receipt which means that it has been fully paid, or Invoice that is supposed to be paid in the future.

  • Receipt - the bill has already been fully paid.

  • Invoice - the bill is supposed to be paid in the future. Before closing it is balanced with an invoice payment.

Bill options

Property

Type

Contract

Description

DisplayCustomer

boolean

required

Display customer information on a bill.

DisplayTaxation

boolean

required

Display taxation detail on a bill.

TrackReceivable

boolean

required

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

DisplayCid

boolean

required

Display CID number on bill, only applicable for Invoice.

Rebated

boolean

required

Bill has been rebated.

Bill assignee data

Property

Type

Contract

Description

Discriminator

string Bill assignee data discriminator

required

Determines type of value.

Value

object

required

Structure of object depends on Bill assignee data discriminator.

Bill assignee data discriminator

  • BillCustomerData - Assignee data specific to a customer.

  • BillCompanyData - Assignee data specific to a company.

Bill customer data

Property

Type

Contract

Description

ItalianFiscalCode

string

optional

Italian fiscal code.

Bill company data

Property

Type

Contract

Description

Add bill

Creates new empty bill assigned to specified account.

Request

[PlatformAddress]/api/connector/v1/bills/add

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"Bills": [
{
"AccountId": "a5786a7b-a388-43cc-a838-abd7007b5ff7"
}
]
}

Property

Type

Contract

Description

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.

Bills

array of Bill parameters

required, max 1000 items

Information about bills to be created.

Bill parameters

Property

Type

Contract

Description

AccountId

string

required

Unique identifier of the account (for example Customer) the bill is issued to.

Response

{
"Bills": [
{
"Id": "177966b7-f3d9-42b7-ba49-abd80057329b",
"AccountId": "fe795f96-0b64-445b-89ed-c032563f2bac",
"CustomerId": "a5786a7b-a388-43cc-a838-abd7007b5ff7",
"CompanyId": null,
"CounterId": null,
"State": "Open",
"Type": "Receipt",
"Number": null,
"VariableSymbol": null,
"CreatedUtc": "2020-06-12T05:17:28Z",
"IssuedUtc": null,
"TaxedUtc": null,
"PaidUtc": null,
"DueUtc": null,
"Notes": null,
"Revenue": [],
"Payments": []
}
]
}

Property

Type

Contract

Description

Bills

array of Bill

required

The created bills.

Delete bill

Removes selected bills. Bill must be empty, otherwise it's not possible to delete it.

Request

[PlatformAddress]/api/connector/v1/bills/delete

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"BillIds": [
"177966b7-f3d9-42b7-ba49-abd80057329b"
]
}

Property

Type

Contract

Description

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.

BillIds

array of string

required

Unique identifiers of the Bills to be deleted.

Response

{}

Close bill

Closes a bill so no further modification to it is possible.

Request

[PlatformAddress]/api/connector/v1/bills/close

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"BillId": "44eba542-193e-47c7-8077-abd7008eb206",
"Type": "Receipt",
"BillCounterId": "84b25778-c1dd-48dc-8c00-ab3a00b6df14",
"FiscalMachineId": null,
"Options": {
"DisplayCustomer": {
"Value": false
},
"DisplayTaxation": null
},
"TaxedDate": {
"Value": "2020-07-07"
},
"DueDate": {
"Value": "2020-07-14"
},
"VariableSymbol": {
"Value": "5343"
},
"TaxIdentifier": {
"Value": "446768"
},
"Notes": {
"Value": "Bill closing note"
}
}

Property

Type

Contract

Description

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.

BillId

string

required

Unique identifier of the Bill to be closed.

Type

string Bill type

required

Specifies the mode bill should be closed in.

BillCounterId

string

optional

Unique identifier of the Counter to be used for closing. Default one is used when no value is provided.

FiscalMachineId

string

optional

Unique identifier of the Fiscal Machine to be used for closing. Default one is used when no value is provided.

Options

Bill options parameters

optional

Options of the bill. If not provided both DisplayCustomer and DisplayTaxation are set by default.

TaxedDate

String update value

optional

Date of consumption for tax purposes. Can be used only with Bill type Invoice.

DueDate

String update value

optional

Deadline when Bill is due to be paid. Can be used only with Bill type Invoice.

VariableSymbol

String update value

optional

Optional unique identifier of requested payment. Can be used only with Bill type Invoice.

TaxIdentifier

String update value

optional

Tax identifier of account to be put on a bill.

Notes

String update value

optional

Notes to be attached to bill.

Address

Address parameters

optional

Address of the account to be displayed on bill. Overrides the default one taken from account profile.

Bill options parameters

Property

Type

Contract

Description

DisplayCustomer

Bool update value

required

Display customer information on a bill.

DisplayTaxation

Bool update value

required

Display taxation detail on a bill.

Response

{
"Bills": [
{
"Id": "44eba542-193e-47c7-8077-abd7008eb206",
"CustomerId": "7eaf9da6-7229-454a-8cb0-abd700804bd2",
"CompanyId": null,
"CounterId": "84b25778-c1dd-48dc-8c00-ab3a00b6df14",
"State": "Closed",
"Type": "Receipt",
"Number": "84",
"VariableSymbol": null,
"CreatedUtc": "2020-06-11T08:39:32Z",
"IssuedUtc": "2020-06-25T08:49:38Z",
"TaxedUtc": "2020-06-25",
"PaidUtc": null,
"DueUtc": null,
"Notes": null,
"Options": {
"DisplayCustomer": false,
"DisplayTaxation": true,
"TrackReceivable": false,
"DisplayCid": false,
"Rebated": false
},
"Revenue": [],
"Payments": []
}
]
}

Property

Type

Contract

Description

Bills

array of Bill

required

The closed bill.

Get bill PDF

Creates a PDF version of the specified bill. In case it's not possible to return PDF immediately, you must retry the call later while providing the unique event identifier that is returned from the first invocation.

Request

[PlatformAddress]/api/connector/v1/bills/getPdf

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"BillId": "44eba542-193e-47c7-8077-abd7008eb206",
"BillPrintEventId": null
}

Property

Type

Contract

Description

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.

BillId

string

required

Unique identifier of the Bill to be printed.

BillPrintEventId

string

optional

Unique identifier of the Bill print event returned by previous invocation.

Response

{
"BillId": "44eba542-193e-47c7-8077-abd7008eb206",
"Result": {
"Discriminator": "BillPdfFile",
"Value": {
"Base64Data": "JVBER....."
}
}
}

Property

Type

Contract

Description

BillId

string

required

The unique identifier of printed Bill.

Result

object Bill PDF result

required

The result of operation.

Bill PDF result

Property

Type

Contract

Description

Discriminator

string Bill PDF result discriminator

required

Determines type of result.

Value

object

required

Structure of object depends on Bill PDF result discriminator.

Bill PDF result discriminator

  • BillPdfFile - PDF version of a Bill was successfully created, Value is Bill PDF file.

  • BillPrintEvent - PDF version of a Bill couldn't be created at this moment (for example bill haven't been reported to authorities yet), Value is Bill print event.

Bill PDF file

Property

Type

Contract

Description

Base64Data

string

required

BASE64 encoded PDF file.

Bill print event

Property

Type

Contract

Description

BillPrintEventId

string

required

Unique identifier of print event. Must be used in retry calls to retrieve the PDF.

Get all outlet items

Returns all outlet items of the enterprise that were consumed (posted) or will be consumed within the specified interval. If the Currency is specified, costs of the items are converted to that currency.

Request

[PlatformAddress]/api/connector/v1/outletItems/getAll

{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"ConsumedUtc": {
"StartUtc": "2020-01-05T00:00:00Z",
"EndUtc": "2020-01-10T00:00:00Z"
},
"ClosedUtc": {
"StartUtc": "2020-01-05T00:00:00Z",
"EndUtc": "2020-01-10T00:00:00Z"
},
"Currency": "EUR"
}

Property

Type

Contract

Description

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.

ConsumedUtc

Time interval

optional, max length 3 months

Interval in which the Outlet item was consumed. Required if no other filter is provided.

ClosedUtc

Time interval

optional, max length 3 months

Interval in which the Outlet bill was closed.

Currency

string

optional

ISO-4217 code of the Currency the item costs should be converted to.

Response

{
"OutletItems": [
{
"Id": "f29821b7-1659-4c96-a8c7-3725d0f1509b",
"BillId": "5c82a9bd-729c-4f80-af48-a56ab3aebbf6",
"AccountingCategoryId": "1131ddd1-fa2b-4150-bbf6-7fce94941f65",
"Type": "Revenue",
"Name": "sample revenue item",
"UnitCount": 4,
"UnitAmount": {
"Currency": "EUR",
"GrossValue": 11,
"NetValue": 11,
"TaxValues": []
},
"CreatedUtc": "2018-07-25T12:47:11Z",
"ConsumedUtc": "2018-07-26T12:19:07Z",
"Notes": null
},
{
"Id": "dfec07c6-e278-4ed0-932f-41bbd1f38039",
"BillId": "7bdd3b53-7bb3-419d-8ff2-c9bde65d0c7e",
"AccountingCategoryId": "7EDAB816-BF4E-40CC-8936-7BC0B222908D",
"Type": "Payment",
"Name": "sample payment item",
"UnitCount": 77,
"UnitAmount": {
"Currency": "EUR",
"GrossValue": 2,
"NetValue": 2
"TaxValues": []
},
"CreatedUtc": "2018-07-25T16:25:28Z",
"ConsumedUtc": "2018-07-26T10:11:08Z",
"Notes": null
}
],
"OutletBills": [
{
"Id": "5c82a9bd-729c-4f80-af48-a56ab3aebbf6",
"OutletId": "c9f09414-2fdf-41d6-bdb1-12158b01048e",
"Number": "1305",
"ClosedUtc": "2018-07-26T12:19:07Z",
"Notes": null
},
{
"Id": "7bdd3b53-7bb3-419d-8ff2-c9bde65d0c7e",
"OutletId": "E0A29D6D-411E-4302-AA6D-9289935C5F14",
"Number": "1306",
"ClosedUtc": "2018-07-26T10:19:02Z",
"Notes": null
}
]
}

Property

Type

Contract

Description

OutletItems

array of Outlet item

required

The outlet items.

OutletBills

array of Outlet bill

required

The outlet bills of the items.

Outlet item

Property

Type

Contract

Description

Id

string

required

Unique identifier of the item.

BillId

string

required

Unique identifier of the Outlet bill the item belongs to.

AccountingCategoryId

string

optional

Unique identifier of the Accounting category the item belongs to.

Type

string Outlet item type

required

Type of the item.

Name

string

required

Name of the item.

UnitCount

number

required

Unit count of the item.

UnitAmount

Amount

required

Unit amount of the item.

CreatedUtc

string

optional

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

ConsumedUtc

string

required

Date and time of the item consumption in UTC timezone in ISO 8601 format.

Notes

string

optional

Additional notes.