Skip to content

Latest commit

 

History

History
948 lines (690 loc) · 48.1 KB

File metadata and controls

948 lines (690 loc) · 48.1 KB

Appointments

Overview

An appointment is a meeting scheduled between two or more parties. These APIs allow you to get information about your Cvent Appointments: appointment attendees, their interests, and availabilities.

  • Appointment Events - Appointment events help planners facilitate meetings between attendees. Attendees express their interest and availability to schedule appointments. Use this API to get information about appointments and appointment attendees.

  • Appointment Attendees - Appointment attendees are meeting participants. They can be attendees of either events or appointment events. Get information about these participants or use their appointment attendee ID to get their availabilities and interests.

  • Availability - Appointment availabilities describe an appointment attendees' preference in meeting dates and times. Availability information is only available for Planner Coordinated Appointments.

  • Interests - Appointment interests describe appointment attendees' preferences in meeting with another organization or individual. Interest information is only available for Planner Coordinated Appointments.

  • Available Times - Available times lists time ranges available for appointments scheduling.

  • Locations - Locations lists details of all locations created for scheduling appointments.

  • Appointment Types - Appointment Types lists details of different appointment types created.

Available Operations

ListAppointmentAttendees

Gets a paginated list of appointment attendees.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;
using System;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

ListAppointmentAttendeesRequest req = new ListAppointmentAttendeesRequest() {
    After = System.DateTime.Parse("2017-01-02T02:00:00Z").ToUniversalTime(),
    Before = System.DateTime.Parse("2017-01-02T02:00:00Z").ToUniversalTime(),
    Token = "0e28af57-511f-47ab-ae46-46cd1ca51a1a",
    Filter = "appointmentEvent.id eq 'd165ad63-4bec-449d-aa9e-054fc7fcbb71' and contact.id eq 'da561161-8e80-4c70-9663-750cbc2045f6' and deleted eq 'false'",
};

ListAppointmentAttendeesResponse? res = await sdk.Appointments.ListAppointmentAttendeesAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

Parameter Type Required Description
request ListAppointmentAttendeesRequest ✔️ The request object to use for the request.

Response

ListAppointmentAttendeesResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

GetAppointmentAttendeeById

Gets a single appointment attendee by their ID.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

GetAppointmentAttendeeByIdRequest req = new GetAppointmentAttendeeByIdRequest() {
    Id = "0cdfa3f7-05da-4121-857b-d7732891e01a::52a68001-70ce-4ec4-a6fe-d0888123c715",
};

var res = await sdk.Appointments.GetAppointmentAttendeeByIdAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetAppointmentAttendeeByIdRequest ✔️ The request object to use for the request.

Response

GetAppointmentAttendeeByIdResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 401, 403, 404, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

ListAvailability

Gets a paginated list of appointment availability times.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;
using System;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

ListAvailabilityRequest req = new ListAvailabilityRequest() {
    After = System.DateTime.Parse("2017-01-02T02:00:00Z").ToUniversalTime(),
    Before = System.DateTime.Parse("2017-01-02T02:00:00Z").ToUniversalTime(),
    Token = "0e28af57-511f-47ab-ae46-46cd1ca51a1a",
    Filter = "appointmentEvent.id eq 'd165ad63-4bec-449d-aa9e-054fc7fcbb71'",
};

ListAvailabilityResponse? res = await sdk.Appointments.ListAvailabilityAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

Parameter Type Required Description
request ListAvailabilityRequest ✔️ The request object to use for the request.

Response

ListAvailabilityResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

GetAvailabilityById

Get a single appointment availability time by its ID.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

GetAvailabilityByIdRequest req = new GetAvailabilityByIdRequest() {
    Id = "da8b035b-428b-4069-b25b-92afbcf514b3::2d8234f1-55df-483c-abe3-7e2cb98f8275",
};

var res = await sdk.Appointments.GetAvailabilityByIdAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetAvailabilityByIdRequest ✔️ The request object to use for the request.

Response

GetAvailabilityByIdResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 401, 403, 404 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

ListAppointmentEvents

Gets a paginated list of appointment events.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;
using System;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

ListAppointmentEventsRequest req = new ListAppointmentEventsRequest() {
    After = System.DateTime.Parse("2017-01-02T02:00:00Z").ToUniversalTime(),
    Before = System.DateTime.Parse("2017-01-02T02:00:00Z").ToUniversalTime(),
    Token = "0e28af57-511f-47ab-ae46-46cd1ca51a1a",
    Filter = "event.id eq 'd165ad63-4bec-449d-aa9e-054fc7fcbb71'",
};

