Skip to content

Get all companionships

POST
/api/connector/v1/companionships/getAll

Returns all companionships based on customers, reservations or reservation groups. One of them must be specified in the request. Note this operation uses Pagination and supports Portfolio Access Tokens.

CompanionshipFilterParameters
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
CompanionshipIds

Unique identifiers of Companionship.

Array<string>
nullable >= 1 items <= 1000 items
Extent
required
CompanionshipExtent

Extent of data to be returned. E.g. it is possible to specify that together with the companionships, customers, reservations, and reservation groups should be also returned.

object
Reservations
boolean
ReservationGroups
boolean
Customers
boolean
ReservationIds

Unique identifiers of reservations.

Array<string>
nullable >= 1 items <= 1000 items
CustomerIds

Unique identifiers of Customers.

Array<string>
nullable >= 1 items <= 1000 items
ReservationGroupIds

Unique identifiers of Reservation groups.

Array<string>
nullable >= 1 items <= 1000 items
UpdatedUtc
TimeFilterInterval
object
StartUtc
string format: date-time
nullable
EndUtc
string format: date-time
nullable
Example
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"EnterpriseIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"4d0201db-36f5-428b-8d11-4f0a65e960cc"
],
"CompanionshipIds": [
"72d4b117-1f84-44a3-1f84-8b2c0635ac60"
],
"CustomerIds": [
"35d4b117-4e60-44a3-9580-c582117eff98"
],
"ReservationIds": [
"bfee2c44-1f84-4326-a862-5289598f6e2d"
],
"ReservationGroupIds": [
"c704dff3-7811-4af7-a3a0-7b2b0635ac59"
],
"UpdatedUtc": {
"StartUtc": "2020-02-05T00:00:00Z",
"EndUtc": "2020-02-10T00:00:00Z"
},
"Limitation": {
"Count": 10
}
}

OK

CompanionshipResult
object
Companionships

Companionships.

Array<object>
nullable
Companionship
object
Id

Unique identifier of Companionship.

string format: uuid
CustomerId

Unique identifier of Customer.

string format: uuid
ReservationGroupId

Unique identifier of Reservation group.

string format: uuid
ReservationId

Unique identifier of reservation.

string format: uuid
nullable
Reservations

The accompanied reservations.

Array<object>
nullable
Reservation (ver 2017-04-12)
object
Id
required

Unique identifier of the reservation.

string format: uuid
ServiceId
required

Unique identifier of the Service that is reserved.

string format: uuid
GroupId
required

Unique identifier of the Reservation group.

string format: uuid
Number
required

Confirmation number of the reservation in Mews.

string
>= 1 characters
ChannelNumber

Number of the reservation within the Channel (i.e. OTA, GDS, CRS, etc) in case the reservation group originates there (e.g. Booking.com confirmation number).

string
nullable
ChannelManagerNumber

Unique number of the reservation within the reservation group.

string
nullable
ChannelManagerGroupNumber

Number of the reservation group within a Channel manager that transferred the reservation from Channel to Mews.

string
nullable
ChannelManager

Name of the Channel manager (e.g. AvailPro, SiteMinder, TravelClick, etc).

string
nullable
State
required
Service order state (ver 2017-04-12)
string
Allowed values: Enquired Confirmed Started Processed Canceled Optional Requested
Origin
required
Reservation origin (ver 2017-04-12)
string
Allowed values: Distributor ChannelManager Import Connector Navigator CommanderInPerson CommanderChannel CommanderPhone CommanderEmail CommanderWebsite CommanderMessage CommanderCallCenter
OriginDetails

Details about the reservation origin.

string
nullable
Purpose
Any of:
Reservation purpose
string
Allowed values: Leisure Business Student
CreatedUtc
required

Creation date and time of the reservation in UTC timezone in ISO 8601 format.

string
>= 1 characters
UpdatedUtc
required

Last update date and time of the reservation in UTC timezone in ISO 8601 format.

