Tatjana_Knezevic | 2025-03-06 21:30:28 UTC | #1
Hi @tim.smith,
On February 24th, a new feature " Division-aware permissions and APIs for external contacts" was released. We can see that related permissions are now Division aware (refer to the screenshot).
However, having a problem when trying to add a new contact with a division via API POST /api/v2/externalcontacts/contacts (required permission for this API is externalContacts>contact>add ) , I'm getting the error "The request failed with response code: 400. Message: The request could not be understood by the server due to malformed syntax." Here is the payload I was using when testing API call:
{ "firstName": "John", "lastName": "March", "middleName": "", "title": "", "workEmail": "john@test.com", "personalEmail": "", "otherEmail": "", "division": "CSAT", "address": { "address1": "", "address2": "", "city": "", "postalCode": "" }, "externalSystemUrl": "", "workPhone": { "display": "+1 416 999 9999", "e164": "+4169999999", "countryCode": "CA", "normalizationCountryCode": "CA" } }
Note: The "division" in the payload, exists in the Org.
Thanks,
Jerome.Saint-Marc | 2025-03-07 14:44:13 UTC | #2
Hello,
Try with id of your division as below:
{
"firstName": "John",
"lastName": "March",
"middleName": "",
"title": "",
"workEmail": "[john@test.com](mailto:john@test.com)",
"personalEmail": "",
"otherEmail": "",
"division": {
"id": "ID_OF_YOUR_CSAT_DIVISION"
},
"address": {
"address1": "",
"address2": "",
"city": "",
"postalCode": ""
},
"externalSystemUrl": "",
"workPhone": {
"display": "+1 416 999 9999",
"e164": "+4169999999",
"countryCode": "CA",
"normalizationCountryCode": "CA"
}
}
Regards,
Tatjana_Knezevic | 2025-03-07 17:03:34 UTC | #3
@Jerome.Saint-Marc
Thank you!!! I can see division as a parameter now, in the API definition :slight_smile:
One more question: when the External Contact is added via UI, in the API payload I do see this attribute "originator": "contacts-and-organizations-ui". Do you have more details on this attribute and possible values?
Jerome.Saint-Marc | 2025-03-10 07:56:44 UTC | #4
Hello,
No, I don't have details on these attributes. They are not listed in the ExternalContact model/class contract (including internal fields).
Regards,
system | 2025-04-09 07:57:15 UTC | #5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 32081