Author Message
grayson.malinowski
Joined: Feb 17, 2020
Messages: 3
Offline
When trying to update any attribute for a contact through the REST Update Contact Attribute Value to List I keep getting a 404. I can get the value just fine, but I'm wondering if I have my URL wrong...

Here is what I'm getting when I try and update the custom attribute CallAttemptCounter (using Basic Auth):
2020-02-17 10:15:58.089 | request:: https://localhost:9992/VP_POM_Service/v2/contactlists/14/contacts/1234567/attributes/CallAttemptCounter/update; {"contactAttributeValue":"2"} 

2020-02-17 10:15:58.089 | header: {Cache-Control=[no-cache],
X-Requested-With=[rest], Content-Type=[application/json]}
2020-02-17 10:15:58.089 | requestMethod: POST
2020-02-17 10:15:58.783 | responseCode: 404


Here is what I'm getting when I just try and get the custom value CallAttemptCounter:
2020-02-17 10:11:51.031 | request: https://localhost:9992/VP_POM_Service/v2/contactlists/14/contacts/1234567/attributes/CallAttemptCounter 

2020-02-17 10:11:51.031 | requestMethod: GET
2020-02-17 10:11:51.808 | responseCode: 200
2020-02-17 10:11:51.81 | response: {"attributeValue":"2"}


So the value exists.

I also verified that the Attribute CallAttemptCounter is set to readonly = false:
{
"attributeID": "33",
"attributeName": "CallAttemptCounter",
"attributeDataType": "INTEGER",
"attributeType": "Custom",
"displayName": "CallAttemptCounter",
"masked": false,
"readonly": false,
"sensitive": false
}

Do I have the wrong URL? Am I missing somthing?
MikeMalcorINI [Avatar]

Joined: Jan 14, 2015
Messages: 72
Offline
My suggestion is to remove the word 'update" from the URL. I think that is from an earlier version of the REST server (not v2)
Here is my sample code

POST /VP_POM_Service/v2/contactlists/1/contacts/1/attributes/FirstName HTTP/1.1
Host: {{EP Server IP}}
X-Requested-With: rest
Content-Type: application/json
Cache-Control: no-cache
Authorization: Basic cG9tZGV2OnBvbWRldjAx

{"contactAttributeValue":"Michael"}
grayson.malinowski
Joined: Feb 17, 2020
Messages: 3
Offline
That was it!

Just needed to remove "/update" at the end of the URL.
Go to:   
Mobile view