Contact/DELETE

The ressource represents a contact of a realtor.

This method deletes the contact and assigns the referenced real estates to the defaul contact or to another contact.

https://rest.immobilienscout24.de/restapi/api/offer/v1.0/offer/user/{username or me}/contact/{id or ext-externalId}

  • If you delete a contact, the referenced real estates will be assigned to default contact
  • Note: Use parameter assigntocontactid to assign real estates to another contact
  • Using externalId of old contact (path parameter) and new contact (query parameter) is possible
  • Be careful if you want to delete the default contact! If you use the parameter assigntocontactid, the new contact will be the default contact.

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

  • Username: the username which the user uses for logging in to www.immobilienscout24.

  • Username: "me" can be used instead of the username, when the user is logged in by 3-legged oauth.
  • id: the unique contact ID in user account, which is being created by POST Contact automatically.
  • externalId: can be used instead of the contact ID
  • - it is the customer-defined ID of the contact: must be unique per user account
  • - use prefix "ext-", e.g .../contact/ext-firedContact

Query Parameters

  • assigntocontactid - optional, but very useful
  • - use prefix "ext-", e.g. ...?assigntocontactid=ext-hiredContact

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 200 OK - The requested operation was successful.
  • Status 412 PRECONDITION FAILED - Error while validating input for the resource.

Header

No special headers.

Body

XML

<common:messages xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0" xmlns:ns3="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:xlink="http://www.w3.org/1999/xlink">
   <message>
      <messageCode>MESSAGE_RESOURCE_DELETED</messageCode>
      <message>Resource [contact] with id [123456] has been deleted.</message>
      <id>123456</id>
   </message>
</common:messages>

JSON

{
    "common:messages": {
        "message": {
            "messageCode": "MESSAGE_RESOURCE_DELETED", 
            "message": "Resource [contact] with id [123456] has been deleted.", 
            "id": "123456"
        }
    }
}

or 412 (if you try to delete the default contact without parameter assigntocontactid)

XML

<common:messages xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0" xmlns:ns3="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:xlink="http://www.w3.org/1999/xlink">
   <message>
      <messageCode>ERROR_RESOURCE_VALIDATION</messageCode>
      <message>Error while validating input for the resource. [MESSAGE: default contact can not be deleted. Please provide assignToContactId-parameter]</message>
   </message>
</common:messages>

JSON

{
    "common:messages": {
        "@xmlns:common": "http://rest.immobilienscout24.de/schema/common/1.0", 
        "@xmlns:ns3": "http://rest.immobilienscout24.de/schema/platform/gis/1.0", 
        "@xmlns:xlink": "http://www.w3.org/1999/xlink", 
        "message": {
            "messageCode": "ERROR_RESOURCE_VALIDATION", 
            "message": "Error while validating input for the resource. [MESSAGE: default contact can not be deleted. Please provide assignToContactId-parameter]"
        }
    }
}