APIs & Integrations

SnirYadid
Member

The Contacts data are out of sync

SOLVE

We are using the CRM API to obtain contacts data, but the data displayed in the UI differs from the data obtained from the API.

The contacts data appears to have been updated, but the API does not retrieve it.

 

The data displayed in the UI for the some of the custom property are not the same as the data returned by the API

 

Please let me know how we can get the most recent value from the API.

 

 

 

0 Upvotes
1 Accepted solution
MatthiasKunz
Solution
Participant | Partner
Participant | Partner

The Contacts data are out of sync

SOLVE

hello @SnirYadid , @MiaSrebrnjak 

so there could be a few mechanisms at play here: we have seen a number of cases where contact data would be entered in the UI but not saved. The API of course will only pick the update up once the data has been saved.
That not being the case there may be a case where a custom property changed for a new one of the same name, and the API call still goes looking for the "old" version; in this case an update to the API call would help.
What is also a possible issue is using list endpoints. We have seen cases where a list endpoint would not return properties on individual objects correctly, leading to standard practice of combining list and then get calls. 
If you can share the call you are making, we might be able to dig a little deeper here, in case none of the above applies:) 




View solution in original post

8 Replies 8
SnirYadid
Member

The Contacts data are out of sync

SOLVE

Hello all.

 

We found some more information to share.

 

We discovered that the API request to get contacts(
https://developers.hubspot.com/docs/api/crm/contacts) - return's property "id" instead of the property label.

 

{

"stato_cliente": "chiuso ko", "lifecyclestage": "lead",

"stato_chiusura_ko": "Da recuperare",

"motivo_chiusura_ko": "Non rispondono",

}

 

The client see in the ui the label of "stato_cliente" property "morto"
We indemnify'd it by asking this endpoint: https://api.hubapi.com/properties/v1/contacts/properties/named/stato_cliente

 

{

"value": "chiuso ko",

"readOnly": false,

"hidden": false,

"label": "morto",

"description": null,

"doubleData": null,

"displayOrder": 6

}

 

 https://api.hubapi.com/properties/v1/contacts/properties/named/lifecyclestage

 

{

"value": "lead",

"readOnly": null,

"hidden": false,

"description": null,

"displayOrder": 1,

"doubleData": null,

"label": "Lead"

}

 

https://api.hubapi.com/properties/v1/contacts/properties/named/stato_chiusura_ko

 

 

 

Can we get the label of the named property in the response of https://developers.hubspot.com/docs/api/crm/contacts

 

 

0 Upvotes
MatthiasKunz
Participant | Partner
Participant | Partner

The Contacts data are out of sync

SOLVE

Hi @SnirYadid , 
it looks like something went wrong with the attachment in your post, could you try that one again?

Cheers

SnirYadid
Member

The Contacts data are out of sync

SOLVE
Sure.

Attached is a screenshot of a response example that contains an incorrect
value for the stato_cliente custom field, which is "chiuso ko" when it
should be "morto".
0 Upvotes
MatthiasKunz
Solution
Participant | Partner
Participant | Partner

The Contacts data are out of sync

SOLVE

hello @SnirYadid , @MiaSrebrnjak 

so there could be a few mechanisms at play here: we have seen a number of cases where contact data would be entered in the UI but not saved. The API of course will only pick the update up once the data has been saved.
That not being the case there may be a case where a custom property changed for a new one of the same name, and the API call still goes looking for the "old" version; in this case an update to the API call would help.
What is also a possible issue is using list endpoints. We have seen cases where a list endpoint would not return properties on individual objects correctly, leading to standard practice of combining list and then get calls. 
If you can share the call you are making, we might be able to dig a little deeper here, in case none of the above applies:) 




SnirYadid
Member

The Contacts data are out of sync

SOLVE
Hello there,
This is the endpoint we used to retrieve the contact data:
https://api.hubapi.com/crm/v3/objects/contacts?properties=hs_object_id%2Ccreatedate%2Clastmodifiedda...


Attached is a screenshot of a response example that contains an incorrect
value for the stato_cliente custom field, which is "chiuso ko" when it
should be "morto".

[image: image.png]
0 Upvotes
MatthiasKunz
Participant | Partner
Participant | Partner

The Contacts data are out of sync

SOLVE

Hello @SnirYadid 

 

unfortunately, I cannot see the screenshot here - the endpoint looks fine to me in any case. Does the problem appear only for recently modified properties or also for modifications that are longer ago (let's say more than a couple minutes)?

SnirYadid
Member

The Contacts data are out of sync

SOLVE
The changes are from a month ago. It is not a new one.
0 Upvotes
MiaSrebrnjak
Community Manager
Community Manager

The Contacts data are out of sync

SOLVE

Hi @SnirYadid,

 

Thank you for reaching out to the Community!

I wanted to tag in a couple of subject matter experts to see if they have any advice:

Hi @Mike_Eastwood@Bryantworks@MatthiasKunz, do you have any tips for @SnirYadid? Thank you!

 

Cheers
Mia, Community Team   

 


Wusstest du, dass es auch eine DACH-Community gibt?
Nimm an regionalen Unterhaltungen teil, indem du deine Spracheinstellungen änderst


Did you know that the Community is available in other languages?
Join regional conversations by
changing your language settings