{{ wiki:www.travanto.de.png}} \\ \\ \\ \\ {{ wiki:www.travanto.de.png}} \\ \\ \\ \\ ====== Property service (Object service) ====== It is possible to create a new property right from scratch. The general URL of this service is https://connect.travanto.de/service/objects. Use GET, POST and PUT methods to show, create or change one or more properties. \\ ---- ===== Schemes ===== The [[api:services:schemata:objects|basic request and response schemes]] for the object service provide you with a sound idea of how to use it. Request scheme\\ Response scheme \\ ---- ===== Creating properties ===== ^ Method ^ URL ^ Description ^ | POST |/service/objects/| Create one or more properties within the account of the API key | Example request: [json] { "objects": [ { "type": "apartment", "title": "Test Apartment", "street": "Große Straße", "house_nr": "1", "zip": "12345", "city": "Musterstadt", "country": "DE", "max_guests": 5, "size": 80, "rooms": 3, "floor": "1", "double_beds": 2, "single_beds": 0, "bedrooms": 2, "bedsittingrooms": 0, "child_beds": 0, "sofa_bed": 0, "bathrooms": 1, "arrival_time": "14:00:00", "departure_time": null, "loc": { "lat": 55.7865754, "lon": 55.765432 } } ] } [/json] Example response: [json] { "OK": 1, "Request": { "Method": "POST", "Path": "/service/objects/" }, "ObjectsServiceResult": [ { "object_id": 1020494, "home": "", "user_id": 111671, "status": "new", "type": "apartment", "title": "Test Apartment", "street": "Große Straße", "house_nr": "1", "zip": "12345", "city": "Musterstadt", "country": "DE", "max_guests": 5, "size": 80, "rooms": 3, "floor": "1", "double_beds": 2, "single_beds": 0, "bedsittingrooms": 0, "bedrooms": 2, "child_beds": 0, "sofa_bed": 0, "bathrooms": 1, "arrival_time": "14:00:00", "departure_time": null, "loc": { "lat": 55.7865754, "lon": 55.765432 } } ] } [/json] TIPS * When creating a property you will be provided with an object_id that you have to use for later purposes. \\ ---- ===== Showing property information ===== Use this service to show current property information for an entire property. ^ Method ^ URL ^ Description ^ | GET |/service/objects/$object_id | Show one specific property | Example response: [json] { "OK": 1, "Request": { "Method": "GET", "Path": "/service/objects/1020494" }, "ObjectsServiceResult": [ { "object_id": 1020494, "home": "", "user_id": 111671, "status": "new", "type": "apartment", "title": "Test Apartment", "street": "Große Straße", "house_nr": "1", "zip": "12345", "city": "Musterstadt", "country": "DE", "max_guests": 5, "size": 80, "rooms": 3, "floor": "1", "double_beds": 2, "single_beds": 0, "bedsittingrooms": 0, "bedrooms": 2, "child_beds": 0, "sofa_bed": 0, "bathrooms": 1, "arrival_time": "14:00:00", "departure_time": null, "loc": { "lat": 55.7865754, "lon": 55.765432 } } ] } [/json]