Problem creating booking!

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
}

@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.

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 :grinning:

@Clayton you will need to replace /{profileId} with the page ID you where you want to create the booking.

@Ben I did the replace with the id and got the error

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.

Thank you very much !

@Clayton Just realized I forgot a piece here: v1/profiles/{profileId}/bookings

That should work for you. My apologies.

Thank you very much Ben ! :slight_smile: