[#767] Edit client with fields - not working

Migrated from Redmine #767 | Author: Ernest Mésar
Status: New | Priority: High, I’m very impatient | Created: 2021-08-26


Hello i have an problem with editin client via RESTAPI documentation.I have everything correct but always shows me error - 401 - Unauthorized or Access denied.

Can you tell me why ?

There ist request :

[
{
“ca”: null,
“qs”: ,
“url”: “https://user-api-v2.simplybook.me/admin/clients/field-values/15”,
“data”: “{\n "id": 15,\n "fields":\n [\n {\n "id": "name",\n "value": "test"\n },\n {\n "id": "email",\n "value": "test@gmail.com"\n },\n {\n "id": "phone",\n "value": "0915256930"\n },\n {\n "id": "client_field_3",\n "value": 12\n }\n ]\n}”,
“gzip”: true,
“method”: “put”,
“headers”: [
{
“name”: “X-Company-Login”,
“value”: “ftvsuniba”
},
{
“name”: “X-User-Token”,
“value”: “667a705fc65cd22261c2186a3c142695b65a2fbab057b4377a0245c71309497c”
}
],
“timeout”: null,
“useMtls”: false,
“authPass”: null,
“authUser”: null,
“bodyType”: “raw”,
“contentType”: “application/json”,
“serializeUrl”: false,
“shareCookies”: false,
“parseResponse”: true,
“followRedirect”: true,
“useQuerystring”: false,
“followAllRedirects”: false,
“rejectUnauthorized”: true
}
]

Nicholas Alias wrote:

Hi, try to use X-Token instead of X-User-Token for header

Ernest Mésar wrote:

Oh my fault, thank you ! it works