Attachment

Attachment/PUTbyID

Updates the resource identified by the following URL.This method changes the meta data of an attachment to a realestate Object.

https://rest.immobilienscout24.de/restapi/api/offer/v1.0/user/{username}/realestate/{id}/attachment/{id}

 

Note: The binary code cannot be changed.

Supported media types

  • XML (Accept: application/xml)
  • JSON (Accept: application/json)

Authorization requirements

A System Key and an authenticated user are required for this operation:

 

Please use a secure connection (https) for this operation.

Request

Path Parameters

  • Username. "me" can be used instead of the username.
  • realestateid: the unique scout object ID, which is generated by POST REALESTATE, automatically.
  • attachmentid: the attachment ID.

Body

XML

Example for a picture

<common:attachment xsi:type="common:Picture" id="695671604" xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0" xmlns:ns3="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<title>Test Logo</title>
<externalId>living3</externalId>

<externalCheckSum>checksum</externalCheckSum>

<floorplan>true</floorplan>
<titlePicture>true</titlePicture>
</common:attachment>


Example for a PDF

<common:attachment xsi:type="common:PDFDocument" xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0" xmlns:ns3="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<title>TestDocument</title>
<externalId>living3</externalId>

<externalCheckSum>checksum</externalCheckSum>

<floorplan>true</floorplan>
<titlePicture>true</titlePicture>

</common:attachment>


Example for a video

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<common:attachment xsi:type="common:StreamingVideo" xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0" xmlns:ns3="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<title>bla</title>
<externalId>kitchen2</externalId>
<externalCheckSum>checksum</externalCheckSum>

</common:attachment>


Example for a URL

<common:attachment xsi:type="common:Link" xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0" xmlns:ns3="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<title>link test</title>

<externalId>kitchen2</externalId>
<externalCheckSum>checksum</externalCheckSum><url>http://youtube</url>
</common:attachment>

 

JSON

Example for a picture

{"common.attachment": {
 
@xmlns:{"common":"http:\/\/rest.immobilienscout24.de\/schema\/common\/1.0"},
 
"@xsi.type": "common:Picture",
 
"title": "bla",

"externalId": "kitchen2",
"externalCheckSum": "checksum", 
"floorplan": "false",
 
"titlePicture": "false",
 
}}


Example for a PDF

{"common.attachment": {
 
@xmlns:{"common":"http:\/\/rest.immobilienscout24.de\/schema\/common\/1.0"},
 
"@xsi.type": "common:PDFDocument",
 
"title": "documenttitle",

"externalId": "kitchen2",
"externalCheckSum": "checksum", 
"floorplan": "true",
 
}}


Example for a video

{"common.attachment": {
 
@xmlns:{"common":"http:\/\/rest.immobilienscout24.de\/schema\/common\/1.0"},
 
"@xsi.type": "common:StreamingVideo",
 
"title": "Title"

"externalId": "kitchen2",
"externalCheckSum": "checksum", 
}}


Example for a URL

{"common.attachment": {
 
@xmlns:{"common":"http:\/\/rest.immobilienscout24.de\/schema\/common\/1.0"},
 
"@xsi.type": "common:Link",
 
"title": "urltitle",

"externalId": "kitchen2",
"externalCheckSum": "checksum", 
"url": "http://test.de/abc",
 
}}

Response

The following section includes the HTTP status code, a short description and examples for the response body content of a successful processed request.
Error responses as well as other simple message responses are described in detail within the common message responses.

 

Status 200 OK

The requested operation was successful.

Header

No special headers.

Body

XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<common:messages xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0"
    xmlns:xlink="http://www.w3.org/1999/xlink">
    <message>
        <messageCode>MESSAGE_RESOURCE_UPDATED</messageCode>
        <message>Resource [NAME] with id [ID] has been updated. </message>
    </message>
</common:messages>

 

JSON
{
  "common.messages":[
    {
      "message":{
        "messageCode":"MESSAGE_RESOURCE_UPDATED",
        "message":"Resource [NAME] with id [ID] has been updated."
      }
    }
  ]
}