Bills
Get all bills
Returns all bills, optionally filtered by customers, identifiers and other filters. Note this operation uses Pagination.
Request
[PlatformAddress]/api/connector/v1/bills/getAll
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.
EnterpriseIds
array of string
optional, max 1000 items
Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
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
required
State the bills should be in. If not specified, Open
and Closed
bills are returned.
CorrectionState
array of Bill correction state
optional
Whether to return regular bills, corrective bills, or both. If BillIds
are specified, defaults to both, otherwise defaults to Bill
.
Limitation
required
Limitation on the quantity of data returned and optional Cursor for the starting point of data.
Extent
optional
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. Deprecated! Use orderItems/getAll
and payments/getAll
with BillIds
filter instead.
Bill extent
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. Deprecated!
Items
boolean
required
Whether the response should contain payments and revenue items. Deprecated! Use orderItems/getAll
and payments/getAll
with BillIds
filter instead.
Response
Cursor
string
optional
Unique identifier of the last and hence oldest bill returned. This can be used in Limitation
in a subsequent request to fetch the next batch of older bills.
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
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.
BillPrintEventId
string
optional
Unique identifier of the Bill print event returned by previous invocation.
Response
BillId
string
required
Unique identifier of the printed bill.
Bill PDF result discriminator
Value
object
required
Structure of object depends on Discriminator
.
Bill PDF result discriminator
BillPdfFile
- PDF version of aBill
was successfully created,Value
isBillPdfFile
.BillPrintEvent
- PDF version of aBill
couldn't be created at this moment (for example bill haven't been reported to authorities yet),Value
isBillPrintEvent
Bill PDF file
Base64Data
string
required
Base64 encoded PDF file.
Bill print event
BillPrintEventId
string
required
Unique identifier of print event. Must be used in retry calls to retrieve the PDF.
Add bill
Creates new empty bill assigned to specified account. Note this operation supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/bills/add
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
Unique identifier of the enterprise. Required when using Portfolio Access Tokens, ignored otherwise.
Bill parameters
AccountId
string
required
Unique identifier of the account (Customer
or Company
) the bill is issued to. Company billing may not be enabled for your integration.
AssociatedAccountId
string
optional
Account that has a possible link with the owner of the bill.
Name
string
optional
Name of the newly created bill.
Response
Update bills
Restricted!This operation is currently in beta-test and as such it is subject to change.
Updates account assignments of one or more open bills. Note this operation supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/bills/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.
EnterpriseId
string
optional
Unique identifier of the enterprise. Required when using Portfolio Access Tokens, ignored otherwise.
BillsUpdates
array of Bill update parameters
required, max 10 items
Information about bills to be updated.
Bill update parameters
BillId
string
required
Unique identifier of the bill to update.
AccountId
optional
Unique identifier of the account (Customer
or Company
) the bill is issued to (or null if the account should not be updated).
AssociatedAccountIds
optional
Unique identifiers of the Customer
or Company
that are associated to the bill (or null if the account should not be updated).
Associated account IDs update parameters
Has same structure as Array of strings update value.
Value
array of string
optional, max 1 item
Unique identifiers of the Customer
or Company
that are associated to the bill. Set to null
to remove all associated accounts. Note that only single associated account is currently supported.
Response
Bill
Id
string
required
Unique identifier of the bill.
Name
string
optional
Name of the bill.
EnterpriseId
string
required
Unique identifier of the Enterprise
.
AccountId
string
required
Unique identifier of the account (Customer
or Company
) the bill is issued to.
AssociatedAccountIds
array of string
optional
Unique identifiers of the Customers
or Companies
that are associated to the bill.
CounterId
string
optional
Unique identifier of the bill Counter
.
Type
required
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
string
optional
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
optional
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.
LastReminderDateUtc
string
optional
Date and time when an email reminder to pay an invoice was last sent, in UTC timezone in ISO 8601 format.
UpdatedUtc
string
required
Date and time when the bill was last updated, in UTC timezone in ISO 8601 format.
PurchaseOrderNumber
string
optional
Unique number of the purchase order from the buyer.
Notes
string
optional
Additional notes.
OwnerData
required
AssociatedAccountData
array of Associated account bill data
optional
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.
EnterpriseData
optional
Additional information about the enterprise issuing the bill, including bank account details. Persisted at the time of closing of the bill.
CorrectionState
required
Whether the bill is a regular bill or a corrective bill.
CorrectedBillId
string
optional
The ID of the bill that the corrective bill corrects. If the corrected bill was deleted, this field is null
.
CustomerId
string
optional
Unique identifier of the Customer the bill is issued to. Deprecated! Use AccountId
instead.
CompanyId
string
optional
Unique identifier of the Company specified in CompanyDetails or the Company the bill is issued to. Deprecated! Use AssociatedAccountIds
instead.
OrderItems
array of Order item
optional
The order items (consumed items such as nights or products) on the bill. Deprecated! Use orderItems/getAll
with BillId
instead.
PaymentItems
array of Payment item
optional
The payment items (such as cash, credit card payments or invoices) on the bill. Deprecated!
CompanyDetails
optional
Additional information about the company assigned to the bill. Not the same as the owner. Persisted at the time of closing of the bill. Deprecated! Use AssociatedAccountData
instead.
Bill state
Open
Closed
Bill type
Receipt
- Default; the bill has been paid in full; only applicable after the bill is closed.Invoice
- Bill has not been paid in full but an invoice has been issued to request payment.
Bill options
Options of the bill.
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 BillType
of Invoice
.
DisplayCid
boolean
required
Display CID number on bill, only applicable for BillType
of Invoice
.
Rebated
boolean
required
Whether the bill is rebated (both fully or partially).
Bill assignee data
Value
object
required
Structure of object depends on Discriminator
.
Bill associated account data discriminator
BillCustomerData
BillCompanyData
Bill company data
Id
string
optional
ID of the Company
.
LegalIdentifiers
object
optional
The set of LegalIdentifiers
for the company.
BillingCode
string
optional
A unique code for Mews to list on invoices it sends to the company.
Name
string
required
Name of the company.
FiscalIdentifier
string
optional
Fiscal identifier of the company.
AdditionalTaxIdentifier
string
optional
Additional tax identifier of the company.
Bill customer data
Id
string
required
ID of the Customer
to whom the bill was assigned.
LegalIdentifiers
object
optional
The set of LegalIdentifiers
for the customer.
BillingCode
string
optional
A unique code for Mews to list on invoices it sends to the customer.
LastName
string
required
Last name of the customer.
FirstName
string
optional
First name of the customer.
SecondLastName
string
optional
Second last name of the customer.
Bill owner data
Additional information about owner of the bill. Can be a Customer or Company. Persisted at the time of closing of the bill.
Value
object
required
Structure of object depends on Discriminator
.
Associated account bill data
Bill enterprise data
Additional information about the enterprise issuing the bill, including bank account details. Persisted at the time of closing of the bill.
AdditionalTaxIdentifier
string
optional
Enterprise additional tax identifier.
CompanyName
string
optional
Enterprise company name.
BankAccount
string
optional
Enterprise bank account.
BankName
string
optional
Enterprise bank name.
Iban
string
optional
Enterprise IBAN (International Bank Account Number).
Bic
string
optional
Enterprise BIC (Bank Identifier Code).
Bill correction state
Bill
- Regular bill.CorrectiveBill
- Corrective bill, i.e. theCorrectionType
is eitherEdit
,Cancellation
, orReceivablePaymentsBalance
.
Bill correction type
Cancellation
Edit
CreditNote
Reinstatement
ReceivablePaymentsBalance
Delete bill
Removes selected bills. Bill must be empty, otherwise it's not possible to delete it. Note this operation supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/bills/delete
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
Unique identifier of the enterprise. Required when using Portfolio Access Tokens, ignored otherwise.
Response
Close bill
Closes a bill so no further modification to it is possible. Note this operation supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/bills/close
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
Unique identifier of the enterprise. Required when using Portfolio Access Tokens, ignored otherwise.
Type
required
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.
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
optional
Options of the bill. If not provided, both DisplayCustomer and DisplayTaxation are set by default.
TaxedDate
optional
Date of consumption for tax purposes. Can be used only with Type
of Invoice
.
DueDate
optional
Deadline when bill is due to be paid. Can be used only with Type
of Invoice
.
VariableSymbol
optional
Optional unique identifier of requested payment. Can be used only with Type
of Invoice
.
AccountAddress
optional
Address of the account to be displayed on bill. Overrides the default one taken from account profile.
AssociatedAccountData
array of Bill close account parameters
optional, max 1 item
Account data of the associated account on a bill. Currently one object is supported and only populated when the bill is closed.
TaxIdentifier
optional
Tax identifier of account to be put on a bill. Deprecated! Use AccountTaxIdentifier
or AssociatedAccountData
instead.
CompanyTaxIdentifier
optional
Tax identifier of company to be put on a bill. Deprecated! Use AccountTaxIdentifier
or AssociatedAccountData
instead.
Address
optional
Address of the account to be displayed on bill. Overrides the default one taken from account profile. Deprecated! Use AccountAddress
or AssociatedAccountData
instead.
Bill options parameters
Bill close account parameters
Id
string
required
Unique identifier of the associated account (Customer
or Company
) the bill is associated to.
TaxIdentifier
optional
Tax identifier of the associated account to be put on a bill.
Address
optional
Address of the associated account to be displayed on bill. Overrides the default one taken from account profile.
Response
Last updated