Clayton
1
Endpoint : POST → https://api.youcanbook.me/v1/bookings
{
"startsAt": "2021-11-12T08:00:00",
"timeZone": "America/Sao_Paulo",
"units": 1,
"numberOfSlots": 1,
"answers": [
{
"code": "EMAIL",
"string": "teste@teste.com.br"
},
{
"code": "FNAME",
"string": "Teste"
},
{
"code": "LNAME",
"string": "teste"
}
]
}
I’m trying to create bookings by using the API but I don’t know why I’m gettting this error message.
What can be missing
Return api
{
"code": "ycbm_api_booking_not_found",
"message": "Booking not found",
"type": "YcbmApiException",
"errors": [],
"httpCode": 404
}
Ben
2
@Clayton welcome to the Forum!
You will need to make the POST to v1/{profileId}/bookings
The bookings end point you reference will be to GET bookings that have already been made.
Clayton
3
Good Morning Ben,
When using I am adding the following error !
Endpoint → POST https://api.youcanbook.me/v1/{profileId}/bookings
{
"type": "CaligraphException",
"code": "caligraph_unsupported_http_method",
"message": "Request method 'POST' not supported",
"status": "BAD_REQUEST",
"errors": [],
"httpStatusCode": 400
}
Reguards
Ben
4
@Clayton you will need to replace /{profileId} with the page ID you where you want to create the booking.
Clayton
5
@Ben I did the replace with the id and got the error
Ben
6
Very strange, POST is definitely supported and I just made a request with this. I will reach out via email to see if we can get this sorted out.
Ben
8
@Clayton Just realized I forgot a piece here: v1/profiles/{profileId}/bookings
That should work for you. My apologies.
Clayton
9
Thank you very much Ben !