[#1332] Edit Booking list

Migrated from Redmine #1332 | Author: soniya james
Status: Feedback | Priority: High, I’m very impatient | Created: 2024-12-09


API for Edit Booking list

who can I pass only editable field through Edit Booking list API

https://user-api-v2.simplybook.me/admin/bookings/60
{
“count”: 1,
“location_id”: 2,
“category_id”: 2,
“provider_id”: 4,
“service_id”: 6,
“client_id”: 5,
“additional_fields”: [
{
“field”: “f0ea4b6d8ca105fb343a8f746ceb4550”,
“value”: “testnwq”
},
{
“field”: “230b45ba58e5b4fc1a457e23a72531e2”,
“value”: “ARRIVAL”
},
{
“field”: “17389b496ab1e997c254ec9dff80d5f3”,
“value”: “test”
},
{
“field”: “622ee5867c7d15c0ddc1b66379e53b8f”,
“value”: “twt123643”
},
{
“field”: “eb09b471081130e7f5a5f12dd966b818”,
“value”: “test1”
},
{
“field”: “991d61e443279453e200c492a1e64fb8”,
“value”: “tesd22423534547”
},
{
“field”: “834dc6253a96820d5f838e279aedbb4f”,
“value”: “3456457658”
},
{
“field”: “622decd1c031ea168fd563fbdbcbbde7”,
“value”: “bglr”
},
{
“field”: “e1d9edbc3f6f0035dcfbcb78f89c67c8”,
“value”: “aknur”
},
{
“field”: “874b0cdd9ea17e90bf8b4f1015da3f51”,
“value”: “3”
},
{
“field”: “455c9643feb3cdf602fcf4677ac6ba59”,
“value”: “4”
}
],
“products”: [ {
“product_id”: “1”,
“qty”: “2”
}]
}

I don’t want to edit start_datetime

if I am removing that I am getting error
{
“code”: 400,
“message”: “”,
“data”: {
“start_datetime”: [
“Invalid type given, value should be float, string, or integer”,
“Invalid type given, value should be string, or integer”
]
},
“message_data”:

sir ,

Kindly help on this

Dmytro Bondarev wrote:

Hi,
all required parameters must be passed, you can get this info and then pass it back.

soniya james wrote:

ok

this is for edit boking right.I dont want to edit start_datetime but if i am passing like this

{
“count”: 1,
“start_datetime”: “2024-12-05 06:00:00”,
“location_id”: 2,
“category_id”: 2,
“provider_id”: 4,
“service_id”: 6,
“client_id”: 5,
“additional_fields”: [
{
“field”: “f0ea4b6d8ca105fb343a8f746ceb4550”,
“value”: “testnwq”
},
{
“field”: “230b45ba58e5b4fc1a457e23a72531e2”,
“value”: “ARRIVAL”
},
{
“field”: “17389b496ab1e997c254ec9dff80d5f3”,
“value”: “test”
},
{
“field”: “622ee5867c7d15c0ddc1b66379e53b8f”,
“value”: “twt123643”
},
{
“field”: “eb09b471081130e7f5a5f12dd966b818”,
“value”: “test1”
},
{
“field”: “991d61e443279453e200c492a1e64fb8”,
“value”: “tesd22423534547”
},
{
“field”: “834dc6253a96820d5f838e279aedbb4f”,
“value”: “3456457658”
},
{
“field”: “622decd1c031ea168fd563fbdbcbbde7”,
“value”: “bglr”
},
{
“field”: “e1d9edbc3f6f0035dcfbcb78f89c67c8”,
“value”: “aknur”
},
{
“field”: “874b0cdd9ea17e90bf8b4f1015da3f51”,
“value”: “3”
},
{
“field”: “455c9643feb3cdf602fcf4677ac6ba59”,
“value”: “4”
}
],
“products”: [ {
“product_id”: “1”,
“qty”: “2”
}]
}

{
“code”: 400,
“message”: “”,
“data”: {
“start_datetime”: [
“Selected time not available”
]
},
“message_data”:
}
this is the response

soniya james wrote:

hello sir,
kindly give update on this

Dmytro Bondarev wrote:

If you don’t want to edit start_datetime, then just pass original start_datetime.

Menzies Agilegrizzly wrote:

what i do, use get to fetch data, modify what is needed then use put to update data.