Assign Attachment to Real Estate project
This method assigns an attachment to a real estate project
POST /offer/v1.0/user/{username}/realestateproject/{realestateprojectid}/attachment
Note
Supports assigning file (Picture, PDFDocument) and Link attachments.
Picture types supported: COMPANY_LOGO, PROJECT_LOGO, IMAGE.
PDFDocument types supported: BROCHURE.
Link types supported: VIRTUAL_TOUR.
Link's attachmentId is generated and returned as a result of assignment (no attachmentId in payload).
File attachments have to be uploaded first using upload ticket.
File's attachmentId is generated and returned by upload ticket, assignment is used to set type of successfully uploaded file (attachmentId mandatory in payload).
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
Only for Picture and PDFDocument This is an attachmentId returned in upload ticket |
pictureType |
enum: {COMPANY_LOGO, PROJECT_LOGO, IMAGE}
Only for Picture |
title |
3-100 characters, no html, allowed characters: 0-9, a-z, A-Z, \s, and üÜäÄöÖß,.-+()!&%"/€@:;
Only for Picture of IMAGE type |
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:
1 2 3 4 5 6 7 |
|
JSON:
1 2 3 4 5 6 7 8 |
|
PDFDocument
XML:
1 2 3 4 5 6 |
|
JSON:
1 2 3 4 5 6 7 |
|
Link
XML:
1 2 3 4 5 6 7 |
|
JSON:
1 2 3 4 5 6 7 |
|
Successful response
HTTP Code: 201
Headers: Location: /restapi/api/offer/v1.0/user/me/realestateproject/999/attachment/ac050ef7-f6e2-4451-8276-6206ba4fd653
XML:
1 2 3 4 5 6 7 8 9 |
|
JSON:
1 2 3 4 5 6 7 8 9 10 11 |
|
Unsuccessful responses
Exceeded number of items
HTTP Code: 412
XML:
1 2 3 4 5 6 7 8 9 |
|
JSON:
1 2 3 4 5 6 7 8 9 10 |
|
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]
Files not uploaded prior to assignment
HTTP Code: 404
XML:
1 2 3 4 5 6 7 8 9 |
|
JSON:
1 2 3 4 5 6 7 8 9 10 |
|
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 |
|
JSON:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
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]