"duplicated contactDetails" trying to insert a new contact

368 views
Skip to first unread message

Cosmin Calinescu

unread,
Jan 17, 2014, 6:28:29 PM1/17/14
to immobilienscou...@googlegroups.com
 
It is the first time when I use WEBAPI with this agent.
 
First I check if the agent exists:

REQUEST:
GET
https://rest.sandbox-immobilienscout24.de/restapi/api/offer/v1.0/user/me/contact/ext-350461002 HTTP/1.1
Authorization: OAuth oauth_consumer_key="testzugang-import-api-remaxKey",oauth_nonce="adij5qvbbgueqo2x",oauth_signature="x8Lwm9MQwLeG86TjZ6FWTMlLOHc%3D",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1390000133",oauth_token="532670cf-77ae-4544-9db0-60ab599b086b",oauth_version="1.0"
Accept: application/xml
User-Agent: RestSharp/104.4.0.0
Host: rest.sandbox-immobilienscout24.de
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
 
RESPONSE:
HTTP/1.1 404 Not Found
Server: Apache-Coyote/1.1
Date: Fri, 17 Jan 2014 23:08:55 GMT
Content-Type: application/xml;charset=UTF-8
Content-Length: 442
Set-Cookie: immobilienscout24_persist=57677322.20480.0000; path=/
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<common:messages xmlns:xlink="
http://www.w3.org/1999/xlink" xmlns:ns3="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0">
    <message>
        <messageCode>ERROR_RESOURCE_NOT_FOUND</messageCode>
        <message>Resource [Contact] with id [ext-350461002] not found. </message>
    </message>
</common:messages>
 
The contact does not exist.
Then I try to insert the contact and I get "The operation for your request causes a conflict. [MESSAGE: duplicated contactDetails:59377431]", see below:
 
REQUEST:
POST
https://rest.sandbox-immobilienscout24.de/restapi/api/offer/v1.0/user/me/contact HTTP/1.1
Authorization: OAuth oauth_consumer_key="testzugang-import-api-remaxKey",oauth_nonce="fzg44yk4djhsqljs",oauth_signature="k8LSgDzftIir5o6ZoQVQXDIUthY%3D",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1390000147",oauth_token="532670cf-77ae-4544-9db0-60ab599b086b",oauth_version="1.0"
Accept: application/xml
User-Agent: RestSharp/104.4.0.0
Content-Type: application/xml
Host: rest.sandbox-immobilienscout24.de
Content-Length: 706
Accept-Encoding: gzip, deflate
 
<?xml version="1.0" encoding="utf-8"?>
<q1:realtorContactDetail xmlns:q1="
http://rest.immobilienscout24.de/schema/common/1.0">
  <email>lotha...@remax.de</email>
  <firstname>Lothar</firstname>
  <lastname>Rist</lastname>
  <address>
    <street>Frickenhäuser Str. 10</street>
    <houseNumber>-</houseNumber>
    <postcode>72622</postcode>
    <city>Nürtingen</city>
  </address>
  <countryCode>DEU</countryCode>
  <homepageUrl>www.remax-immobilien-nuertingen.de</homepageUrl>
  <defaultContact>false</defaultContact>
  <localPartnerContact>false</localPartnerContact>
  <businessCardContact>false</businessCardContact>
  <externalId>350461002</externalId>
</q1:realtorContactDetail>
 
RESPONSE:
HTTP/1.1 409 Conflict
Server: Apache-Coyote/1.1
Date: Fri, 17 Jan 2014 23:09:07 GMT
Content-Type: application/xml;charset=UTF-8
Content-Length: 488
Set-Cookie: immobilienscout24_persist=57677322.20480.0000; path=/
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<common:messages xmlns:xlink="
http://www.w3.org/1999/xlink" xmlns:ns3="http://rest.immobilienscout24.de/schema/platform/gis/1.0" xmlns:common="http://rest.immobilienscout24.de/schema/common/1.0">
    <message>
        <messageCode>ERROR_COMMON_REQUEST_CONFLICT</messageCode>
        <message>The operation for your request causes a conflict. [MESSAGE: duplicated contactDetails:59377431]</message>
    </message>
