Orders
Add order
Creates a new order, with the specified products and items. If the time of consumption is specified, it must be either in the future or within the Editable History Interval for the enterprise. Compared to a stay service order (i.e. a reservation), which is consumed over certain span of time, a product service order is consumed at a single point in time. Note this operation supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/orders/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 a Portfolio Access Token, ignored otherwise.
AccountId
string
required
BillId
string
optional
Identifier of the Bill to which the created order will be assigned. The bill needs to be issued to the same account as the order.
LinkedReservationId
string
optional
Identifier of the Reservation to which the created order will be linked.
ConsumptionUtc
string
optional
Date and time of the order consumption in UTC timezone in ISO 8601 format. If not specified, current date and time is used. Please note, as order consumption is one-time event, the optional parameters StartUtc
and EndUtc
in Product order parameters should not be used.
Notes
string
optional
Additional notes of the order.
Product order parameters
Count
number
optional
Count of products to be ordered, e.g. 10 in case of 10 beers.
UnitAmount
optional
Unit amount of the product that overrides the amount defined in Mews.
StartUtc
string
optional
Product start in UTC timezone in ISO 8601 format. For products with charging Once
and PerPerson
must be set to same value as EndUtc
. Use only with operation Add reservations or Add reservation product, can be omitted for Add order operation.
EndUtc
string
optional
Product end in UTC timezone in ISO 8601 format. For products with charging Once
and PerPerson
must be set to same value as StartUtc
. Use only with operation Add reservations or Add reservation product, can be omitted for Add order operation.
Item parameters
Name
string
required
Name of the item.
UnitCount
number
required
Count of units to be ordered, e.g. 10 in case of 10 beers.
UnitAmount
required
Unit amount, e.g. amount for one beer (note that total amount of the item is therefore UnitAmount
times UnitCount
).
AccountingCategoryId
string
optional
Unique identifier of an Accounting category to be assigned to the item.
Response
OrderId
string
required
Unique identifier of the created order.
Last updated