APIs & Integrations

MUfland
Miembro

API Post to Create Contact is not adding any properties

resolver

Hi,

 

I am playing with the API in my Dev Account and trying to add a contact using C# and Postman via the contacts api. The contact seems to be added in Hubspot but none of the data is transferred.

 

The request is going here https://api.hubapi.com/crm/v3/objects/contacts?hapikey=xxxxxx-xxxx-xxxx-xxxx-xxxxxx96caf

 

The test data is this 

 

{"company":"MU Ltd","email":"mark@mulitd.com","firstname":"Mark","lastname":"Ufland","phone":"077676676767","website":"mulitd.com"}
 
The response is this:
 
{
    "id""351",
    "properties": {
        "createdate""2021-06-24T09:18:29.818Z",
        "hs_is_unworked""true",
        "hs_marketable_status""false",
        "hs_marketable_until_renewal""false",
        "hs_object_id""351",
        "lastmodifieddate""2021-06-24T09:18:29.818Z"
    },
    "createdAt""2021-06-24T09:18:29.818Z",
    "updatedAt""2021-06-24T09:18:29.818Z",
    "archived"false
}
 
Do you have any ideas?
 
Thanks,
 
Mark
 
0 Me gusta
1 Soluciones aceptada
JBeatty
Solución
Guía | Partner nivel Diamond
Guía | Partner nivel Diamond

API Post to Create Contact is not adding any properties

resolver

Hi @MUfland,

I believe the issue here is the data of your request. From the API docs the example data they give is:

 

{
  "properties": {
    "company": "Biglytics",
    "email": "bcooper@biglytics.net",
    "firstname": "Bryan",
    "lastname": "Cooper",
    "phone": "(877) 929-0687",
    "website": "biglytics.net"
  }
}

 

So I would try to reformat your request data like this:

 

{"properties":{"company":"MU Ltd","email":"mark@mulitd.com","firstname":"Mark","lastname":"Ufland","phone":"077676676767","website":"mulitd.com"}}

 

✔️ Was I able to help answer your question? Help the community by marking it as a solution.

Joshua Beatty
Software Developer with Pearagon

Still have questions? Let's Talk

Ver la solución en mensaje original publicado

4 Respuestas 4
JBeatty
Solución
Guía | Partner nivel Diamond
Guía | Partner nivel Diamond

API Post to Create Contact is not adding any properties

resolver

Hi @MUfland,

I believe the issue here is the data of your request. From the API docs the example data they give is:

 

{
  "properties": {
    "company": "Biglytics",
    "email": "bcooper@biglytics.net",
    "firstname": "Bryan",
    "lastname": "Cooper",
    "phone": "(877) 929-0687",
    "website": "biglytics.net"
  }
}

 

So I would try to reformat your request data like this:

 

{"properties":{"company":"MU Ltd","email":"mark@mulitd.com","firstname":"Mark","lastname":"Ufland","phone":"077676676767","website":"mulitd.com"}}

 

✔️ Was I able to help answer your question? Help the community by marking it as a solution.

Joshua Beatty
Software Developer with Pearagon

Still have questions? Let's Talk

MUfland
Miembro

API Post to Create Contact is not adding any properties

resolver

Hi Josh,

 

Thanks for that, it did the trick. I must be getting old as I didn't spot that when reading the docs. Sometimes you need another pair of eyes.

 

Regards,

Mark

0 Me gusta
natsumimori
Administrador de la comunidad
Administrador de la comunidad

API Post to Create Contact is not adding any properties

resolver

Thank you Josh for your advice!

@MUfland Please check out ↑

0 Me gusta
natsumimori
Administrador de la comunidad
Administrador de la comunidad

API Post to Create Contact is not adding any properties

resolver

Thank you for your post @MUfland .

@LPM and @JBeatty , would you mind sharing your advice for @MUfland ?

0 Me gusta