string
>= 1 characters
CancelledUtc

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

string
nullable
StartUtc
required

Start of the reservation in UTC timezone in ISO 8601 format. This is either the scheduled reservation start time, or the actual customer check-in time if this is earlier than the scheduled start time.

string
>= 1 characters
EndUtc
required

End of the reservation (departure) in UTC timezone in ISO 8601 format.

string
>= 1 characters
ReleasedUtc

Date when the optional reservation is released in UTC timezone in ISO 8601 format.

string
nullable
RequestedCategoryId
required

Identifier of the requested Resource category.

string format: uuid
AssignedSpaceId

Identifier of the assigned Space.

string format: uuid
nullable
AssignedSpaceLocked

Whether the reservation is locked to the assigned Space and cannot be moved.

boolean
AssignedResourceId

Identifier of the assigned Resource.

string format: uuid
nullable
AssignedResourceLocked
required

Whether the reservation is locked to the assigned Resource and cannot be moved.

boolean
BusinessSegmentId

Identifier of the reservation Business segment.

string format: uuid
nullable
CompanyId

Identifier of the Company on behalf of which the reservation was made.

string format: uuid
nullable
TravelAgencyId

Identifier of the Company that mediated the reservation.

string format: uuid
nullable
AvailabilityBlockId

Unique identifier of the Availability block the reservation is assigned to.

string format: uuid
nullable
RateId
required

Identifier of the reservation Rate.

string format: uuid
VoucherId

Unique identifier of the Voucher that has been used to create reservation.

string format: uuid
nullable
CreditCardId

Unique identifier of the Credit card.

string format: uuid
nullable
CancellationReason
Any of:
string
Allowed values: Other ConfirmationMissed BookedElsewhere ForceMajeure GuestComplaint NoShow PriceTooHigh ServiceNotAvailable InputError InvalidPayment TravelAgency RequestedByGuest Update BookingAbandoned RequestedByBooker
AdultCount

Count of adults the reservation was booked for.

integer format: int32
ChildCount

Count of children the reservation was booked for.

integer format: int32
PersonCounts
required

Number of people per age category the reservation was booked for.

Array<object>
Age category parameters
object
AgeCategoryId
required

Unique identifier of the Age category.

string format: uuid
Count
required

Number of people of a given age category. Only positive value is accepted.

integer format: int32
OwnerId
required

Unique identifier of the Customer or Company who owns the reservation.

string format: uuid
CustomerId
required

Unique identifier of the Customer who owns the reservation.

string format: uuid
BookerId

Unique identifier of the Customer on whose behalf the reservation was made.

string format: uuid
nullable
CompanionIds
required

Unique identifiers of the Customers that will use the resource.

Array<string>
ChannelManagerId

Channel Manager number.

string
nullable
Options
required
Reservation options

Options of the reservation.

object
OwnerCheckedIn
required

Owner of the reservation checked in.

boolean
AllCompanionsCheckedIn
required

All companions of the reservation checked in.

boolean
AnyCompanionCheckedIn
required

Any companion of the reservation checked in.

boolean
ReservationGroups

The accompanied reservation groups.

Array<object>
nullable
Reservation groups (ver 2017-04-12)
object
Id

Unique identifier of the reservation group.

string format: uuid
Name

Name of the reservation group.

string
nullable
Customers

Customers that belong to the companionships.

Array<object>
nullable
Customer
object
Id
required

Unique identifier of the customer.

string format: uuid
ChainId
required

Unique identifier of the chain.

string format: uuid
Number
required

Number of the customer.

string
>= 1 characters
Title

Title of the customer.

Mister (Mr.)

Miss (Ms.)

Misses (Mrs.)

string
Allowed values: Mister Miss Misses
Sex

Sex of the customer.

Male

Female

string
Allowed values: Male Female
FirstName

First name of the customer.

string
nullable
LastName
required

