Skip to content

Get all rates

POST
/api/connector/v1/rates/getAll

Returns all rates (pricing setups) of the default service provided by the enterprise. Note this operation uses Pagination and supports Portfolio Access Tokens.

Rate filter 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
Limitation
required

Limitation on the quantity of data returned and optional Cursor for the starting point of data.

object
Count
required
integer format: int32
Cursor
string format: uuid
nullable
EnterpriseIds

Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.

Array<string>
nullable >= 1 items <= 1000 items
Extent
Rate extent

Extent of data to be returned. If not specified, both Rates and RateGroups will be included.

object
Rates

Whether the response should contain rates.

boolean
nullable
RateGroups

Whether the response should contain rate groups.

boolean
nullable
AvailabilityBlockAssignments

Whether the response should contain availability block assignments.

boolean
RateIds

Unique identifiers of the requested Rates.

Array<string>
nullable >= 1 items <= 1000 items
UpdatedUtc
TimeFilterInterval

Interval in which Rate was updated.

object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
ServiceIds
required

Unique identifiers of the Services from which the rates are requested.

Array<string>
>= 1 items <= 1000 items
ExternalIdentifiers

Identifiers of Rate from external systems.

Array<string>
nullable <= 1000 items
ActivityStates

Whether to return only active, only deleted, or both types of record. If not specified, both active and deleted will be returned.

Array<string>
nullable
Allowed values: Deleted Active
Example
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"EnterpriseIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"4d0201db-36f5-428b-8d11-4f0a65e960cc"
],
"ServiceIds": [
"bd26d8db-86da-4f96-9efc-e5a4654a4a94"
],
"RateIds": [
"ed4b660b-19d0-434b-9360-a4de2ea42eda"
],
"UpdatedUtc": {
"StartUtc": "2022-10-15T00:00:00Z",
"EndUtc": "2022-10-20T00:00:00Z"
},
"ExternalIdentifiers": [
"Rate-001",
"Rate-002"
],
"ActivityStates": [
"Active"
],
"Extent": {
"Rates": true,
"RateGroups": true,
"AvailabilityBlockAssignments": true
},
"Limitation": {
"Count": 10
}
}

OK

Rate result
object
Rates
required

Rates of the default service.

Array<object>
<= 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
RateGroups
required

Rate groups of the default service.

Array<object>
<= 1000 items
Rate group (ver 2017-04-12)
object
Id

Unique identifier of the rate group.

string format: uuid
ServiceId

Unique identifier of the Service that the rate group belongs to.

string format: uuid
IsActive

Whether the rate group is still active.

boolean
Name

Name of the rate group.

string
nullable
ExternalIdentifier

External identifier of the rate group.

string
nullable <= 255 characters
RateRestrictions
required
Rate restriction result
object
DateRestrictions
required

Date restrictions for the rate.

Array<object>
Date restriction
object
Id

Unique identifier of the rate restriction.

string format: uuid
RateId

Unique identifier of the rate.

string format: uuid
IsInherited

Whether the rate restriction is inherited from the parent rate.

boolean
StartUtc

Start of the rate restriction in UTC timezone in ISO 8601 format.

string
nullable
EndUtc

End of the rate restriction in UTC timezone in ISO 8601 format.

string
nullable
Days

The restricted days of week.

Array<string>
nullable
ExternalIdentifier

Identifiers of from external systems.

string
nullable
EarlinessRestrictions
required

Earliness restrictions for the rates that are only available up to before arrival.

Array<object>
Earliness restriction
object
Id

Unique identifier of the rate restriction.

string format: uuid
RateId

Unique identifier of the rate.

string format: uuid
IsInherited

Whether the rate restriction is inherited from the parent rate.

boolean
StartUtc

Start of the rate restriction in UTC timezone in ISO 8601 format.

string
nullable
EndUtc

End of the rate restriction in UTC timezone in ISO 8601 format.

string
nullable
Days

The restricted days of week.

Array<string>
nullable
ExternalIdentifier

Identifiers of from external systems.

string
nullable
MinAdvance

The minimum time before the reservation starts, you can reserve in ISO 8601 duration format.

string
nullable
MaxAdvance

The maximum time before the reservation starts, you can reserve in ISO 8601 duration format.

string
nullable
LengthRestrictions
required

Length restrictions for the rate.

Array<object>
Length restriction
object
Id

Unique identifier of the rate restriction.

string format: uuid
RateId

Unique identifier of the rate.

string format: uuid
IsInherited

Whether the rate restriction is inherited from the parent rate.

boolean
StartUtc

Start of the rate restriction in UTC timezone in ISO 8601 format.

string
nullable
EndUtc

End of the rate restriction in UTC timezone in ISO 8601 format.

string
nullable
Days

The restricted days of week.

Array<string>
nullable
ExternalIdentifier

Identifiers of from external systems.

string
nullable
MinLength

Minimal reservation length in ISO 8601 duration format.

string
nullable
MaxLength

Maximal reservation length in ISO 8601 duration format.

string
nullable
Cursor

Unique identifier of the item one newer in time order than the items to be returned. If Cursor is not specified, i.e. null, then the latest or most recent items will be returned.

string format: uuid
nullable
Example
{
"Rates": [
{
"BaseRateId": null,
"BusinessSegmentId": null,
"GroupId": "c8b866b3-be2e-4a47-9486-034318e9f393",
"Id": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"IsActive": true,
"IsEnabled": true,
"IsPublic": true,
"Name": "Fully Flexible",
"ShortName": "FF",
"ExternalNames": {
"en-US": "Long Stay Flexible Rate"
},
"ExternalIdentifier": "D001"
}
],
"RateGroups": [
{
"Id": "c8b866b3-be2e-4a47-9486-034318e9f393",
"ServiceId": "bd26d8db-86da-4f96-9efc-e5a4654a4a94",
"IsActive": true,
"Name": "Default",
"ExternalIdentifier": "RG001"
}
],
"AvailabilityBlockAssignments": [
{
"RateId": "ed4b660b-19d0-434b-9360-a4de2ea42eda",
"AvailabilityBlockId": "12806ae8-9c15-44c7-9a44-afae01289928"
}
]
}

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