List media across multiple hotels
const url = 'https://partner.wink.travel/wink.partner.v1.Media/ListMedia';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"managingEntityIdentifier":"example","hotelIdentifiers":["example"],"mediaTypes":["MEDIA_TYPE_UNSPECIFIED"],"inventoryTypes":["MEDIA_INVENTORY_SCOPE_UNSPECIFIED"],"inventoryIdentifier":"example","categories":["example"],"language":"example","perHotelLimit":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://partner.wink.travel/wink.partner.v1.Media/ListMedia \ --header 'Content-Type: application/json' \ --data '{ "managingEntityIdentifier": "example", "hotelIdentifiers": [ "example" ], "mediaTypes": [ "MEDIA_TYPE_UNSPECIFIED" ], "inventoryTypes": [ "MEDIA_INVENTORY_SCOPE_UNSPECIFIED" ], "inventoryIdentifier": "example", "categories": [ "example" ], "language": "example", "perHotelLimit": "example" }'List media across multiple hotels
Batch gallery retrieval across up to 20 hotels in one call — built for a nightly or hourly sync
job rather than a page render. A bad hotel identifier never fails the whole batch: each entry
carries its own status (OK, NOT_IN_CHANNEL, NOT_FOUND) instead.
Billed 1 unit per hotel whose media is returned — that is, per entry with status OK. A
NOT_IN_CHANNEL or NOT_FOUND entry costs nothing.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Your Wink account identifier. Every call is scoped to one account, and your token must hold INVENTORY:READ on it.
Hotels to retrieve media for, 1 to 20 entries. Required.
Restrict results to these media types, applied to every hotel in the batch. Leave empty for both images and videos.
Restrict results to these galleries, applied to every hotel in the batch. Leave empty for every gallery.
Restrict results to a single inventory item’s gallery, applied to every hotel in the batch.
Restrict results to these OTA PIC photo-category codes, applied to every hotel in the batch.
Language to prune captions to, applied to every hotel in the batch. Falls back to English.
Maximum assets returned per hotel, max 200. Defaults to 50 when unset (0).
Responses
Section titled “Responses”The RPC completed with gRPC status OK.
object
One entry per hotel identifier in the request, same order. Always as many entries as you requested — a batch never fails as a whole for one bad hotel identifier.
One hotel’s outcome within a batch ListMedia response.
object
Hotel identifier, echoed from the request.
Hotel name. Unset unless status is OK.
Whether this hotel’s media was retrieved, and if not, why.
Total published assets matching the filter, before per_hotel_limit truncation. 0 unless status is OK.
Media assets for this hotel, truncated to the request’s per_hotel_limit. Empty unless status is OK.
One published media asset (image or video) belonging to a hotel or one of its bookable inventory items.
object
Stable media identifier — key your integration on this, not on any URL. It survives the platform’s media reorganization, which rewrites the underlying storage path (and therefore every delivery URL) without changing this identifier.
Hotel this asset belongs to.
Which gallery this asset belongs to.
Identifier of the owning inventory item (room type, restaurant, spa, meeting room, add-on). Unset when inventory_type is PROPERTY.
Display name of the owning inventory item, or the hotel name when inventory_type is PROPERTY.
Whether this asset is an image or video.
Hosting platform this asset is served from.
OTA PIC photo-category code.
Display order within the owning gallery. Lower sorts first.
Media width in pixels. 0 when unavailable (e.g. YouTube).
Media height in pixels. 0 when unavailable (e.g. YouTube).
Caption/alt text pruned to the requested language, falling back to English. Unset when no description is set.
Photographer/source attribution credits, if any.
Photographer/source attribution for one media asset.
object
URL to the contributor’s profile, if any.
Name of the contributor. Required whenever an attribution entry is present.
Lifestyle association for this asset, if any. LIFESTYLE_TYPE_UNSPECIFIED means none is set — this field is genuinely optional, unlike a request-side type selector.
Fixed set of ready-to-use delivery-URL variants for this asset.
object
IMAGE only: unscaled, best-quality delivery URL.
object
Ready-to-use delivery URL for this variant.
Maximum pixel width this variant is scaled to. Unset for variants with no resize (image “original”, video “stream”) — explicit presence so “not resized” is distinguishable from a literal 0px width.
Delivery format label for this variant.
IMAGE only: large variant, max width 1920px.
object
Ready-to-use delivery URL for this variant.
Maximum pixel width this variant is scaled to. Unset for variants with no resize (image “original”, video “stream”) — explicit presence so “not resized” is distinguishable from a literal 0px width.
Delivery format label for this variant.
IMAGE only: medium variant, max width 1024px.
object
Ready-to-use delivery URL for this variant.
Maximum pixel width this variant is scaled to. Unset for variants with no resize (image “original”, video “stream”) — explicit presence so “not resized” is distinguishable from a literal 0px width.
Delivery format label for this variant.
IMAGE or VIDEO (Cloudinary): thumbnail variant, max width 320px. For video this is a jpg frame extracted from the video.
object
Ready-to-use delivery URL for this variant.
Maximum pixel width this variant is scaled to. Unset for variants with no resize (image “original”, video “stream”) — explicit presence so “not resized” is distinguishable from a literal 0px width.
Delivery format label for this variant.
VIDEO (Cloudinary) only: mp4 streaming delivery URL, unscaled.
object
Ready-to-use delivery URL for this variant.
Maximum pixel width this variant is scaled to. Unset for variants with no resize (image “original”, video “stream”) — explicit presence so “not resized” is distinguishable from a literal 0px width.
Delivery format label for this variant.
VIDEO (Cloudinary) only: mp4 preview variant, max width 1280px.
object
Ready-to-use delivery URL for this variant.
Maximum pixel width this variant is scaled to. Unset for variants with no resize (image “original”, video “stream”) — explicit presence so “not resized” is distinguishable from a literal 0px width.
Delivery format label for this variant.
VIDEO (Cloudinary) only: poster frame, a jpg still extracted from the video at medium width.
object
Ready-to-use delivery URL for this variant.
Maximum pixel width this variant is scaled to. Unset for variants with no resize (image “original”, video “stream”) — explicit presence so “not resized” is distinguishable from a literal 0px width.
Delivery format label for this variant.
VIDEO (YouTube) only: pass-through to the YouTube watch URL. Wink generates no variants for externally-hosted media.
Example
{ "hotels": [ { "status": "HOTEL_MEDIA_STATUS_UNSPECIFIED", "assets": [ { "inventoryType": "MEDIA_INVENTORY_SCOPE_UNSPECIFIED", "mediaType": "MEDIA_TYPE_UNSPECIFIED", "source": "MEDIA_SOURCE_UNSPECIFIED", "lifestyleType": "LIFESTYLE_TYPE_UNSPECIFIED" } ] } ]}