</common:messages>
 
What is wrong?
 
 

 

Rob Bors

unread,
Jan 18, 2014, 5:19:08 AM1/18/14
to immobilienscout24-development

Please call all contacts: GET https://rest.sandbox-immobilienscout24.de/restapi/api/offer/v1.0/user/me/contact and check, if the contact with is24 I'd indeed has the external ID 350461002.

--
Sie erhalten diese Nachricht, weil Sie Mitglied der Google Groups-Gruppe "immobilienscout24-development" sind.
Um Ihr Abonnement für diese Gruppe zu beenden und keine E-Mails mehr von dieser Gruppe zu erhalten, senden Sie eine E-Mail an immobilienscout24-de...@googlegroups.com.
Wenn Sie Nachrichten in dieser Gruppe posten möchten, senden Sie eine E-Mail an immobilienscou...@googlegroups.com.
Gruppe besuchen: http://groups.google.com/group/immobilienscout24-development
Besuchen Sie https://groups.google.com/d/msgid/immobilienscout24-development/27a8cf79-0492-493d-a028-05335f68cfa7%40googlegroups.com, um diese Diskussion im Web anzuzeigen.
Weitere Optionen: https://groups.google.com/groups/opt_out

Cosmin Calinescu

unread,
Jan 23, 2014, 1:56:47 PM1/23/14
to immobilienscou...@googlegroups.com
I do not understand why I have to lose time with this test.
  • I call your API for the contact by externalID
  • The API is telling me that no contact exist
  • I try to insert
  • API throw an error that a duplicate exists
Here IS24 is checking what is wrong.
 
By the way, the next time I ran the application the error did not show anymore. Maybe was a glitch.
 

Torsten Fuss

unread,
Jan 30, 2014, 4:36:48 AM1/30/14
to immobilienscou...@googlegroups.com
The problem appears here sometimes, too...
I want to insert a NEW contact (id=0) and the error occurs.

Cosmin Calinescu

unread,
Feb 18, 2014, 10:46:54 AM2/18/14
to immobilienscou...@googlegroups.com
Hi IS24,
 
Any answer on this issue?

Christian Rosenau

unread,
Apr 8, 2014, 5:10:06 AM4/8/14
to immobilienscou...@googlegroups.com
Wenn ich einen Kontakt-Datensatz anlege und danach noch einen mit den gleichen Angaben, jedoch einer anderen external-ID, so kommt eine entsprechende Fehlermeldung (duplicated contactDetails). Die API prüft also offenbar die Inhalte der Felder auf doppelte Datensätze (ohne externalID zu berücksichtigen?).
Als wir mit der Implementierung angefangen hatten, war dies scheinbar noch nicht der Fall, da meine Testcases erst jetzt fehlschlagen.
Das ist nun insofern etwas blöd, da sich durch dieses (undokumentierte) Verhalten der komplette Update-Ablauf ändert. 
Bisher habe ich anhand der externalId geprüft, ob der Kontakt existiert. Falls nein, habe ich ihn über die API angelegt. Falls ja, habe ich ihn aktualisiert. Die Referenz auf den Kontakt via external-Id im Estate-Schema konnte dadurch einfach erhalten bleiben.
Das aktuelle Verhalten führt jedenfalls die ganze Verwendung einer externalId für den Kontakt ad absurdum, da man damit nicht mehr arbeiten kann. (Und nein, ich kann nicht effektiv verhindern, dass es in meiner Anwendung Datensätze mit identischen IS24-relevanten Angaben gibt)

Was sollen wir nun machen? Stets stumpf versuchen, den Kontakt anzulegen und bei ner Fehlermeldung dann die gelieferte Scout-ID nehmen?

Fabian Mielke | Team API

unread,
Apr 11, 2014, 7:55:42 AM4/11/14
to immobilienscou...@googlegroups.com
Hello all,

