API Methods
Account ...
Blogs ...
Bookings ...
CreditHistory ...
Dashboard ...
DirectCam ...
DirectChat ...
Email ...
FieldReport ...
Groups ...
HotLists ...
Interview ...
Lists ...
Movie ...
Newsfeed ...
PhoneChat ...
Pictures ...
Profile ...
Search ...
Tours ...
Webcam ...

Cancel Made PhoneChat Booking

This API operation cancels a created PhoneChat booking.

URL / Endpoint

Need help with Postman?

POST /v1/PhoneChat/CancelMadeBooking

Request

PropertyTypeDescription
BookingID integer Required. The ID of the booking you want to cancel.
Reason string Required. The reason for cancelling the booking.

Prerequisites

This endpoint has a couple of prerequisites which affects the current PhoneChat Booking.

PropertyTypeDescription
Status string The Status must not be Cancelled or Rejected.
SessionDate datetime If the booking is confirmed, you can only cancel if the SessionDate has not already passed.

Request Information

HTTP Method / Verb

Parameters can be passed to this operation using the HTTP POST method with serialized JSON in the request body.

Headers

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.

Authentication

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.

Scopes

This endpoint requires the following scope:

Scope
account_phonechat_bookings

Samples

POST method

https://api-sandbox.adultwork.com/v1/PhoneChat/CancelMadeBooking
Authorization: bearer {your-access-token}

{ "BookingID": 1, "Reason": "I've had something come up" }

Response

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

Response Sample

The following example returns a successfully cancelled PhoneChat Booking.

{
    "BookingID": 1,
    "Duration": 15,
    "Credits": 8,
    "Status": "Cancelled",
    "Method": 1,
    "PhoneNumber": "44...",
    "SkypeName": null,
    "CreateDate": "2018-01-20T12:34:56.789",
    "SessionDate": "2018-01-22T21:30:00",
    "AcceptBy": "2018-01-22T00:00:00",
    "AcceptedDate": null,
    "ConfirmedDate": null,
    "CancelledDate": "2018-01-22T18:24:11",
    "CancelledReason": "I've had something come up",
    "CancelledBy": "BookingUser"
    "RejectedReason": null,
    "LastUpdated": "2018-01-21T13:24:05.987",
    "Comments": "Hi, I had a great time last weekend, I want to do it again tonight!",
    "ActionClient": null,
    "Candidate": {
        "UserID": 123456,
        "Nickname": "BookedUser",
        "PhoneNumber": null,
        "SkypeName": null,
        "Total": 6,
        "Positive": 7,
        "Neutral": 0,
        "Negative": 1,
        "Ratings": 8,
        "Disputes": 0
    }
}
<MadeBooking xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/API.Models.PhoneChat.Bookings.Made">
    <AcceptBy>2018-01-22T00:00:00</AcceptBy>
    <AcceptedDate>2018-01-21T13:11:27.123</AcceptedDate>
    <ActionClient i:nil="true" />
    <BookingID>1</BookingID>            
    <CancelledBy>BookingUser</CancelledBy>
    <CancelledDate>2018-01-22T18:24:11</CancelledDate>
    <CancelledReason>I've had something come up</CancelledReason>
    <Candidate xmlns:d4p1="http://schemas.datacontract.org/2004/07/API.Models.PhoneChat.Bookings">
        <Disputes xmlns="http://schemas.datacontract.org/2004/07/API.Models.Profile">0</Disputes>
        <Negative xmlns="http://schemas.datacontract.org/2004/07/API.Models.Profile">1</Negative>
        <Neutral xmlns="http://schemas.datacontract.org/2004/07/API.Models.Profile">0</Neutral>
        <Positive xmlns="http://schemas.datacontract.org/2004/07/API.Models.Profile">7</Positive>
        <Ratings xmlns="http://schemas.datacontract.org/2004/07/API.Models.Profile">8</Ratings>
        <Total xmlns="http://schemas.datacontract.org/2004/07/API.Models.Profile">6</Total>
        <d4p1:Nickname>BookedUser</d4p1:Nickname>
        <d4p1:PhoneNumber i:nil="true" />
        <d4p1:SkypeName i:nil="true" />
        <d4p1:UserID>123456</d4p1:UserID>
    </Candidate>
    <Comments>Hi, I had a great time last weekend, I want to do it again tonight!<Comments>
    <ConfirmedDate>2018-01-21T13:24:05.987</ConfirmedDate>
    <CreateDate>2018-01-20T12:34:56.789</CreateDate>
    <Credits>8.0000</Credits>
    <Duration>15</Duration>
    <LastUpdated>2018-01-21T13:24:05.987</LastUpdated>
    <Method>1</Method>
    <PhoneNumber>44...</PhoneNumber>
    <RejectedReason i:nil="true" />
    <SessionDate>2018-01-22T21:30:00</SessionDate>
    <SkypeName i:nil="true" />
    <Status>Cancelled</Status>
</MadeBooking>