Publish

Publish/Post

Creates a new resource of the requested type specified by the following URL.This method publishes a list of real estate objects in one or more publish channels.

You can use POSTbyID if you want to publish a single real estate object.

https://rest.immobilienscout24.de/restapi/api/offer/v1.0/publish/list/

 

  • Use the web service GET PUBLISHCHANNEL to obtain the publish channel ids, in which the realtor is allowed to publish objects in
  • You must provide the following HTTP headers:
    • Accept: application/json or application/xml
    • Content-Type: application/json or application/xml
  • In general, every customer can publish in both publish channels "10000" (Immobilienscout24.de) and "10001" ("customer homeage").

 

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

none

Body

XML

 

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<common:publishObjects xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0">

<publishObject>

<realEstate id="70628039"/>

<publishChannel id="10000"/>

</publishObject>

<publishObject>

<realEstate id="70628039"/>

<publishChannel id="10000"/>

</publishObject>

<publishObject>

<realEstate id="1706280392"/>

<publishChannel id="10000"/>

</publishObject>

</common:publishObjects>

JSON

 

 

{

    "common.publishObjects": {

        "publishObject": [

            {

                "realEstate": {

                    "@id": "62634554"

                },

                "publishChannel": {

                    "@id": "10000"

                }

            },

            {

                "realEstate": {

                    "@id": "62634554"

                },

                "publishChannel": {

                    "@id": "10001"

                }

            }

        ]

    }

}

 

 

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 201 Created

This status code is returned after a new entity of a resource was successfully created.

 

Header

Location Link to the newly created resource.

 

Body

XML

 

 

<common:publishObjects xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0" xmlns:xlink="http://www.w3.org/1999/xlink">

<publishObject id="70628039_10000">

<realEstate id="70628039"/>

<publishChannel id="10000"/> <messageCode>MESSAGE_OPERATION_SUCCESSFUL</messageCode>

<message>real estate published</message>

</publishObject>

<publishObject>

<realEstate id="70628039"/>

<publishChannel id="10000"/> <messageCode>ERROR_COMMON_REQUEST_CONFLICT</messageCode>

<message>[Publish object already exists for publishchannel id=10000, realestate id=70628039]</message>

</publishObject>

<publishObject>

<realEstate id="1706280392"/>

<publishChannel id="10000"/>

<messageCode>ERROR_COMMON_RESOURCE_NOT_FOUND</messageCode>

<message>[Could not publish real estate with id: 1706280392 because it does not exist.]</message>

</publishObject>

</common:publishObjects>

</common:messages>

 

 

 

JSON

 

 

{

  "common.publishObjects":[

    {

      "publishObject":[

        {

          "@id":"62634554_10000",

          "realEstate":{

            "@id":"62634554",

            "@firstActivationDate":"2015-02-12T12:19:45.197+01:00"

          },

          "publishChannel":{

            "@id":"10000"

          },

          "messageCode":"MESSAGE_OPERATION_SUCCESSFUL",

          "message":"real estate published"

        },

        {

          "@id":"62634554_10001",

          "realEstate":{

            "@id":"62634554"

          },

          "publishChannel":{

            "@id":"10001"

          },

          "messageCode":"MESSAGE_OPERATION_SUCCESSFUL",

          "message":"real estate published"

        }

      ]

    }

  ]

}