Update Attachment of Real Estate project
This method updates an attachment of a real estate project
PUT /offer/v1.0/user/{username}/realestateproject/{realestateprojectid}/attachment
Note
Supports updating file (Picture, PDFDocument) and Link attachments.
Picture types supported: COMPANY_LOGO, PROJECT_LOGO, IMAGE.
PDFDocument types supported: BROCHURE.
Link types supported: VIRTUAL_TOUR.
Contract constraints
- Multiple Pictures of type IMAGE can be added to all types of Product
- Single Link of type VIRTUAL_TOUR can be added to all types of Product
- Single PDFDocument of type BROCHURE can be added to PROFESSIONAL Product
- Single Picture of type COMPANY_LOGO can be added to PROFESSIONAL Product
- Single Picture of type PROJECT_LOGO can be added to PROFESSIONAL Product
Request
Path Parameters
PARAMETER |
DESCRIPTION |
username |
the username which the user uses for logging in to www.immobilienscout24.de
"me" can be used instead of the username, when the user is logged in by 3-legged OAuth 1.0
|
realestateprojectid |
the unique project ID, generated by IS24 when posting a real estate project |
Payload
PARAMETER |
CONSTRAINTS |
(attribute) type |
enum: {Picture, PDFDocument, Link} |
(attribute) id |
36 characters
|
pictureType |
enum: {COMPANY_LOGO, PROJECT_LOGO, IMAGE}
Only for Picture
|
title |
3-100 characters, no html
Only for Picture
|
pdfDocumentType |
enum: {BROCHURE}
Only for PDFDocument
|
url |
valid url
Only for Link Only supported virtual tour service, when VIRTUAL_TOUR type selected
|
linkType |
enum: {VIRTUAL_TOUR}
Only for Link
|
Picture
XML:
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:attachment xmlns:ns2="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns2:Picture" id="ac050ef7-f6e2-4451-8276-6206ba4fd653">
<pictureType>IMAGE</pictureType>
<title>some title</title>
</ns2:attachment>
|
JSON:
| {
"realestateproject.attachment": {
"@xsi.type": "realestateproject:Picture",
"@id": "ac050ef7-f6e2-4451-8276-6206ba4fd653",
"pictureType": "IMAGE",
"title": "some title"
}
}
|
PDFDocument
XML:
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:attachment xmlns:ns2="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns2:PDFDocument" id="c48cf855-b328-4679-abb8-b6bbf5492114">
<pdfDocumentType>BROCHURE</pdfDocumentType>
</ns2:attachment>
|
JSON:
| {
"realestateproject.attachment": {
"@xsi.type": "realestateproject:PDFDocument",
"@id": "c48cf855-b328-4679-abb8-b6bbf5492114",
"pdfDocumentType": "BROCHURE"
}
}
|
Link
XML:
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:attachment xmlns:ns2="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns2:Link" id="fb7fc504-4048-4f9a-ae50-7be5edee4673">
<url>https://virtualtours.immobilienscout24.de/portal/tour/1234</url>
<linkType>VIRTUAL_TOUR</linkType>
</ns2:attachment>
|
JSON:
| {
"realestateproject.attachment": {
"@xsi.type": "realestateproject:Link",
"@id": "fb7fc504-4048-4f9a-ae50-7be5edee4673",
"url": "https:\/\/virtualtours.immobilienscout24.de\/portal\/tour\/1234",
"linkType": "VIRTUAL_TOUR"
}
}
|
Successful response
HTTP Code: 200
Headers: Location: /restapi/api/offer/v1.0/user/me/realestateproject/999/attachment/ac050ef7-f6e2-4451-8276-6206ba4fd653
XML:
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<common:messages xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0"
xmlns:gis="http://rest.immobilienscout24.de/schema/platform/gis/1.0">
<message>
<messageCode>MESSAGE_RESOURCE_UPDATED</messageCode>
<message>Resource [attachment] with id [ac050ef7-f6e2-4451-8276-6206ba4fd653] has been updated.</message>
<id>ac050ef7-f6e2-4451-8276-6206ba4fd653</id>
</message>
</common:messages>
|
JSON:
| {
"common.messages": [
{
"message": {
"messageCode": "MESSAGE_RESOURCE_UPDATED",
"message": "Resource [attachment] with id [ac050ef7-f6e2-4451-8276-6206ba4fd653] has been updated.",
"id": "ac050ef7-f6e2-4451-8276-6206ba4fd653"
}
}
]
}
|
Unsuccessful responses
Exceeded number of items
HTTP Code: 412
XML:
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<common:messages
xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0"
xmlns:gis="http://rest.immobilienscout24.de/schema/platform/gis/1.0">
<message>
<messageCode>ERROR_RESOURCE_VALIDATION</messageCode>
<message>Error while validating input for the resource. [MESSAGE: linkType : VIRTUAL_TOUR : attachment.linkType.numberOfItemsExceeded]</message>
</message>
</common:messages>
|
JSON:
| {
"common.messages": [
{
"message": {
"messageCode": "ERROR_RESOURCE_VALIDATION",
"message": "Error while validating input for the resource. [MESSAGE: linkType : VIRTUAL_TOUR : attachment.linkType.numberOfItemsExceeded]"
}
}
]
}
|
Other possible error messages:
Error while validating input for the resource. [MESSAGE: pdfDocumentType : BROCHURE : attachment.pdfDocumentType.numberOfItemsExceeded]
Error while validating input for the resource. [MESSAGE: pictureType : COMPANY_LOGO : attachment.pictureType.numberOfItemsExceeded]
Error while validating input for the resource. [MESSAGE: pictureType : PROJECT_LOGO : attachment.pictureType.numberOfItemsExceeded]
Error while validating input for the resource. [MESSAGE: pdfDocumentType : BROCHURE : attachment.pdfDocumentType.deniedForProduct]
Error while validating input for the resource. [MESSAGE: pictureType : COMPANY_LOGO : attachment.pictureType.deniedForProduct]
Error while validating input for the resource. [MESSAGE: pictureType : PROJECT_LOGO : attachment.pictureType.deniedForProduct]
Attachment not found or Attachment is of different type
HTTP Code: 404
XML:
| <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<common:messages
xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0"
xmlns:gis="http://rest.immobilienscout24.de/schema/platform/gis/1.0">
<message>
<messageCode>ERROR_RESOURCE_NOT_FOUND</messageCode>
<message>Resource [attachment] with id [2e2a7dd7-f746-4087-ac76-8dbf959d5c78] was not found.</message>
</message>
</common:messages>
|
JSON:
| {
"common.messages": [
{
"message": {
"messageCode": "ERROR_RESOURCE_NOT_FOUND",
"message": "Resource [attachment] with id [2e2a7dd7-f746-4087-ac76-8dbf959d5c78] was not found."
}
}
]
}
|
Invalid payload (missing or invalid url, type, id)
HTTP Code: 412
XML:
1
2
3
4
5
6
7
8
9
10
11
12
13 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<common:messages
xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0"
xmlns:gis="http://rest.immobilienscout24.de/schema/platform/gis/1.0">
<message>
<messageCode>ERROR_RESOURCE_VALIDATION</messageCode>
<message>Error while validating input for the resource. [MESSAGE: id : some_invalid_id : LENGTH_EXCEEDED_OR_TOO_SMALL]</message>
</message>
<message>
<messageCode>ERROR_RESOURCE_VALIDATION</messageCode>
<message>Error while validating input for the resource. [MESSAGE: pictureType : null : MANDATORY_FIELD_EMPTY]</message>
</message>
</common:messages>
|
JSON:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 | {
"common.messages": [
{
"message": [
{
"messageCode": "ERROR_RESOURCE_VALIDATION",
"message": "Error while validating input for the resource. [MESSAGE: id : some_invalid_id : LENGTH_EXCEEDED_OR_TOO_SMALL]"
},
{
"messageCode": "ERROR_RESOURCE_VALIDATION",
"message": "Error while validating input for the resource. [MESSAGE: pictureType : null : MANDATORY_FIELD_EMPTY]"
}
]
}
]
}
|
Other possible error messages:
Error while validating input for the resource. [MESSAGE: pdfDocumentType : null : MANDATORY_FIELD_EMPTY]
Error while validating input for the resource. [MESSAGE: url : some_invalid_url : INVALID_URL]
Error while validating input for the resource. [MESSAGE: linkType : null : MANDATORY_FIELD_EMPTY]
Error while validating input for the resource. [MESSAGE: title : ae : LENGTH_EXCEEDED_OR_TOO_SMALL]
Error while validating input for the resource. [MESSAGE: title : ąę : INVALID_CHARACTERS]