ListAppointmentEventsResponse? res = await sdk.Appointments.ListAppointmentEventsAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

Parameter Type Required Description
request ListAppointmentEventsRequest ✔️ The request object to use for the request.

Response

ListAppointmentEventsResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

GetAppointmentEventById

Gets a single appointment event by its ID.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

GetAppointmentEventByIdRequest req = new GetAppointmentEventByIdRequest() {
    Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
};

var res = await sdk.Appointments.GetAppointmentEventByIdAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetAppointmentEventByIdRequest ✔️ The request object to use for the request.

Response

GetAppointmentEventByIdResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 401, 403, 404, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

ListAvailableTimes

Gets a paginated list of times and locations available for scheduling appointments in a particular appointment event.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

ListAvailableTimesRequest req = new ListAvailableTimesRequest() {
    Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
    Token = "0e28af57-511f-47ab-ae46-46cd1ca51a1a",
    Filter = "appointmentType.id eq '2925dd1c-7b02-4e34-8881-18f2360b50a7'",
};

ListAvailableTimesResponse? res = await sdk.Appointments.ListAvailableTimesAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

Parameter Type Required Description
request ListAvailableTimesRequest ✔️ The request object to use for the request.

Response

ListAvailableTimesResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403, 404, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

ListAppointmentTypes

Gets a paginated list of appointment types for an appointment event.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

ListAppointmentTypesRequest req = new ListAppointmentTypesRequest() {
    Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
    Token = "0e28af57-511f-47ab-ae46-46cd1ca51a1a",
};

ListAppointmentTypesResponse? res = await sdk.Appointments.ListAppointmentTypesAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

Parameter Type Required Description
request ListAppointmentTypesRequest ✔️ The request object to use for the request.

Response

ListAppointmentTypesResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403, 404, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

CreateAppointment

Creates an appointment in a given appointment event.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using System;
using System.Collections.Generic;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

Models.Requests.CreateAppointmentRequest req = new Cvent.SDK.Models.Requests.CreateAppointmentRequest() {
    Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
    CreateAppointmentRequestValue = new Cvent.SDK.Models.Components.CreateAppointmentRequest() {
        Subject = "Meeting with Cvent",
        Description = "A private meeting to discuss sales opportunities.",
        StartTime = System.DateTime.Parse("2017-01-01T15:20:00Z").ToUniversalTime(),
        EndTime = System.DateTime.Parse("2030-01-01T15:30:00Z").ToUniversalTime(),
        Location = "fa896667-5998-46dc-ac06-6be8e053ef4e",
        CustomLocationName = "Coffee Shop",
        Hosts = new List<UuidJson>() {
            new UuidJson() {
                Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
            },
        },
        Attendees = new List<UuidJson>() {
            new UuidJson() {
                Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
            },
        },
        Code = "APPT-0001",
        AppointmentTypeId = "b53dc938-8121-4af1-a5e2-d9f3f4fcd574",
        AutoAccept = true,
    },
};

var res = await sdk.Appointments.CreateAppointmentAsync(req);

// handle response

Parameters

Parameter Type Required Description
request Models.Requests.CreateAppointmentRequest ✔️ The request object to use for the request.

Response

CreateAppointmentResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse 422 application/json
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403, 404, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

UpdateAppointment

Updates an appointment based on the given ID.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using System;
using System.Collections.Generic;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

Models.Requests.UpdateAppointmentRequest req = new Cvent.SDK.Models.Requests.UpdateAppointmentRequest() {
    Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
    ApptId = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
    UpdateAppointmentRequestValue = new Cvent.SDK.Models.Components.UpdateAppointmentRequest() {
        Subject = "Meeting with Cvent",
        Description = "A private meeting to discuss sales opportunities.",
        StartTime = System.DateTime.Parse("2017-01-01T15:20:00Z").ToUniversalTime(),
        EndTime = System.DateTime.Parse("2030-01-01T15:30:00Z").ToUniversalTime(),
        Location = "fa896667-5998-46dc-ac06-6be8e053ef4e",
        CustomLocationName = "Coffee Shop",
        Hosts = new List<UuidJson>() {
            new UuidJson() {
                Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
            },
        },
        Attendees = new List<UuidJson>() {
            new UuidJson() {
                Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
            },
        },
        Id = "a3d77c44-bb4b-41dd-9c37-18230cc66ce4",
    },
};

var res = await sdk.Appointments.UpdateAppointmentAsync(req);

// handle response

Parameters