how Christian realized rightly, we make a duplicate check with several fields of the contact. If there are many similarities, we throughout a "ERROR_COMMON_REQUEST_CONFLICT". Consequently we dont't check only the ext-ID.

At implementation of this function we acted very customer driven. We found many duplicated contacts in many customer accounts and we want to produce a clear database for our customers. With this duplicate check we avoid duplicated contacts and this was our goal. 

@Christian: Du solltest einen GET Contact mit ext-ID machen können. Falls dieser Request erfolgreich ist, mach einen PUT, falls nicht, mach einen POST.

Christian Rosenau

unread,
Apr 11, 2014, 8:42:45 AM4/11/14
to immobilienscou...@googlegroups.com
Sorry for writing in german and thanks for the info about the duplicate check.

But the problem is:
I am doing like you proposed.
I do a GET Contact with ext-ID. If it tells me the contact exists, I do a PUT to update the infos. No problem with that.
But if the Api tells me, the contact does not exist, I decide to create a new one. But when doing a POST with this ext-ID and the contact details I get this DUPLICATE CONTENT error.
So the GET-Call with ext-ID does not give a proper answer to the question if the contact does exist.

So the problem is, that I can't use my contact ext-ID anywhere. I am using it in the estate xml data to refer to the contact, but when creation of the contact failed it refers to a non existing contact.
We do not want to store scout-IDs in our application. So the result is, that our application has two contact datasets while immoscout only has one. And I don't have a clue how to handle that the proper way.

Fabian Mielke | Team API

unread,
Apr 12, 2014, 8:11:27 PM4/12/14
to immobilienscou...@googlegroups.com
Hey Christian,

usually german is okay, but to help Cosmin, too, let's talk english.

I am using it in the estate xml data to refer to the contact, but when creation of the contact failed it refers to a non existing contact.
No, it always refers to the default contact.

Your goal and the goal of IS24 is not to have duplicated contacts, right? So, why aren't you satisfied with "ERROR_COMMON_REQUEST_CONFLICT"? That means that this contact is very similar to another one. 

1st UseCase - contact exists by GETbyID:
  1. GET Contact ext-ID -> OK
  2. PUT Contact -> OK
  3. Good.
2nd UseCase - contact doesn't exist by GETbyID:
  1. GET Contact ext-ID -> FAIL
  2. POST Contact with ext-ID -> FAIL
  3. Okay, the contact does exist, just has an unknwon ext-ID
It's not the programming way of thinking, but economic it is, because the goal is reached.

We do not want to store scout-IDs in our application.
Do you think your problem is solved if we put out the ext-ID within error message "ERROR_COMMON_REQUEST_CONFLICT" like this:

<message>
 <messageCode>ERROR_COMMON_REQUEST_CONFLICT</messageCode>
 <message>The operation for your request causes a conflict. [MESSAGE: duplicated contactDetails:59391829;EXTERNALID]</message>
</message> 

Regards,
Fabian

Armin Deeg

unread,
Apr 14, 2014, 8:08:59 AM4/14/14
to immobilienscou...@googlegroups.com
Fabian, can you please describe which fields are checked when checking for duplicates

Thanks
Armin

Fabian Mielke

unread,
Apr 14, 2014, 11:10:17 AM4/14/14
to immobilienscou...@googlegroups.com
Hi Armen,

no problem: salutation, first name, last name, street, housenumber, zip, city, country code, phone, fax, cell phone, homepage, email.

Regards, Fabian

Christian Rosenau

unread,
Apr 15, 2014, 7:33:50 AM4/15/14
to immobilienscou...@googlegroups.com
Hi Fabian,

I can understand your reasons for this behaviour. It just would be nice, If such relevant things would be part of the wiki, instead of letting us guess around. ;)
But please don't change anything in the error message. Such (small and fast) changes are the things which produce most of the errors/misunderstandings/inconsistencies to the api and its documentation.
I am now using the error message to extract the scout-id of the contact. With it I am getting the contact data which contains the external-id I am now using as referer. So there is no real need to extend the message.

