updateUnitSpaces mutation
Updates space details and amenities. For example, you might need to add a bed or a room. When updating a space, you must specify the Expedia unit ID and space ID, not the Expedia property ID.
To remove a bed from a bed group, remove its group definition completely. To remove a bed group from a space, specify an empty bed group.
Use the metadata query to retrieve the list of allowed values for the various fields in each unit (such as bed type). This helper query is especially important when defining amenities for a unit space. Be sure to review the details in the metadata
query's reference page for an explanation of how to read amenity metadata.
Syntax
1mutation {2 updateUnitSpaces(5}
Examples
One bedroom with two beds, living room with two full sofa beds
- Request
- Response
1mutation {2 updateUnitSpaces(3 input: {4 clientMutationId: "123456"5 propertyId: 152400946 unitId: 3256712757 bedrooms: [8 {9 order: 110 id: "280c5afb-64a2-4d49-b7e5-e7df2a4563dd"11 text: [12 {13 key: "Bedroom 1"14 values: [{ locale: "en-US", value: "Bedroom 1 with options" }]15 }16 ]17 bedGroups: [18 {19 beds: [20 { quantity: 1, size: "Queen", type: "QueenBed" }21 { quantity: 1, size: "Full", type: "FullBed" }22 ]23 }24 ]25 }26 ]27 livingRooms: [28 {29 order: 130 id: "34ed706b-e41a-4ede-84b0-9091c50a3477"31 text: [32 {33 key: "LivingRm 1"34 values: [{ locale: "en-US", value: "LivingRm 1" }]35 }36 ]37 bedGroups: [38 { beds: [{ quantity: 2, size: "Full", type: "SofaBed" }] }39 ]40 }41 ]42 }43 ) {44 clientMutationId45 spaces {46 bedrooms {47 id48 order49 text {50 key51 values {52 locale53 value54 }55 }56 bedGroups {57 beds {58 type59 size60 quantity61 }62 }63 }64 livingRooms {65 id66 order67 text {68 key69 values {70 locale71 value72 }73 }74 bedGroups {75 beds {76 type77 size78 quantity79 }80 }81 }82 }83 }84}
One bedroom with a full or a king bed
- Request
- Response
1mutation {2 updateUnitSpaces(3 input: {4 clientMutationId: "123456"5 propertyId: 152400946 unitId: 3256712757 bedrooms: [8 {9 order: 110 id: "280c5afb-64a2-4d49-b7e5-e7df2a4563dd"11 text: [12 {13 key: "Bedroom 1"14 values: [{ locale: "en-US", value: "Bedroom 1 with options" }]15 }16 ]17 bedGroups: [18 { beds: [{ quantity: 1, size: "King", type: "KingBed" }] }19 { beds: [{ quantity: 1, size: "Full", type: "FullBed" }] }20 ]21 }22 ]23 livingRooms: [24 {25 order: 126 id: "34ed706b-e41a-4ede-84b0-9091c50a3477"27 text: [28 {29 key: "LivingRm 1"30 values: [{ locale: "en-US", value: "LivingRm 1" }]31 }32 ]33 bedGroups: [34 { beds: [{ quantity: 2, size: "Full", type: "SofaBed" }] }35 ]36 }37 ]38 }39 ) {40 clientMutationId41 spaces {42 bedrooms {43 id44 order45 text {46 key47 values {48 locale49 value50 }51 }52 bedGroups {53 beds {54 type55 size56 quantity57 }58 }59 }60 livingRooms {61 id62 order63 text {64 key65 values {66 locale67 value68 }69 }70 bedGroups {71 beds {72 type73 size74 quantity75 }76 }77 }78 }79 }80}
Arguments
Name | Description |
---|---|
| Required. Type: UpdateUnitSpacesInput |
Types
Name | Type | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BedGroup | Object | |||||||||||||
Bed types offered in the room. Vacation rentals are limited to a single bed group with multiple bed types. Conventional lodging may have two bed groups to represent alternatives. For example, a hotel might have a room type with 1 king bed or 2 full beds.
| ||||||||||||||
BedGroupInput | InputObject | |||||||||||||
Bed types offered in the room. Vacation rentals are limited to a single bed group with multiple bed types. Conventional lodging may have two bed groups to represent alternatives. For example, a hotel might have a room type with 1 king bed or 2 full beds. To remove a bed group from a space, send null (empty array) for bed groups, though at least one bed group must be defined for a unit. Note the following:
| ||||||||||||||
Bedroom | Object | |||||||||||||
Details about this bedroom.
| ||||||||||||||
BedType | Object | |||||||||||||
BedTypeInput | InputObject | |||||||||||||
Details about the bed. Use the
| ||||||||||||||
ID | ID | |||||||||||||
The | ||||||||||||||
Int | Int | |||||||||||||
The | ||||||||||||||
LivingRoom | Object | |||||||||||||
Details about a living room space.
| ||||||||||||||
Locale | Locale | |||||||||||||
A type that represents a string that conforms to the BCP-47 (RFC 5646) standard. Example: en-GB. | ||||||||||||||
LocalizedString | Object | |||||||||||||
LocalizedStringInput | InputObject | |||||||||||||
String | String | |||||||||||||
The | ||||||||||||||
Text | Object | |||||||||||||
Key-value pairs that specify free text elements.
| ||||||||||||||
TextInput | InputObject | |||||||||||||
Key-value pairs that specify free text elements.
| ||||||||||||||
UnitSpaces | Object | |||||||||||||
Spaces available in the unit (as created by
| ||||||||||||||
UpdateUnitSpacesBedroomInput | InputObject | |||||||||||||
Bedroom space details to update. To remove a bed from a bed group, remove its group definition completely. To remove a bed group from a space, specify an empty bed group.
| ||||||||||||||
UpdateUnitSpacesInput | InputObject | |||||||||||||
Space details to update.
| ||||||||||||||
UpdateUnitSpacesLivingRoomInput | InputObject | |||||||||||||
Living room details to update.
| ||||||||||||||
UpdateUnitSpacesPayload | Object | |||||||||||||
Details about the space after it has been updated.
|