# Booking for particular user

**URL:** <https://forum.youcanbook.me/t/booking-for-particular-user/1288>\
**Category:** API\
**Created:** [July 27, 2021, 5:32pm UTC](https://forum.youcanbook.me/t/booking-for-particular-user/1288 "2021-07-27T17:32:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benson](https://avatars.discourse-cdn.com/v4/letter/b/ea5d25/32.png) [@Benson](https://forum.youcanbook.me/u/Benson)\
**Post date:** [July 27, 2021, 5:32pm UTC](https://forum.youcanbook.me/t/booking-for-particular-user/1288/1 "2021-07-27T17:32:43Z")

</div>

Hello, I’m trying to set up booking via API.

Here is a sample request:  
{  
“startsAt”: “2021-07-28T08:00:00”,  
“timeZone”: “US/Central”,  
“units”: 1,  
“numberOfSlots”: 1,  
“answers”: [  
{  
“code”: “EMAIL”,  
“string”: “[ben1+apitest@testemail.com](mailto:ben1+apitest@testemail.com)”  
},  
{  
“code”: “FNAME”,  
“string”: “Ben1”  
},  
{  
“code”: “LNAME”,  
“string”: “Test1”  
},  
{  
“code”: “PHONE”,  
“string”: “9544501276”  
},  
{  
“code”: “ZIP”,  
“string”: “33309”  
}  
]  
}

Now I want this booking to be assigned to a particular user from the team. How do I go about that? I have user’s email.

---

<div class="post-metadata">

**Author:** ![Ben](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.youcanbook.me/ben/32/772_2.png) [@Ben](https://forum.youcanbook.me/u/Ben)\
**Post date:** [July 27, 2021, 8:10pm UTC](https://forum.youcanbook.me/t/booking-for-particular-user/1288/2 "2021-07-27T20:10:14Z")

</div>

@Benson welcome to the Forum.

You will need to also pass in:  
​"teamMember":{  
“id”: “{TEAMMEMBERID}”}  
​  
​Replace {TEAMMEMBERID} with the ID number for the team member you want to book with.  
​  
​You can run a GET for the current booking page and it will list the ?fields=teamMembers,teamMembers.items,teamMembers.items.name,teamMembers.items.id

---

<div class="post-metadata">

**Author:** ![Benson](https://avatars.discourse-cdn.com/v4/letter/b/ea5d25/32.png) [@Benson](https://forum.youcanbook.me/u/Benson)\
**Post date:** [July 28, 2021, 12:55am UTC](https://forum.youcanbook.me/t/booking-for-particular-user/1288/3 "2021-07-28T00:55:25Z")

</div>

I’m trying for the last one hour to get team member ID.

can you please post the sample request on how to get teammeberID?  
I did not understand how to run GET for the current booking page.

this is what I did and failed:  
POST : [https://api.youcanbook.me/v1/{MyAccountID}/profiles/{MyProfileId}/bookings](https://api.youcanbook.me/v1/%7BMyAccountID%7D/profiles/%7BMyProfileId%7D/bookings)

REQUEST :

{  
“startsAt”: “2021-07-30T08:00:00”,  
“timeZone”: “US/Central”,  
“units”: 1,  
“numberOfSlots”: 1,  
“answers”: [  
{  
“code”: “EMAIL”,  
“string”: “[ben1+apitest@testemail.com](mailto:ben1+apitest@testemail.com)”  
},  
{  
“code”: “FNAME”,  
“string”: “Ben1”  
},  
{  
“code”: “LNAME”,  
“string”: “Test1”  
},  
{  
“code”: “PHONE”,  
“string”: “9544501276”  
},  
{  
“code”: “ZIP”,  
“string”: “33309”  
}  
],  
“teamMember”: {  
“id”: “695442”  
}  
}

RESPONSE :  
{  
“code”: “ycbm\_api\_profile\_team\_member\_unknown”,  
“message”: “Unknown team member”,  
“type”: “YcbmApiException”,  
“errors”: [],  
“httpCode”: 400  
}

I know MemberId is wrong now, but where do I get that?

---

<div class="post-metadata">

**Author:** ![Benson](https://avatars.discourse-cdn.com/v4/letter/b/ea5d25/32.png) [@Benson](https://forum.youcanbook.me/u/Benson)\
**Post date:** [July 28, 2021, 1:40am UTC](https://forum.youcanbook.me/t/booking-for-particular-user/1288/4 "2021-07-28T01:40:01Z")

</div>

> [@Ben](#):
>
> ?fields=teamMembers,teamMembers.items,teamMembers.items.name,teamMembers.items.id

Ok, I got it.  
I did GET a request on  
[https://api.youcanbook.me/v1/{AccountId}/profiles/{ProfileId}/?fields=teamMembers,teamMembers.items,teamMembers.items.name,teamMembers.items.id](https://api.youcanbook.me/v1/%7BAccountId%7D/profiles/%7BProfileId%7D/?fields=teamMembers,teamMembers.items,teamMembers.items.name,teamMembers.items.id)

and I did get a successful response. and after using that Id I was able to create a booking successfully.

Thank you so much for the help.

---

<div class="post-metadata">

**Author:** ![Ben](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.youcanbook.me/ben/32/772_2.png) [@Ben](https://forum.youcanbook.me/u/Ben)\
**Post date:** [July 28, 2021, 3:22pm UTC](https://forum.youcanbook.me/t/booking-for-particular-user/1288/5 "2021-07-28T15:22:28Z")

</div>

@Benson Awesome I am glad you were able to get it sorted!
