Skip to content

Set rates

POST
/api/connector/v1/rates/set

Adds new Rates or updates existing ones if they are matched by Id or ExternalIdentifier property. This operation supports Portfolio Access Tokens.

Set rates parameters
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
EnterpriseId

Unique identifier of the enterprise. Required when using Portfolio Access Tokens, ignored otherwise.

string format: uuid
nullable
Rates
required

Rates to be added or updated.

Array<object>
>= 1 items <= 100 items
Set rate parameters
object
Id

Unique identifier of the rate. If it matches an existing rate, that rate will be updated. If no match is found, an error will be returned.

string format: uuid
nullable
ExternalIdentifier

Unique identifier of the rate in the external system. If Id is not provided and ExternalIdentifier matches an existing rate, the corresponding rate will be updated. If no match is found, a new rate will be created.

string
nullable <= 255 characters
ServiceId
required

Unique identifier of the service. Ignored in case of updating an existing rate.

string
>= 1 characters
RateGroupId

Unique identifier of the rate group under which rate is assigned. Empty value means that rate is added to a default group or the current group is kept for update, respectively.

string
nullable
IsEnabled

Whether the rate is available to customers. true will be used as a default if not provided.

boolean
nullable
Type
required
Rate Add Type

Type of the rate. Private will be used as a default if not provided.

Public

Private

string
Allowed values: Public Private
Names
required
Localized text

All translations of the name of the rate.

object
key
additional properties
string
Descriptions
Localized text

All translations of the description.

object
key
additional properties
string
PricingType
required
Rate pricing discriminator

Rate pricing type. Must match existing pricing type in case of update.

BaseRatePricing

DependentRatePricing

string
Allowed values: BaseRatePricing DependentRatePricing
Pricing
Rate set pricing data parameters

Contains additional data about pricing of the rate.

object
BaseRatePricing
Base rate pricing parameters (without occupancy adjustments)

Additional data for rates with base rate pricing. Used when PricingType is BaseRatePricing. Defaults are applied if not specified: amount is set to 10000 in default Enterprise’s currency and with its default accommodation tax rate code.

object
Amount
required
Amount parameters

Price of the product that overrides the price defined in Mews.

object
Currency
required
string format: currency
>= 1 characters
TaxCodes
required
Array<string>
NetValue
number format: double
nullable
GrossValue
number format: double
nullable
DependentRatePricing
Dependent rate pricing parameters

Additional data for rate with dependent rate pricing. Required when PricingType is DependentRatePricing.

object
BaseRateId
required

Unique identifier of the base rate.

string
>= 1 characters
RelativeAdjustment

Relative amount which shows the difference between this rate and the base rate.

number format: double
AbsoluteAdjustment

Specific amount which shows the difference between this rate and the base rate.

number format: double
Example
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"Rates": [
{
"Id": "e1b0bf46-32a3-4f7c-99c1-1ff78447d55d",
"ServiceId": "956176af-e10b-4f3c-beb7-274801bce328",
"RateGroupId": "d7adfddc-c2dc-4798-ace2-28de7b25408f",
"IsEnabled": true,
"Type": "Public",
"Names": {
"en-US": "Base rate"
},
"Descriptions": {
"en-US": "Base rate with all fields specified using GUID identifiers."
},
"PricingType": "BaseRatePricing",
"Pricing": {
"BaseRatePricing": {
"Amount": {
"Currency": "EUR",
"NetValue": 100
}
}
}
},
{
"ExternalIdentifier": "55698",
"ServiceId": "eid:Stay",
"RateGroupId": "eid:RG10",
"IsEnabled": false,
"Type": "Private",
"Names": {
"en-US": "Dependent rate"
},
"Descriptions": {
"en-US": "Dependent rate with all field specified using eid identifiers."
},
"PricingType": "DependentRatePricing",
"Pricing": {
"DependentRatePricing": {
"BaseRateId": "00392166-3869-4174-b491-cf0162524a38",
"RelativeAdjustment": 0,
"AbsoluteAdjustment": 0
}
}
}
],
"EnterpriseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}

OK

Rate set result
object
Rates

Rates that were added or updated.

Array<object>
nullable <= 1000 items
Rate
object
Id
required

