Assign Real Estate to a project
This method adds a real estate to a project. It is also possible to add a list of real estates
POST /offer/v1.0/user/{username}/realestateproject/{realEstateProjectId}/realestateprojectentry
Note
You can use your own object ID (externalId) by POSTing a real estate to a project.
Use instead of in your body, so you don't need the prefix "ext-".
It's necessary to publish the project before adding a real estate to it.
Projects booked as "BASIC" product have a limit of 15 real estates.
Request
Path Parameters
PARAMETER |
DESCRIPTION |
Username |
the username which the user uses for logging in to www.immobilienscout24 |
me |
"me" can be used instead of the username, when the user is logged in by 3-legged oauth |
realestateprojectid |
the unique project ID, generated by IS24 when posting a real estate project |
XML:
| <realestateproject:realEstateProjectEntries xmlns:realestateproject="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ns4="http://rest.immobilienscout24.de/schema/platform/gis/1.0">
<realEstateProjectEntry>
<realEstateId>123456</realEstateId>
</realEstateProjectEntry>
<realEstateProjectEntry>
<realEstateExternalId>myRealEstate</realEstateExternalId>
</realEstateProjectEntry>
</realestateproject:realEstateProjectEntries>
|
Successful response
HTTP Code: 200
XML:
1
2
3
4
5
6
7
8
9
10
11
12
13 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<realestateproject:realEstateProjectEntries xmlns:realestateproject="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ns4="http://rest.immobilienscout24.de/schema/platform/gis/1.0">
<realEstateProjectEntry>
<messageCode>MESSAGE_RESOURCE_CREATED</messageCode>
<message>real estate with id 123456 was added to project 987</message>
<realEstateId>62455263</realEstateId>
</realEstateProjectEntry>
<realEstateProjectEntry>
<messageCode>MESSAGE_RESOURCE_CREATED</messageCode>
<message>real estate with external id myRealEstate was added to project 987</message>
<realEstateExternalId>myRealEstate</realEstateExternalId>
</realEstateProjectEntry>
</realestateproject:realEstateProjectEntries>
|
JSON:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 | {
"realestateproject.realEstateProjectEntries":[
{
"realEstateProjectEntry":{
"messageCode":"MESSAGE_RESOURCE_CREATED",
"message":"real estate with id 123456 was added to project 987",
"realEstateId":123456
}
},
{
"realEstateProjectEntry":{
"messageCode":"MESSAGE_RESOURCE_CREATED",
"message":"real estate with external id myRealEstate was added to project 987",
"realEstateExternalId":"myRealEstate"
}
}
]
}
|
Unsuccessful responses
Project has no active publication contract
HTTP Code: 409
XML:
| <?xml version="1.0" encoding="UTF-8"?>
<ns2:realEstateProjectEntries
xmlns:ns2="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0"
xmlns:ns3="http://www.w3.org/1999/xlink">
<realEstateProjectEntry>
<messageCode>ERROR_COMMON_UNPROCESSABLE_ENTITY</messageCode>
<message>Can not add real estate to not published project!</message>
<realEstateId>123456</realEstateId>
<realEstateExternalId>myOtherRealEstate</realEstateExternalId>
</realEstateProjectEntry>
</ns2:realEstateProjectEntries>
|
JSON:
1
2
3
4
5
6
7
8
9
10
11
12 | {
"realestateproject.realEstateProjectEntries": [
{
"realEstateProjectEntry": {
"messageCode": "ERROR_COMMON_UNPROCESSABLE_ENTITY",
"message": "Can not add real estate to not published project!",
"realEstateId": 123456,
"realEstateExternalId": "myOtherRealEstate"
}
}
]
}
|
Limit exceeded for allowed number of real estate objects on Basic project
HTTP Code: 422
XML:
| <?xml version="1.0" encoding="UTF-8"?>
<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_COMMON_UNPROCESSABLE_ENTITY</messageCode>
<message>Could not add more than 15 units to basic project with id [987]</message>
</message>
</common:messages>
|
JSON:
| {
"common.messages":[
{
"message":{
"messageCode":"ERROR_COMMON_UNPROCESSABLE_ENTITY",
"message":"Could not add more than 15 units to basic project with id [987]"
}
}
]
}
|
Request is unprocessable
Requests that return a success status code, but could not be processed.
HTTP Code: 200
XML:
| <?xml version="1.0" encoding="UTF-8"?>
<ns2:realEstateProjectEntries
xmlns:ns2="http://rest.immobilienscout24.de/schema/offer/realestateproject/1.0"
xmlns:ns3="http://www.w3.org/1999/xlink">
<realEstateProjectEntry>
<messageCode>ERROR_COMMON_UNPROCESSABLE_ENTITY</messageCode>
<message>[potential error message see below]</message>
<realEstateId>123456</realEstateId>
<realEstateExternalId>myOtherRealEstate</realEstateExternalId>
</realEstateProjectEntry>
</ns2:realEstateProjectEntries>
|
JSON:
1
2
3
4
5
6
7
8
9
10
11
12 | {
"realestateproject.realEstateProjectEntries": [
{
"realEstateProjectEntry": {
"messageCode": "ERROR_COMMON_UNPROCESSABLE_ENTITY",
"message": "[potential error message see below]",
"realEstateId": 123456,
"realEstateExternalId": "myOtherRealEstate"
}
}
]
}
|
potential error messages |
Can't find real estate with id [123456]. |
Type of real estate not assignable to project. |
The real estate with id [123456] is already assigned to project 987 |