Table of Contents
Pictures / Images
Pictures say more than 1000 words. Please provide a minimum of ten and a maximum of 100 high-quality pictures of your accommodation. The minimum dimensions for a picture are 533×400, higher resolutions at around 2560×1536 are however being recommended and preferred.
The general URL of this service is https://connect.travanto.de/service/objects/pictures. Use PUT method to create, update and delete pictures and GET method to show one or more images.
The basic request and response schemes for the picture service provide you with a sound idea of how to use it.
If you send to many false requests (wrong dimensions, URL not found and so forth) for one specific property, our system will ban your following requests for this property for at least 2 hours.
Adding / Replacing / Updating / Deleting pictures
Using the PUT method you can easily add, delete and modify pictures for an entire property. The API automatically detects new pictures, modifications and deletions by comparing the provided URLs and deciding autonomously what to do.
| Method | URL | Description |
|---|---|---|
| PUT | /service/objects/pictures/?object_id=$object_id | Add, change or delete one or more pictures for a specific property |
Example request:
{
"pictures": [
{
"url": "https://domain.tld/new_main_pic.png"
},
{
"url": "http://domain.tld/property_layout.jpg",
"type": "layout"
},
{
"picture_id": 1181921,
"descriptions": {
"en": "New english description",
"de": "Neue deutsche Bildbeschreibung"
}
},
{
"picture_id": 1181923,
"url": "http://domain.tld/replacing_picture.png"
}
]
}
Example response:
{
"OK": 1,
"Request": {
"Method": "PUT",
"Path": "/service/objects/pictures/",
"Query": "object_id=1010397"
},
"ObjectsPicturesServiceResult": [
{
"picture_id": 1309009,
"object_id": 1010397,
"type": "photo",
"url": "https://img.travanto.de/objekte-neu/20161228/1010397-hauptansicht-145517.jpg",
"width": 800,
"height": 473
},
{
"picture_id": 1181921,
"object_id": 1010397,
"type": "photo",
"url": "https://img.travanto.de/objekte-neu/20151019/1010397-bild-2-142940.jpg",
"width": 1280,
"height": 853,
"descriptions": {
"de": "Neue deutsche Bildbeschreibung",
"en": "New english description"
}
},
{
"picture_id": 1181923,
"object_id": 1010397,
"type": "photo",
"url": "https://img.travanto.de/objekte-neu/20161228/1010397-bild-3-145518.jpg",
"width": 623,
"height": 400
},
{
"picture_id": 1309010,
"object_id": 1010397,
"type": "layout",
"url": "https://img.travanto.de/objekte-neu/20161228/1010397-lageplan-145517.jpg",
"width": 735,
"height": 460
}
]
}
TIPS
- With regard to the example above, the first URL provides a new picture, the second provides a new picture from type “layout”, the third changes the descriptions for an existing image and the fourth will replace an existing picture.
- You can add the layout of the property, too. By adding “type”: “layout”, to your request, we can easily categorize your picture and present it to your guests.
- Please send picture descriptions whenever possible so that guest know what they are looking at.
- Updated or replaced pictures keep their previous picture_id
Showing pictures/images
If you want to check your pictures and display the corresponding information for any reasons you can do so using the following request.
| Method | URL | Description |
|---|---|---|
| GET | /service/objects/pictures/$picture_id | Show one specific picture |
| GET | /service/objects/pictures/?object_id=$object_id | Show all pictures for a specific property |
Example response:
{
"OK": 1,
"Request": {
"Method": "GET",
"Path": "/service/objects/pictures/1296706"
},
"ObjectsPicturesServiceResult": [
{
"picture_id": 1296706,
"object_id": 1010397,
"type": "photo",
"url": "https://img.travanto.de/objekte-neu/20161107/1010397-bild-2-150816.jpg",
"width": 1024,
"height": 683,
"descriptions": {
"de": "neues bild",
"en": "new picture"
}
}
]
}