Unique identifier of the rate.

string format: uuid
GroupId
required

Unique identifier of Rate Group where the rate belongs.

string format: uuid
ServiceId
required

Unique identifier of the Service.

string format: uuid
BaseRateId

Unique identifier of the base Rate.

string format: uuid
nullable
IsBaseRate
required

Indicates if this is a base rate.

boolean
BusinessSegmentId

Unique identifier of the Business Segment.

string format: uuid
nullable
IsActive
required

Indicates if this rate is active.

boolean
IsEnabled
required

Indicates if this rate is currently available to customers.

boolean
IsPublic
required

Indicates if this rate is publicly available.

boolean
IsDefault
required

Indicates if this rate is the default rate for the service. Assigned automatically to the first rate of a service.

boolean
Type
required
Rate type

Type of the rate.

Public

Private

AvailabilityBlock

string
Allowed values: Public Private AvailabilityBlock
Name

Name of the rate (in the default language).

string
nullable
Names
required
Localized text

All translations of the name.

object
key
additional properties
string
ShortName

Short name of the rate (in the default language).

string
nullable
UpdatedUtc
required

Interval in which the rates were updated.

string format: date-time
>= 1 characters
ExternalNames
Localized text

All translations of the external name of the rate.

object
key
additional properties
string
Description
Localized text

All translations of the description of the rate.

object
key
additional properties
string
ExternalIdentifier

Identifier of the rate from external system.

string
nullable <= 255 characters
TaxExemptionReason

Specifies the reason a rate is exempt from tax.

IT_N1 (N1 - Escluse ex art.15)

IT_N2_2 (N2.2 - Non soggette – altri casi)

IT_N3_5 (N3.5 - Non imponibili – a seguito di dichiarazioni d’intento)

IT_N4 (N4 - Esenti)

IT_N5 (N5 - Regime del margine / IVA non esposta in fattura)

PL_ZW (ZW - Zwolniony)

PL_NP (NP - Nie podlega)

string
Allowed values: IT_N1 IT_N2_2 IT_N3_5 IT_N4 IT_N5 PL_ZW PL_NP
TaxExemptionLegalReference

Legal reference that states why this rate is exempt from tax.

string
nullable
Example
{
"Rates": [
{
"Id": "e1b0bf46-32a3-4f7c-99c1-1ff78447d55d",
"GroupId": "d7adfddc-c2dc-4798-ace2-28de7b25408f",
"ServiceId": "956176af-e10b-4f3c-beb7-274801bce328",
"BaseRateId": null,
"IsBaseRate": true,
"BusinessSegmentId": "dc9188f6-fb61-412c-b3fd-af32dab082ed",
"IsActive": true,
"IsEnabled": true,
"IsPublic": true,
"IsDefault": false,
"Type": "Public",
"Name": null,
"Names": {
"en-US": "Base rate"
},
"ShortName": "BR",
"UpdatedUtc": "2024-11-20T00:00:00Z",
"ExternalNames": {
"en-US": "External base rate"
},
"Description": {
"en-US": "Base rate description."
},
"ExternalIdentifier": null,
"TaxExemptionReason": null,
"TaxExemptionLegalReference": null
},
{
"Id": "8eb1f163-bce7-49ca-a62c-c9261951c85f",
"GroupId": "d7adfddc-c2dc-4798-ace2-28de7b25408f",
"ServiceId": "956176af-e10b-4f3c-beb7-274801bce328",
"BaseRateId": "00392166-3869-4174-b491-cf0162524a38",
"IsBaseRate": false,
"BusinessSegmentId": "dc9188f6-fb61-412c-b3fd-af32dab082ed",
"IsActive": true,
"IsEnabled": false,
"IsPublic": false,
"IsDefault": false,
"Type": "Private",
"Name": null,
"Names": {
"en-US": "Dependent rate"
},
"ShortName": "DR",
"UpdatedUtc": "2024-11-20T00:00:00Z",
"ExternalNames": {
"en-US": "External dependent rate"
},
"Description": {
"en-US": "Dependent rate description."
},
"ExternalIdentifier": "55698",
"TaxExemptionReason": null,
"TaxExemptionLegalReference": null
}
]
}

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