[#769] EditClient via RESTAPI - doesnt workin

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


Hello i have an problem with this one.

Thats RAW request

[
{
“ca”: null,
“qs”: ,
“url”: “https://user-api-v2.simplybook.me/admin/bookings/56”,
“data”: “{\n "count": 56,\n "start_datetime": "2021-08-27 19:50:00",\n "location_id": ,\n "category_id": 20,\n "provider_id": 1,\n "service_id": 37,\n "client_id": 24,\n "additional_fields": [\n {\n "field": "158cffad449af3c47fc5764764bd2ce4",\n "value": "satna"\n },\n {\n "field": "ae571d26631d5b5c237946e5de857a0c",\n "value": "zaujem"\n },\n {\n "field": "856252fcd630d560330015014790a3fc",\n "value": "1845685950"\n }\n ]\n}”,
“gzip”: true,
“method”: “put”,
“headers”: [
{
“name”: “X-Company-Login”,
“value”: “ftvsuniba”
},
{
“name”: “X-Token”,
“value”: “cca7ce804b828d328b255e78cfeb106b8e979d25c87499e12efc0119dd7ea736”
}
],
“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
}
]

And shows me STATUS CODE 400

Errors : service_id - Invalid type given, value should be float, string, or integer
provider_id - Invalid type given, value should be float, string, or integer
start_datetime - Invalid type given, value should be float, string, or integer

Additional fields too…

Thanks for help !

Redmine Admin wrote:

"url": "https://user-api-v2.simplybook.me/admin/bookings/56",

it should not contain /56

Redmine Admin wrote:

if you want to edit booking make sure to pass correct params, it could not be possible to change service and provider in some cases

Nicholas Alias wrote:

delete this param or update empty value "location_id": ,

Ernest Mésar wrote:

Thank you, it works !