Last name of the customer.

string
>= 1 characters
SecondLastName

Second last name of the customer.

string
nullable
NationalityCode

ISO 3166-1 code of the Country.

string
nullable
PreferredLanguageCode

Language and culture code of the customer’s preferred language, according to their profile. For example: en-GB, fr-CA.

string
nullable
LanguageCode

Language and culture code of the customer’s language, based on multiple sources. These sources include the preferred language specified in internal data based on previous bookings, and the preferred language of the customer specified in their profile. If neither of these sources are present, we use the native language based on the customer’s nationality. The format is, for example, en-US or fr-FR.

string
nullable
BirthDate

Date of birth in ISO 8601 format.

string
nullable
BirthPlace

Place of birth.

string
nullable
Occupation

Occupation of the customer.

string
nullable
Email

Email address of the customer.

string
nullable
HasOtaEmail

Whether the customer’s email address is a temporary email address from an OTA. For more details, see the product documentation.

boolean
Phone

Phone number of the customer (possibly mobile).

string
nullable
TaxIdentificationNumber

Tax identification number of the customer.

string
nullable
LoyaltyCode

Loyalty code of the customer.

string
nullable
AccountingCode

Accounting code of the customer.

string
nullable
BillingCode

Billing code of the customer.

string
nullable
Notes

Internal notes about the customer.

string
nullable
CarRegistrationNumber

Registration number of the customer’s car.

string
nullable <= 255 characters
DietaryRequirements

Customer’s dietary requirements, e.g. Vegan, Halal.

string
nullable <= 255 characters
CreatedUtc
required

Creation date and time of the customer in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
UpdatedUtc
required

Last update date and time of the customer in UTC timezone in ISO 8601 format.

string format: date-time
>= 1 characters
Passport
Identity document
object
Id

Unique identifier of the document.

string format: uuid
CustomerId

Identifier of the Customer.

string format: uuid
Type
Document type

Type of the document.

IdentityCard

Passport

Visa

DriversLicense

string
Allowed values: IdentityCard Passport Visa DriversLicense
Number

Number of the document (e.g. passport number).

string
nullable
Expiration

Expiration date in ISO 8601 format.

string format: date
nullable
Issuance

Date of issuance in ISO 8601 format.

string format: date
nullable
IssuingCountryCode

ISO 3166-1 code of the Country.

string
nullable
IssuingCity

City where the document was issued.

string
nullable
IdentityDocumentSupportNumber

Identity document support number. Only required for Spanish identity cards in Spanish hotels.

string
nullable
IdentityCard
Identity document
object
Id

Unique identifier of the document.

string format: uuid
CustomerId

Identifier of the Customer.

string format: uuid
Type
Document type

Type of the document.

IdentityCard

Passport

Visa

DriversLicense

string
Allowed values: IdentityCard Passport Visa DriversLicense
Number

Number of the document (e.g. passport number).

string
nullable
Expiration

Expiration date in ISO 8601 format.

string format: date
nullable
Issuance

Date of issuance in ISO 8601 format.

string format: date
nullable
IssuingCountryCode

ISO 3166-1 code of the Country.

string
nullable
IssuingCity

City where the document was issued.

string
nullable
IdentityDocumentSupportNumber

Identity document support number. Only required for Spanish identity cards in Spanish hotels.

string
nullable
Visa
Identity document
object
Id

Unique identifier of the document.

string format: uuid
CustomerId

Identifier of the Customer.

string format: uuid
Type
Document type

Type of the document.

IdentityCard

Passport

Visa

DriversLicense

string
Allowed values: IdentityCard Passport Visa DriversLicense
Number

Number of the document (e.g. passport number).

string
nullable
Expiration

Expiration date in ISO 8601 format.

string format: date
nullable
Issuance

Date of issuance in ISO 8601 format.

string format: date
nullable
IssuingCountryCode

ISO 3166-1 code of the Country.

