Link contact to company customer
Forum rules
- Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
- No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
- Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
- Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
- Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
- Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
- Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
- Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Link contact to company customer
Hi,
When I push contact using the API, I would like to link that contact to a company customer. How do I do it?
Regards,
Ash
When I push contact using the API, I would like to link that contact to a company customer. How do I do it?
Regards,
Ash
Re: Link contact to company customer
Hi Ashish,
To link an existing contact to a customer, either individual or company use this endpoint:
Here you can use POST to sendt the id of the new contact you with to connect with the customer:
See more info:
https://developer.simprogroup.com/apido ... r-Contacts
The same endpoint can be used to create a new contact directly on the customer.
Regards
To link an existing contact to a customer, either individual or company use this endpoint:
Code: Select all
/api/v1.0/companies/{companyID}/customers/{customerID}/contacts/Code: Select all
"Contact": 0,https://developer.simprogroup.com/apido ... r-Contacts
The same endpoint can be used to create a new contact directly on the customer.
Regards
Sindre
API Developer | Simpro Software Group
API Developer | Simpro Software Group
Re: Link contact to company customer
Thanks Sindre for the reply.
So, if I have to link an existing contact to a customer, I send a POST request to
However, this POST request can only have "Contact" property in the request body, else I will get "422 Unprocessable" error.
Is there a way to unlink a contact from the customer using the API? If I send a POST request for a different customer using same Contact id, it just links the new customer with the contact without unlinking the old customer. Is there a PATCH way of doing it?
So, if I have to link an existing contact to a customer, I send a POST request to
Code: Select all
/api/v1.0/companies/{companyID}/customers/{customerID}/contacts/Is there a way to unlink a contact from the customer using the API? If I send a POST request for a different customer using same Contact id, it just links the new customer with the contact without unlinking the old customer. Is there a PATCH way of doing it?
Re: Link contact to company customer
Hi,
To unlink an existing contact from a customer you can use the DELETE endpoint when you've chosen the contact on the customer you wish to remove.
https://developer.simprogroup.com/apido ... dd62b14684
Regards
To unlink an existing contact from a customer you can use the DELETE endpoint when you've chosen the contact on the customer you wish to remove.
Code: Select all
/api/v1.0/companies/{companyID}/customers/{customerID}/contacts/{contactID}Regards
Sindre
API Developer | Simpro Software Group
API Developer | Simpro Software Group
-
jimhalverson
- Posts: 1
- Joined: Wed Mar 08, 2023 6:32 pm
Re: Link contact to company customer
Any chance of seeing an example of the body used to assign an existing contact? I got the delete to work but post returns "No data to be inserted for customer contact." I don't seem to be able to find the correct URL and body to make it work.
Re: Link contact to company customer
Hi,
To add an existing contact to a customer use this endpoint to make a POST request:
The body will look like this:
To get a list of existing contacts you can use this endpoint:
Here is the documentation for the POST request:
https://developer.simprogroup.com/apido ... 269e8392a6
I hope this helps.
Regards
To add an existing contact to a customer use this endpoint to make a POST request:
Code: Select all
/api/v1.0/companies/{companyID}/customers/{customerID}/contacts/Code: Select all
{
"Contact": {contactID}
}Code: Select all
/api/v1.0/companies/{companyID}/customers/{customerID}/contacts/https://developer.simprogroup.com/apido ... 269e8392a6
I hope this helps.
Regards
Sindre
API Developer | Simpro Software Group
API Developer | Simpro Software Group
Re: Link contact to company customer
Hi Sindre,
We are having the same question about how to use api to link existing contact with an customer.
And I tried to make a POST request with the endpoint you mentioned as per below:
And request body we use known contact id (233) as per below:
However we are getting error message
Kindly ask how should we fix this one?
We are having the same question about how to use api to link existing contact with an customer.
And I tried to make a POST request with the endpoint you mentioned as per below:
Code: Select all
/api/v1.0/companies/{companyID}/customers/{customerID}/contacts/Code: Select all
{
"Contact": "233"
}Code: Select all
{'path': '/Customer', 'message': 'Must be an integer', 'value': '233'}Re: Link contact to company customer
Aiden
API Developer | Simpro Software Group
API Developer | Simpro Software Group
Re: Link contact to company customer
Hi Aiden, thanks for the prompt reply!
I've tried to change body request to
But still got the error below:
Could you please advice further? Cheers!
I've tried to change body request to
Code: Select all
{"Contact":233}Code: Select all
{"errors":[{"path":"/Contact","message":"Must be an integer","value":"233"}]}Re: Link contact to company customer
Hi aijuy,
From the error you're getting it seems like you're still passing the value as a string when it is expecting an integer,
Can you try posting through Postman and ensure the body type is JSON?
From the error you're getting it seems like you're still passing the value as a string when it is expecting an integer,
Can you try posting through Postman and ensure the body type is JSON?
Aiden
API Developer | Simpro Software Group
API Developer | Simpro Software Group
DEVELOPER CENTER