Fabian Mielke

unread,
Apr 15, 2014, 10:03:51 AM4/15/14
to immobilienscou...@googlegroups.com
>I am now using the error message to extract the scout-id of the contact. With it I am getting the contact data which contains the external-id I am now using as referer.
That was my purpose and it would be easier with the ext-ID, but this way is better. Good luck!

>It just would be nice, If such relevant things would be part of the wiki, instead of letting us guess around. ;)
We are working on it.

Please close that topic, Christian. Thank you!
Message has been deleted

dekstar23

unread,
May 2, 2014, 5:11:06 AM5/2/14
to immobilienscou...@googlegroups.com
We have similar problems and cannot understand the logic behind the duplicate check. 

How many fields must two contacts have in common to be treated as duplicates? 
Can you please offer us the exact logic? 

There are many reasons why two contacts have things in common, but should exist on their own. 
For example a mobile number of a contact should only be visible in real estate A, not in real estate B. 

Andreas Pfiz

unread,
May 2, 2014, 5:23:54 AM5/2/14
to immobilienscou...@googlegroups.com
same Problem here (Offer A with mobile number, Offer B without)

Fabian Mielke

unread,
May 12, 2014, 10:58:06 AM5/12/14
to immobilienscou...@googlegroups.com
Hey guys,

the logic behind that duplicated check is simple I guess. Only if there are all fields similar, it is handled as a duplicate.

That means leaving out the phoneNumber or changing the phone number at just one sign, it is no duplicate anymore. I checked that recently and it works.

Kind regards,
Fabian

Cosmin Calinescu

unread,
Aug 5, 2014, 5:31:15 PM8/5/14
to immobilienscou...@googlegroups.com

Contact might have the same data as another contact in IS24 database but for me it has a different external ID.
When I try to get the contact by the external ID, the API is telling me that is no such contact. So I try create new one.
I do not need the contact that maybe exist in IS24 with a different external ID. I need this current ID to be in the db.

Fabian Mielke

unread,
Aug 6, 2014, 9:42:33 AM8/6/14
to immobilienscou...@googlegroups.com
>When I try to get the contact by the external ID, the API is telling me that is no such contact. 
Did you made a GETALL Contact request to verify that there really exists your used contact ext-id? Doc: http://api.immobilienscout24.de/our-apis/import-export/contact/get-all.html

Cosmin Calinescu

unread,
Aug 6, 2014, 11:26:33 AM8/6/14
to immobilienscou...@googlegroups.com
I did not do a GETALL.
I only tried to get the info for one contact using the contact external-ID http://rest.immobilienscout24.de/restapi/api/offer/v1.0/user/{username}/contact/ext-a001
This is all I am interested in. If I have or not on IS24 a contact with this external-ID.

Probably you are trying to suggest that maybe I should download the entire contact list and if I find a contact that match for name, phone, email etc I should use that contact ID no matter that the external-ID will be different. This will not happen. It is much easier/convenient for me to manage the contacts by their external ID.

Or if you try to suggest that maybe the GETALL will return my contact but get by external-ID won't, then you have a problem that you need to solve.

Anyway, I have advised the client to enter to IS24 web admin section and manually delete the duplicated agent.

I do not know if the issue is still repeating now since I did not get another complain.

Thanks Fabian and I will let you know if something new come up.



2014-08-06 9:42 GMT-04:00 Fabian Mielke <1fabian...@gmail.com>:
>When I try to get the contact by the external ID, the API is telling me that is no such contact. 
Did you made a GETALL Contact request to verify that there really exists your used contact ext-id? Doc: http://api.immobilienscout24.de/our-apis/import-export/contact/get-all.html

