Images
You can use this method to fetch images for a given hotel using hotel_code.
| Method |
URL |
| GET |
api/v3/hotels/<hcode>/images |
| GET (new codes) |
api/v3/hotels/<hcode>/images?version=2.0 |
- <hcode> refers to the ‘hotel_code’ returned in the search response.
- N.B: All image paths should be prefixed with the base url https://cdn.grnconnect.com/
- Example : https://cdn.grnconnect.com/hotels/images/fa/67/fa67573977698e4442dd4c301168a20c9bd411b4.jpg
Response
| Attribute |
Type |
Description |
| images |
object |
An object of image paths grouped by size. |
Images
| Attribute |
Type |
Description |
| regular |
array |
Contains the list of image paths |
| small |
array |
Contains the list of image paths (This will only comes when small images are available) |
| large |
array |
Contains the list of image paths (This will only comes when large images are available) |
Images Object (regular/small/large)
| Attribute |
Type |
Description |
| url |
string |
Complete url of the image |
| path |
string |
path of the image (without domain) |
| caption |
string |
caption/title of the images |
| main_image |
boolean |
true or false, true means main image of the hotel
|
Error Codes
| HTTP Status Code |
Error Code |
Description |
| 200 |
1507 |
Invalid hotel code |
| 404 |
5002 |
Hotel not found |
| 200 |
5137 |
No images found for the hotel |
Sample Response
{
"images": {
"regular": [
{
"url": "https://images.grnconnect.com/1848072/fb5f60b219be66c2ae09483999fc10d4.jpg",
"path": "1848072/fb5f60b219be66c2ae09483999fc10d4.jpg",
"main_image": false,
"caption": "Miscellaneous"
},
{
"url": "https://images.grnconnect.com/1848072/ec37b5e520dddacf52d7f4f648b18287.jpg",
"path": "1848072/ec37b5e520dddacf52d7f4f648b18287.jpg",
"main_image": false,
"caption": "Meeting Room"
},
{
"url": "https://images.grnconnect.com/1848072/df06148605a86106e0ae5d202ae537a1.jpg",
"path": "1848072/df06148605a86106e0ae5d202ae537a1.jpg",
"main_image": false,
"caption": "Lobby"
},
{
"url": "https://images.grnconnect.com/1848072/d1a2ae85584cdf931ed96ef360e23689.jpg",
"path": "1848072/d1a2ae85584cdf931ed96ef360e23689.jpg",
"main_image": false,
"caption": "Restaurant"
},
{
"url": "https://images.grnconnect.com/1848072/bf39bb93eed155e18c7f22ec0ba2f9b9.jpg",
"path": "1848072/bf39bb93eed155e18c7f22ec0ba2f9b9.jpg",
"main_image": false,
"caption": "Guest Room"
},
{
"url": "https://images.grnconnect.com/1848072/9977770fbf657d972bf7acc2b2d92fc3.jpg",
"path": "1848072/9977770fbf657d972bf7acc2b2d92fc3.jpg",
"main_image": false,
"caption": "Meeting Room"
},
{
"url": "https://images.grnconnect.com/1848072/98294292ed5403f5d33e2c776d489e25.jpg",
"path": "1848072/98294292ed5403f5d33e2c776d489e25.jpg",
"main_image": false,
"caption": "Miscellaneous"
},
{
"url": "https://images.grnconnect.com/1848072/8961e82d06ec0fec224ebce7474efeb6.jpg",
"path": "1848072/8961e82d06ec0fec224ebce7474efeb6.jpg",
"main_image": false,
"caption": "Guest Room"
},
{
"url": "https://images.grnconnect.com/1848072/452919682cca06cef65cd20d9922291b.jpg",
"path": "1848072/452919682cca06cef65cd20d9922291b.jpg",
"main_image": false,
"caption": "Restaurant"
},
{
"url": "https://images.grnconnect.com/1848072/2d161b89f7654358fe11860a11051f60.jpg",
"path": "1848072/2d161b89f7654358fe11860a11051f60.jpg",
"main_image": true,
"caption": "Exterior"
}
],
"small": [
{
"url": "https://images.grnconnect.com/1848072/452919682cca06cef656g6t7gg22291b.jpg",
"path": "1848072/452919682cca06cef656g6t7gg22291b.jpg",
"main_image": false,
"caption": "Exterior"
},
{
"url": "https://images.grnconnect.com/1848072/hg655652ed5403f5d33e2c776d489e25.jpg",
"path": "1848072/hg655652ed5403f5d33e2c776d489e25.jpg",
"main_image": false,
"caption": "Guest Room"
}
],
"large": [
{
"url": "https://images.grnconnect.com/1848072/7uh9546t2cca06cef656g6t7gg22291b.jpg",
"path": "1848072/7uh9546t2cca06cef656g6t7gg22291b.jpg",
"main_image": false,
"caption": "Exterior"
},
{
"url": "https://images.grnconnect.com/1848072/hg655652ed5403f5d33e2c7uhag5565a.jpg",
"path": "1848072/hg655652ed5403f5d33e2c7uhag5565a.jpg",
"main_image": false,
"caption": "Guest Room"
}
]
},
"hotel_code": "1848072"
}