Hi, I've been through that documentation back and forth.. but I cannot find this particular endpoint/functionality reference. Would you mind pointing me where it might be? Thanks Pavel
Are you talking about a Contact endpoint specifically, or just this type of curl command? The Examples section has similar commands for Creating (POSTing) and Updating (PATCHing) an Account.
You would curl against the Contact endpoint
with the newcontact.json having the following content
[1] https://www.salesforce.com/us/developer/docs/api_rest/
Thanks
Pavel
Are you talking about a Contact endpoint specifically, or just this type of curl command? The Examples section has similar commands for Creating (POSTing) and Updating (PATCHing) an Account.
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm)
you have to pass access token as a input.
const getContact = async (accessToken) => {
console.log('Retrieving a contact from HubSpot using an access token');
try {
const headers = await {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json'
};
const result = await request.get('https://na1.salesforce.com/services/data/v20.0/sobjects/Contact/',
{
headers: headers
});
const data = JSON.parse(result);
console.log(data);
return Promise.resolve(data);
} catch (e) {
console.error(' > Unable to retrieve contact');
return Promise.reject(data);
}
};
getContact(access_token);
Thanks
Abhishekh Kumar