--
Sie erhalten diese Nachricht, weil Sie in Google Groups ein Thema der Gruppe "immobilienscout24-development" abonniert haben.
Wenn Sie sich von diesem Thema abmelden möchten, rufen Sie https://groups.google.com/d/topic/immobilienscout24-development/xkQiNp9tWKQ/unsubscribe auf.
Wenn Sie sich von dieser Gruppe und allen Themen dieser Gruppe abmelden möchten, senden Sie eine E-Mail an immobilienscout24-de...@googlegroups.com.
Wenn Sie in dieser Gruppe einen Beitrag posten möchten, senden Sie eine E-Mail an immobilienscou...@googlegroups.com.
Gruppe besuchen: http://groups.google.com/group/immobilienscout24-development
Wenn Sie diese Diskussion im Web verfolgen möchten, rufen Sie https://groups.google.com/d/msgid/immobilienscout24-development/98b8c2d5-39ca-40bd-bfa3-0bef4ba89040%40googlegroups.com auf.
Weitere Optionen finden Sie unter https://groups.google.com/d/optout.

Fabian Mielke

unread,
Aug 19, 2014, 11:03:43 AM8/19/14
to immobilienscou...@googlegroups.com
I did not do a GETALL.

It would be helpful, if you do this request. You get a response with information about every contact including the externalId. Consequently you see whether your ext-contact actually exists or not. After this request you can verify your answer with a GETbyExtID request like you mentioned.

Kind regards, Fabian 

Marco Vreydal

unread,
Oct 16, 2014, 6:18:24 AM10/16/14
to immobilienscou...@googlegroups.com
We are handling this problem as follows:

The error message returns you the ID of the already existing contact. So we can use this id and add it to the publish-request.
Anyways we have to parse the ID out of the error message - maybe you can add another field to the response where just the ID of the existing contact is provided.

I can understand this check, but specially when you have got big customers with thousands of addresses, then a duplicated one is very common.

Fabian Mielke | IS24

unread,
Oct 16, 2014, 6:58:31 AM10/16/14
to immobilienscou...@googlegroups.com
Thank you Marco,

we are planning to improve our error messages and the extra field will be a feature that we will implement. Thank you for constrictive your change request!

You say the duplicate check is common in some cases, do you think we should compare more fields?

Marco Vreydal

unread,
Oct 17, 2014, 3:00:58 AM10/17/14
to immobilienscou...@googlegroups.com
Thats great news! :)

No I would not compare more fields - I like the fact, that duplicates are prevented and with that response-change you mentioned it will be pretty easy to react on such a duplicate. :)

Christian Rosenau

unread,
Nov 12, 2015, 9:07:06 AM11/12/15
to immobilienscout24-development
Now the API changed AGAIN without mentioning. Now the error message regarding duplicated contacts no longer contains the Scout-ID of the existing contact. So we are not able to use the existing contact anymore. What shall we do now?

Before:
    <message>
        <messageCode>ERROR_COMMON_REQUEST_CONFLICT</messageCode>
        <message>The operation for your request causes a conflict. [MESSAGE: duplicated contactDetails:SCOUT-ID-OF-EXISTING-CONTACT]</message>
    </message>

Now:
    <message>
        <messageCode>ERROR_COMMON_REQUEST_CONFLICT</messageCode>
        <message>The operation for your request causes a conflict. [MESSAGE: duplicated contactDetails]</message>
    </message>

docKHS

unread,
Nov 13, 2015, 4:18:14 AM11/13/15
to immobilienscout24-development
We have the same Problem now. Please send the ContactID from the existing contact again.

Thanks

Fabian Mielke@ImmobilienScout24

unread,
Nov 13, 2015, 4:38:32 AM11/13/15
to immobilienscout24-development
Thanks for the detailed description. We fix the problem asap.

Kind regards,
Fabian

Fabian Mielke@ImmobilienScout24

unread,
Nov 24, 2015, 6:24:32 AM11/24/15
to immobilienscout24-development
Problem doesn't exist anymore since friday, 13th November 2015 about 2:30 p.m.

Kind regards,
Fabian
Reply all
Reply to author
Forward
0 new messages