This API operation creates a new PhoneChat booking.
POST
/v1/PhoneChat/CreateBooking
Property | Type | Description |
---|---|---|
BookUserID |
integer | Required. The ID of the user at which a new Booking should be made. |
SessionDate |
datetime | Required. The date at which the PhoneChat session will be planned. This must be in the future. Format: YYYY-MM-DD HH:MM |
Duration |
integer | Required. The duration in minutes that this session will take. This must be at least 5 . |
Method |
integer | Required. The method used for calling. Valid options are: 1 if the client (logged in user) wants to be called by the booked user, 2 if the client will call the booked user him/herself, or 3 if skype will be used. |
PhoneNumber |
string | The telephone number of the user that will be used if the user wants to be called by the client. This is required if Method equals 1, otherwise this is not used. Requires 10 or 11 numbers. |
SkypeName |
string | The name of the clients Skype profile. This is required if Method equals 3, otherwise this is not used. |
Credits |
decimal | Required. The credits offered by the client for this planned booking. If the candidate has set a Price-Per-Minute, the value of Credits must be at least (PPM × Duration) . |
AcceptBy |
datetime | Required. The date at which the user wants the booking to be accepted. If the booking has not been accepted by this date, the booking will automatically be rejected. This must be in the future, and must be before SessionDate . Format: YYYY-MM-DD HH:MM |
Comments |
string | The comments supplied by the user for the candidate to read. Note: If the candidate uses SMS to accept or reject booking, the candidate may not be able to read the comments. |
This endpoint has a couple of prerequisites which affects the current PhoneChat Booking.
Property | Type | Description |
---|---|---|
BookUserID |
integer | The user must be providing PhoneChat. The user must not have the DirectChat Only option enabled. |
Method |
integer | The requested method must be a valid method for the specified BookUser. See the GetUserBookingRequirements endpoint. |
Credits |
decimal | The client must have sufficient credits. See the GetCurrentCreditBalance endpoint. |
Parameters can be passed to this operation using the HTTP POST method with serialized JSON in the request body.
The REST API uses HTTP request headers to determine what data type is returned or to authenticate the developer's API key. More information can be found in the overview section.
An Authorization header is required with every request and must contain the access_token of the user. More information can be found in the Access tokens page.
This endpoint requires the following scope:
Scope |
---|
account_phonechat_bookings |
Property | Type | Description |
---|---|---|
BookingID |
integer | The ID of the booking. |
Duration |
integer | The amount of minutes planned for this session |
Credits |
decimal | The amount of credits offered by the user, or agreed upon by both parties if this is an accepted booking. |
Status |
string | The current status of the booking. This can be Pending , Accepted , Rejected , Confirmed or Cancelled . |
Method |
integer | The method used for calling. This can be 1 if the client (logged in user) wants to be called by the booked user, 2 if the client will call the booked user him/herself, or 3 if skype will be used. |
PhoneNumber |
string | The phone number provided by the client. Note: This will be null if the provided Method does not require a phone number. |
SkypeName |
string | The skype name provided by the client. Note: This will be null if the provided Method does not require a skype name. |
CreateDate |
datetime | The date at which the booking has been created. |
SessionDate |
datetime | The date at which the booked session is planned to happen. |
AcceptBy |
datetime | The date until which the candidate has to accept the booking. |
AcceptedDate |
datetime | The date at which the booked session was accepted. This will be null if the booking was never accepted. |
ConfirmedDate |
datetime | The date at which the booked session was confirmed. This will be null if the booking was never confirmed. |
CancelledDate |
datetime | The date at which the booked session was cancelled. This will be null if the booking was never cancelled. |
CancelledReason |
string | The reason provided for cancelling the booking. This will be null if the booking was never cancelled. |
CancelledBy |
string | The nickname of the user who cancelled the booking. This will be null if the booking was never cancelled. |
RejectedReason |
string | The reason provided for rejecting the booking. This will be null if the booking was never rejected. |
LastUpdated |
datetime | The date at which the booking has been most recently updated. |
Comments |
string | The comment text left behind by the client (logged in user) when creating the booking. |
ActionClient |
string | A brief message containing the action the user needs to do. This will be null if there are no possible actions. |
Candidate |
aws:PhoneChatBookingUser | The user at which the booking has been made. |
The following example returns a successfully created PhoneChat Booking.