string
nullable
IssuingCity

City where the document was issued.

string
nullable
IdentityDocumentSupportNumber

Identity document support number. Only required for Spanish identity cards in Spanish hotels.

string
nullable
DriversLicense
Identity document
object
Id

Unique identifier of the document.

string format: uuid
CustomerId

Identifier of the Customer.

string format: uuid
Type
Document type

Type of the document.

IdentityCard

Passport

Visa

DriversLicense

string
Allowed values: IdentityCard Passport Visa DriversLicense
Number

Number of the document (e.g. passport number).

string
nullable
Expiration

Expiration date in ISO 8601 format.

string format: date
nullable
Issuance

Date of issuance in ISO 8601 format.

string format: date
nullable
IssuingCountryCode

ISO 3166-1 code of the Country.

string
nullable
IssuingCity

City where the document was issued.

string
nullable
IdentityDocumentSupportNumber

Identity document support number. Only required for Spanish identity cards in Spanish hotels.

string
nullable
Address
Address
object
Id

Unique identifier of the address.

string format: uuid
Line1

First line of the address.

string
nullable
Line2

Second line of the address.

string
nullable
City

The city.

string
nullable
PostalCode

Postal code.

string
nullable
CountryCode

ISO 3166-1 code of the Country.

string
nullable
CountrySubdivisionCode

ISO 3166-2 code of the administrative division, e.g. DE-BW.

string
nullable
Latitude

The latitude.

number format: double
nullable
Longitude

The longitude.

number format: double
nullable
AddressId

Unique identifier of the Address of the customer.

string format: uuid
nullable
Classifications
required

Classifications of the customer.

Array<string>
Allowed values: None PaymasterAccount Blacklist Media LoyaltyProgram PreviousComplaint Returning Staff FriendOrFamily TopManagement Important VeryImportant Problematic Cashlist DisabledPerson Military Airline HealthCompliant InRoom WaitingForRoom Student
Options
required

Options of the customer.

Array<string>
Allowed values: None SendMarketingEmails Invoiceable BillAddressObjection SendMarketingPostalMail SendPartnerMarketingEmails SendPartnerMarketingPostalMail WithdrawCardConsent GuestPhotoConsent IdPhotosConsent
ItalianDestinationCode

Value of Italian destination code.

string
nullable
ItalianFiscalCode

Value of Italian fiscal code.

string
nullable
CompanyId

Unique identifier of Company the customer is associated with.

string format: uuid
nullable
MergeTargetId

Unique identifier of the account (Customer) to which this customer is linked.

string format: uuid
nullable
ActivityState

Activity State of customer record, i.e. whether active or deleted.

string
nullable
IsActive
required

Whether the customer record is still active.

boolean
PreferredSpaceFeatures
required

A list of room preferences, such as view type, bed type, and amenities.

Array<string>
Allowed values: SeaView RiverView OceanView TwinBeds DoubleBed RollawayBed UpperBed LowerBed Balcony AccessibleBathroom AccessibleRoom ElevatorAccess HighFloor Kitchenette AirConditioning PrivateJacuzzi PrivateSauna EnsuiteRoom PrivateBathroom SharedBathroom
CreatorProfileId
required

Unique identifier of the user who created the customer.

string format: uuid
UpdaterProfileId
required

Unique identifier of the user who last updated the customer.

string format: uuid
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
{
"Companionships": [
{
"Id": "72d4b117-1f84-44a3-1f84-8b2c0635ac60",
"CustomerId": "35d4b117-4e60-44a3-9580-c582117eff98",
"ReservationGroupId": "c704dff3-7811-4af7-a3a0-7b2b0635ac59",
"ReservationId": "bfee2c44-1f84-4326-a862-5289598f6e2d"
}
],
"Customers": null,
"Reservations": null,
"ReservationGroups": null,
"Cursor": "72d4b117-1f84-44a3-1f84-8b2c0635ac60"
}

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