Skip to content

Change order of file Attachments

This method changes the order of file attachments assigned to a real estate project

PUT /offer/v1.0/user/{username}/realestateproject/{realestateprojectid}/attachment/order

Supported media types:
XML
JSON

Note

Works only for file attachments: Pictures and PDFDocuments. Links are ignored.
Attachments given in the payload will be put to the beginning in provided order.
Remaining attachments will be put in current order to the end.
Response contains new order of all file attachments.

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
attachmentId 36 characters

Ordering example

Assuming that attachment ids are:

  • 1570d590-0a54-4b61-9dd6-7672795f6a7c - picture attachment
  • e3005d38-5c8e-44b2-bf0c-c8d0c9f710d6 - PDF document attachment
  • 969e82fb-6582-4399-a962-7023b8714b97 - link attachment

and link's attachment id with pdf's attachment id will be provided in the request - expected are: pdf's attachment id (moved to the beginning) and picture's attachment id (as a remaining supported attachment). Link's attachment id will be ignored, therefore skipped in the response.

XML:

1
2
3
4
5
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:attachmentsOrder xmlns:ns2="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0">
  <attachmentId>969e82fb-6582-4399-a962-7023b8714b97</attachmentId>
  <attachmentId>e3005d38-5c8e-44b2-bf0c-c8d0c9f710d6</attachmentId>
</ns2:attachmentsOrder>

JSON:

1
2
3
4
5
6
7
8
{
  "realestateproject.attachmentsOrder": {
    "attachmentId": [
      "969e82fb-6582-4399-a962-7023b8714b97",
      "e3005d38-5c8e-44b2-bf0c-c8d0c9f710d6"
    ]
  }
}

Successful response

HTTP Code: 200

XML:

1
2
3
4
5
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:attachmentsOrder xmlns:ns2="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0">
  <attachmentId>e3005d38-5c8e-44b2-bf0c-c8d0c9f710d6</attachmentId>
  <attachmentId>1570d590-0a54-4b61-9dd6-7672795f6a7c</attachmentId>
</ns2:attachmentsOrder>

JSON:

1
2
3
4
5
6
7
8
{
  "realestateproject.attachmentsOrder": {
    "attachmentId": [
      "e3005d38-5c8e-44b2-bf0c-c8d0c9f710d6",
      "1570d590-0a54-4b61-9dd6-7672795f6a7c"
    ]
  }
}

Unsuccessful responses

Invalid attachmentId

HTTP Code: 412

XML:

1
2
3
4
5
6
7
8
9
<?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: attachmentIds : [invalid_attachment_id_1, invalid_attachment_id_2] : LENGTH_EXCEEDED_OR_TOO_SMALL]</message>
    </message>
</common:messages>

JSON:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "common.messages": [
        {
            "message": {
                "messageCode": "ERROR_RESOURCE_VALIDATION",
                "message": "Error while validating input for the resource. [MESSAGE: attachmentIds : [invalid_attachment_id_1, invalid_attachment_id_2] : LENGTH_EXCEEDED_OR_TOO_SMALL]"
            }
        }
    ]
}