Upload von Office Buy - Precondition Failed

48 views
Skip to first unread message

Christitan

unread,
May 1, 2013, 12:43:16 PM5/1/13
to immobilienscou...@googlegroups.com
Hallo,

ich versuche ein Objekt vom Typ "Office Buy" hochzuladen, bekomme allerdings immer die Meldung "Der Remoteserver hat einen Fehler zurückgegeben: (412) Precondition Failed.".
Wenn ich das Objekt stattdessen als "Office Rent" hochlade klappt es. Wie kann ich rausfinden, welches Feld bei "Office Buy" fehlt?

Vielen dank und viele Grüße
Christitan

Rob Bors

unread,
May 2, 2013, 5:20:27 AM5/2/13
to immobilienscou...@googlegroups.com
kannst du dazu bitte den kompletten post request posten?`gruß, Rob (immoscout api manager)

Michael Ganß

unread,
May 2, 2013, 5:43:54 AM5/2/13
to immobilienscou...@googlegroups.com
Hatte ich auch schon, Details müssten in den messages im response body stehen.

Christitan

unread,
May 3, 2013, 11:20:31 AM5/3/13
to immobilienscou...@googlegroups.com
<?xml version="1.0" encoding="utf-8"?>
<realEstate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Office" xmlns="http://rest.immobilienscout24.de/schema/offer/realestates/1.0">
  <externalId xmlns="">123456789</externalId>
  <title xmlns="">Büro ist Bestlage</title>
  <address xmlns="">
    <street>Aachener Straße</street>
    <houseNumber>45</houseNumber>
    <postcode>50968</postcode>
    <city>Köln</city>
    <quarter />
    <wgs84Coordinate>
      <latitude>50.9333</latitude>
      <longitude>6.97</longitude>
    </wgs84Coordinate>
  </address>
  <descriptionNote xmlns="">Das Objekt geht über 2 Etagen.</descriptionNote>
  <furnishingNote xmlns="">Die Innenausstattung ist eher alt.</furnishingNote>
  <locationNote xmlns="">Im schönen Bayenthal.</locationNote>
  <otherNote xmlns="">Dachterasse vorhanden.</otherNote>
  <showAddress xmlns="">false</showAddress>
  <officeType xmlns="">OFFICE_AND_COMMERCIAL_BUILDING</officeType>
  <lift xmlns="">YES</lift>
  <cellar xmlns="">YES</cellar>
  <handicappedAccessible xmlns="">NOT_APPLICABLE</handicappedAccessible>
  <flooringType xmlns="">CARPET</flooringType>
  <hasCanteen xmlns="">YES</hasCanteen>
  <lanCables xmlns="">YES</lanCables>
  <highVoltage xmlns="">YES</highVoltage>
  <kitchenComplete xmlns="">YES</kitchenComplete>
  <listed xmlns="">NOT_APPLICABLE</listed>
  <airConditioning xmlns="">YES</airConditioning>
  <distanceToMRS xmlns="">40</distanceToMRS>
  <distanceToFM xmlns="">10</distanceToFM>
  <distanceToPT xmlns="">5</distanceToPT>
  <distanceToAirport xmlns="">45</distanceToAirport>
  <condition xmlns="">MODERNIZED</condition>
  <numberOfParkingSpaces xmlns="">20</numberOfParkingSpaces>
  <parkingSpacePrice xmlns="">75</parkingSpacePrice>
  <lastRefurbishment xmlns="">2013</lastRefurbishment>
  <interiorQuality xmlns="">SIMPLE</interiorQuality>
  <constructionYear xmlns="">1964</constructionYear>
  <freeFrom xmlns="">01.07.2013</freeFrom>
  <heatingType xmlns="">SELF_CONTAINED_CENTRAL_HEATING</heatingType>
  <firingTypes xmlns="">
    <firingType>GAS</firingType>
  </firingTypes>
  <thermalCharacteristic xmlns="">3.25</thermalCharacteristic>
  <energyConsumptionContainsWarmWater xmlns="">NOT_APPLICABLE</energyConsumptionContainsWarmWater>
  <buildingEnergyRatingType xmlns="">ENERGY_CONSUMPTION</buildingEnergyRatingType>
  <numberOfFloors xmlns="">2</numberOfFloors>
  <additionalCosts xmlns="">
    <value>0</value>
    <currency>EUR</currency>
  </additionalCosts>
  <commercializationType xmlns="">BUY</commercializationType>
  <price xmlns="">
    <value>5000000</value>
    <currency>EUR</currency>
  </price>
  <calculatedPrice xmlns="">
    <value>5000000</value>
    <currency>EUR</currency>
  </calculatedPrice>
  <totalFloorSpace xmlns="">600</totalFloorSpace>
  <netFloorSpace xmlns="">500</netFloorSpace>
  <courtage xmlns="">
    <hasCourtage>YES</hasCourtage>
    <courtage>10 % vom Kaufpreis</courtage>
    <courtageNote />
  </courtage>
</realEstate>

Rob Bors

unread,
May 4, 2013, 8:42:59 AM5/4/13
to immobilienscou...@googlegroups.com
Hi,
im response message steht die Ursache: <message>Error while validating input for the resource. [MESSAGE: commercializationType : BUY : INVALID_COMMERCIALIZATION_TYPE]</message>

Das scheint ein Bug in unsere API zu sein. Fix kommt in spätestens 2 Wochen.
Danke für den Hinweis und sorry für das Ungemach.

Gruß
Rob



Am Mittwoch, 1. Mai 2013 18:43:16 UTC+2 schrieb Christitan:

Rob Bors

unread,
May 6, 2013, 10:15:50 AM5/6/13
to immobilienscou...@googlegroups.com
Hallo,
Kommando zurück: es ist kein API-Bug.

Ursache: RENT ist default. Wenn man das anpasst, muss nicht nur commercializationType angepasst werden, sondern auch marketingType

Anbei die Lösungsdetails:

Possible combinations of CommercialzationType und MarketingType combinations are

  • BUY:
    • PURCHASE
  • RENT:
    • RENT
    • RENT_PER_SQM

default marketingType is RENT

<commercializationType>RENT</commercializationType>
<price>
        <value>66.353</value>
        <currency>EUR</currency>
        <marketingType>RENT</marketingType><!--can be omitted-->
</price>

for CommercialzationType.BUY must be set explicitly MarketingType.PURCHASE:

<commercializationType>BUY</commercializationType>
<price>
        <value>66.353</value>
        <currency>EUR</currency>
        <marketingType>PURCHASE</marketingType><!--if omitted: default value is RENT-->
</price>

Christitan

unread,
May 9, 2013, 10:10:42 AM5/9/13
to immobilienscou...@googlegroups.com
klingt logisch.. und schon funktioniert es. wunderbar, vielen Dank für die schnell hilfe! 

ist es nicht möglich, dass die response-message weitergeleitet wird? bei mir kommt wie gesagt immer nur "Precondition Failed" an.. mit der message wüsste man zumindest ungefähr wo das problem steckt..
Reply all
Reply to author
Forward
0 new messages