Parameter Type Required Description
request Models.Requests.UpdateAppointmentRequest ✔️ The request object to use for the request.

Response

UpdateAppointmentResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse 422 application/json
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403, 404, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

CancelAppointment

Cancels an appointment with the given appointment ID.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

CancelAppointmentRequest req = new CancelAppointmentRequest() {
    Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
    ApptId = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
};

var res = await sdk.Appointments.CancelAppointmentAsync(req);

// handle response

Parameters

Parameter Type Required Description
request CancelAppointmentRequest ✔️ The request object to use for the request.

Response

CancelAppointmentResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403, 404, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

ListLocations

Gets a paginated list of appointment locations in a particular appointment event.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

ListLocationsRequest req = new ListLocationsRequest() {
    Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
    Token = "0e28af57-511f-47ab-ae46-46cd1ca51a1a",
};

ListLocationsResponse? res = await sdk.Appointments.ListLocationsAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

Parameter Type Required Description
request ListLocationsRequest ✔️ The request object to use for the request.

Response

ListLocationsResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403, 404, 429 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

ListMeetingInterests

Gets a paginated list of appointment meeting interests.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;
using System;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

ListMeetingInterestsRequest req = new ListMeetingInterestsRequest() {
    After = System.DateTime.Parse("2017-01-02T02:00:00Z").ToUniversalTime(),
    Before = System.DateTime.Parse("2017-01-02T02:00:00Z").ToUniversalTime(),
    Token = "0e28af57-511f-47ab-ae46-46cd1ca51a1a",
    Filter = "appointmentEvent.id eq 'd165ad63-4bec-449d-aa9e-054fc7fcbb71'",
};

ListMeetingInterestsResponse? res = await sdk.Appointments.ListMeetingInterestsAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

Parameter Type Required Description
request ListMeetingInterestsRequest ✔️ The request object to use for the request.

Response

ListMeetingInterestsResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

GetMeetingInterestById

Gets a single attendee's meeting interests in a particular appointment event by their interest ID.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

GetMeetingInterestByIdRequest req = new GetMeetingInterestByIdRequest() {
    Id = "0cdfa3f7-05da-4121-857b-d7732891e01a::52a68001-70ce-4ec4-a6fe-d0888123c715",
};

var res = await sdk.Appointments.GetMeetingInterestByIdAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetMeetingInterestByIdRequest ✔️ The request object to use for the request.

Response

GetMeetingInterestByIdResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 401, 403, 404 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

ListAppointments

Gets a paginated list of appointments.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;
using System;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

ListAppointmentsRequest req = new ListAppointmentsRequest() {
    After = System.DateTime.Parse("2017-01-02T02:00:00Z").ToUniversalTime(),
    Before = System.DateTime.Parse("2017-01-02T02:00:00Z").ToUniversalTime(),
    Token = "0e28af57-511f-47ab-ae46-46cd1ca51a1a",
    Filter = "appointmentEvent.id eq 'ad0ea301-1203-4fee-a7d2-54165ba14e2d'",
};

ListAppointmentsResponse? res = await sdk.Appointments.ListAppointmentsAsync(req);

while(res != null)
{
    // handle items

    res = await res.Next!();
}

Parameters

Parameter Type Required Description
request ListAppointmentsRequest ✔️ The request object to use for the request.

Response

ListAppointmentsResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 400, 401, 403 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*

GetAppointmentById

Gets a single appointment by its ID.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

using Cvent.SDK;
using Cvent.SDK.Models.Components;
using Cvent.SDK.Models.Requests;

var sdk = new CventSDK(security: new Security() {
    OAuth2ClientCredentials = new SchemeOAuth2ClientCredentials() {
        ClientID = "<YOUR_CLIENT_ID_HERE>",
        ClientSecret = "<YOUR_CLIENT_SECRET_HERE>",
        TokenURL = "<YOUR_TOKEN_URL_HERE>",
        Scopes = "<YOUR_SCOPES_HERE>",
    },
});

GetAppointmentByIdRequest req = new GetAppointmentByIdRequest() {
    Id = "04ca6ae2-0dc3-487b-953e-86d6abbdf7d3",
};

var res = await sdk.Appointments.GetAppointmentByIdAsync(req);

// handle response

Parameters

Parameter Type Required Description
request GetAppointmentByIdRequest ✔️ The request object to use for the request.

Response

GetAppointmentByIdResponse

Errors

Error Type Status Code Content Type
Cvent.SDK.Models.Errors.ErrorResponse12 401, 403, 404 application/json
Cvent.SDK.Models.Errors.APIException 4XX, 5XX */*