Migrated from Redmine #1191 | Author: Guilherme Bueno
Status: Closed | Priority: Immediate, there is BUG! | Created: 2024-03-08
Calling a PUT on https://user-api-v2.simplybook.plus/admin/bookings/booking_id returns a 404, meaning booking hasn’t been found but calling a GET on it shows that the booking exists.
Calling a GET on https://user-api-v2.simplybook.plus/admin/booking/booking_id (without the “s”) also returns a 404, but clearly the booking exists as you can see in the last response.
Body of the request for the PUT method:
{
"count":"1",
"start_datetime":"2024-03-15 15:15:00",
"provider_id":2,
"service_id":26,
"location_id":6,
"client_id":16819,
"accept_payment":"true",
"payment_processor":"Stripe",
"additional_fields":[
{
"field":"473dd5d43a9146537758de98a4909a18",
"value":"Confirmed"
},
{
"field":"d5f910103c49904d8ac7b7a59be249b5",
"value":"Customer agreed to pay $99"
}
]
}
Request headers:
"headers" => [
"X-Token" => "token"
"X-Company-Login" => "santemedic1"
"Content-type" => "application/json; charset=utf-8"
"User-Agent" => "GuzzleHttp/6.5.5 curl/7.64.0 PHP/7.2.34"
]
Response when calling GET to see that booking with that id exists:
{
"log": [...],
"additional_fields": [...],
"products": [],
"attributes": [],
"invoice": {...},
"membership": null,
"user_status": null,
"comment": null,
"resources": [],
"record_date": "2024-03-08 15:58:43",
"batch_type": null,
"batch_id": null,
"provider": {...},
"service": {...},
"client": {...},
"status": "confirmed",
"membership_id": null,
"invoice_id": 17666,
"invoice_status": "paid",
"invoice_payment_received": true,
"invoice_number": "I-00010583",
"invoice_datetime": "2024-03-08 10:58:43",
"invoice_payment_processor": "stripe",
"ticket_code": null,
"ticket_validation_datetime": null,
"ticket_is_used": null,
"testing_status": null,
"user_status_id": null,
"category_id": null,
"location_id": 2,
"category": null,
"location": {...},
"can_be_edited": true,
"can_be_canceled": true,
"id": 18653,
"code": "06wee458e",
"start_datetime": "2024-03-15 15:15:00",
"end_datetime": "2024-03-15 15:30:00",
"service_id": 26,
"provider_id": 2,
"client_id": 16819,
"duration": 15
}
Any help is appreciated, please let me know if you need any more information.