A contact is a record in your account’s address book that represents an individual. The data stored within these records includes personal information, group memberships, and historical data on event attendance. Contact APIs will allow you to get contact information, track updates to contact information, and create contacts.
- createContactGroup - Create Contact Group
- listContactGroups - List Contact Groups
- getContactGroupById - Get Contact Group
- updateContactGroup - Update Contact Group
- deleteContactGroup - Delete Contact Group
- getContactIdsByContactGroup - Get Ids in Contact Group
- addContactToContactGroup - Add Contact To Group
- removeContactFromContactGroup - Remove Contact From Group
- listContactTypes - List Contact Types
- listContacts - List Contacts
- updateContacts - Update Contacts
- patchContacts - Patch Contacts
- createContacts - Create Contacts
- listContactsPostFilters - List Contacts
- getContactObfuscationStatusById - Get Obfuscation Status
- getChangeHistoryForASpecificContact - Get Contact Change History
- getContactById - Get Contact
- updateContactById - Update Contact
- patchContactById - Patch Contact
- deleteContactById - Delete Contact
- updateContactCustomFieldAnswers - Update Custom Field Answers
- mergeContacts - Merge Contacts
- obfuscateContactById - Obfuscate a Contact
- deleteContactProfileImage - Delete Contact Profile Picture
- assignContactProfileImage - Assign Contact Profile Picture
- getContactRelationshipsById - Get Related Contact Ids
- createContactRelationship - Add Contact Relationship
- deleteContactRelationship - Delete Contact Relationship
Create a contact group
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.CreateContactGroupResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
ContactGroupInput req = ContactGroupInput.builder()
.name("group name")
.shortDescription("short description")
.description("long description")
.distributionListInfo(DistributionListInfoInput.builder()
.internalNote("Sample distribution list internal note")
.build())
.build();
CreateContactGroupResponse res = sdk.contacts().createContactGroup()
.request(req)
.call();
if (res.contactGroup().isPresent()) {
System.out.println(res.contactGroup().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ContactGroupInput | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Gets a paginated list of contact groups
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.ListContactGroupsRequest;
import com.cvent.models.operations.ListContactGroupsResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
ListContactGroupsRequest req = ListContactGroupsRequest.builder()
.after(OffsetDateTime.parse("2017-01-02T02:00:00Z"))
.before(OffsetDateTime.parse("2017-01-02T02:00:00Z"))
.token("0e28af57-511f-47ab-ae46-46cd1ca51a1a")
.filter("name eq 'groupName' and type eq 'STANDARD'")
.build();
sdk.contacts().listContactGroups()
.callAsStream()
.forEach((ListContactGroupsResponse item) -> {
// handle page
});
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ListContactGroupsRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Get a single contact group
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.GetContactGroupByIdRequest;
import com.cvent.models.operations.GetContactGroupByIdResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
GetContactGroupByIdRequest req = GetContactGroupByIdRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
GetContactGroupByIdResponse res = sdk.contacts().getContactGroupById()
.request(req)
.call();
if (res.contactGroup().isPresent()) {
System.out.println(res.contactGroup().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetContactGroupByIdRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Update a contact group
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.UpdateContactGroupRequest;
import com.cvent.models.operations.UpdateContactGroupResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
UpdateContactGroupRequest req = UpdateContactGroupRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.contactGroup(ContactGroupInput.builder()
.name("group name")
.shortDescription("short description")
.description("long description")
.distributionListInfo(DistributionListInfoInput.builder()
.internalNote("Sample distribution list internal note")
.build())
.build())
.build();
UpdateContactGroupResponse res = sdk.contacts().updateContactGroup()
.request(req)
.call();
if (res.contactGroup().isPresent()) {
System.out.println(res.contactGroup().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
UpdateContactGroupRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Delete a contact group
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.DeleteContactGroupRequest;
import com.cvent.models.operations.DeleteContactGroupResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
DeleteContactGroupRequest req = DeleteContactGroupRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
DeleteContactGroupResponse res = sdk.contacts().deleteContactGroup()
.request(req)
.call();
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
DeleteContactGroupRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Get all contact ids in a single contact group
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.GetContactIdsByContactGroupRequest;
import com.cvent.models.operations.GetContactIdsByContactGroupResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
GetContactIdsByContactGroupRequest req = GetContactIdsByContactGroupRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.token("0e28af57-511f-47ab-ae46-46cd1ca51a1a")
.build();
sdk.contacts().getContactIdsByContactGroup()
.callAsStream()
.forEach((GetContactIdsByContactGroupResponse item) -> {
// handle page
});
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetContactIdsByContactGroupRequest | ✔️ | The request object to use for the request. |
GetContactIdsByContactGroupResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Adds a single Contact to a single Contact Group
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.AddContactToContactGroupRequest;
import com.cvent.models.operations.AddContactToContactGroupResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
AddContactToContactGroupRequest req = AddContactToContactGroupRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.contactId("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
AddContactToContactGroupResponse res = sdk.contacts().addContactToContactGroup()
.request(req)
.call();
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
AddContactToContactGroupRequest | ✔️ | The request object to use for the request. |
AddContactToContactGroupResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Removes a single Contact from a single Contact Group
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.RemoveContactFromContactGroupRequest;
import com.cvent.models.operations.RemoveContactFromContactGroupResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
RemoveContactFromContactGroupRequest req = RemoveContactFromContactGroupRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.contactId("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
RemoveContactFromContactGroupResponse res = sdk.contacts().removeContactFromContactGroup()
.request(req)
.call();
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
RemoveContactFromContactGroupRequest | ✔️ | The request object to use for the request. |
RemoveContactFromContactGroupResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Gets a paginated list of contact types.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.ListContactTypesRequest;
import com.cvent.models.operations.ListContactTypesResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
ListContactTypesRequest req = ListContactTypesRequest.builder()
.token("0e28af57-511f-47ab-ae46-46cd1ca51a1a")
.filter("name eq 'groupType'")
.build();
sdk.contacts().listContactTypes()
.callAsStream()
.forEach((ListContactTypesResponse item) -> {
// handle page
});
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ListContactTypesRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Gets a paginated list of Contacts.
For information on reading secure contact fields, see the description of GET Contact.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.ListContactsRequest;
import com.cvent.models.operations.ListContactsResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
ListContactsRequest req = ListContactsRequest.builder()
.after(OffsetDateTime.parse("2017-01-02T02:00:00Z"))
.before(OffsetDateTime.parse("2017-01-02T02:00:00Z"))
.token("0e28af57-511f-47ab-ae46-46cd1ca51a1a")
.filter("firstName eq 'John' or lastName eq 'Anderson'")
.build();
sdk.contacts().listContacts()
.callAsStream()
.forEach((ListContactsResponse item) -> {
// handle page
});
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ListContactsRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Updates a list of contacts based on the values provided in the request body. If you're changing de-duplication fields, the new values must be unique in your account. For information on updating secure contact fields, see the description of PUT Contact.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.UpdateContactsResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
List<ContactUpdate> req = List.of();
UpdateContactsResponse res = sdk.contacts().updateContacts()
.request(req)
.call();
if (res.contactBulkResponse().isPresent()) {
System.out.println(res.contactBulkResponse().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
List | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Updates a list of contacts based on the values provided only, keeping the existing values intact for every contact.
For information on PATCH behavior, see the description of PATCH Contact.
For information on updating secure contact fields, see the description of PUT Contact.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.PatchContactsResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
List<ContactPatch> req = List.of(
ContactPatch.builder()
.id("6287f5c1-9d7f-4f15-9ffe-ca2cb290964c")
.firstName("Henry")
.lastName("Potterfield")
.middleName("A")
.nickname("Harry")
.email("h.potterfield@test.com")
.ccEmail("h.porter@tesing.com")
.designation("CPA")
.type(AttendeeContactTypeInput.builder()
.id("861B51EC-AA7E-475F-B38D-4C8E35C47D63")
.build())
.primaryAddressType(AddressType.HOME)
.homeFax("555-555-5555")
.workAddress(AddressInput.builder()
.address1("Cvent Inc.")
.address2("4001 West Parmer Lane")
.address3("PO Box 123")
.city("Austin")
.countryCode("US")
.postalCode("78727")
.regionCode("TX")
.build())
.workPhone("555-555-5555")
.workFax("555-555-5555")
.sourceId("system-a-00000000-0000-0000-0000-000000000000")
.mobilePhone("555-555-5555")
.prefix("Mr.")
.pager("555-555-5555")
.optOut(ContactOptOutInput.builder()
.build())
.npi("5555555555")
.passport(PassportInput.builder()
.number("123456789")
.countryCode("GB")
.build())
.nationalIdentificationNumber("123456789")
.headline("Marketing Director Crafting Memorable Campaigns that Engage Audiences and Elevate Brands")
.personalWebsite("https://www.example.com")
.biography("I am a marketing professional with experience in event planning and brand strategy.")
.pronouns("he/him/she/her/they/them")
.build());
PatchContactsResponse res = sdk.contacts().patchContacts()
.request(req)
.call();
if (res.contactBulkResponse().isPresent()) {
System.out.println(res.contactBulkResponse().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
List | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Creates a list of contacts based on the values provided in the request body. If you're changing de-duplication fields, the new values must be unique in your account. For information on creating contacts with secure contact fields, see the description of PUT Contact.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.CreateContactsRequest;
import com.cvent.models.operations.CreateContactsResponse;
import java.lang.Exception;
import java.time.LocalDate;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
CreateContactsRequest req = CreateContactsRequest.builder()
.requestBody(List.of(
ContactCreate.builder()
.firstName("Henry")
.lastName("Potterfield")
.middleName("A")
.nickname("Harry")
.email("h.potterfield@test.com")
.ccEmail("h.porter@tesing.com")
.gender(Gender.MALE)
.company("Cvent Inc.")
.designation("CPA")
.title("Event Planner")
.type(AttendeeContactTypeInput.builder()
.id("861B51EC-AA7E-475F-B38D-4C8E35C47D63")
.build())
.primaryAddressType(AddressType.HOME)
.homeAddress(AddressInput.builder()
.address1("Cvent Inc.")
.address2("4001 West Parmer Lane")
.address3("PO Box 123")
.city("Austin")
.countryCode("US")
.postalCode("78727")
.regionCode("TX")
.build())
.homePhone("555-555-5555")
.homeFax("555-555-5555")
.workAddress(AddressInput.builder()
.address1("Cvent Inc.")
.address2("4001 West Parmer Lane")
.address3("PO Box 123")
.city("Austin")
.countryCode("US")
.postalCode("78727")
.regionCode("TX")
.build())
.workPhone("555-555-5555")
.workFax("555-555-5555")
.sourceId("system-a-00000000-0000-0000-0000-000000000000")
.mobilePhone("555-555-5555")
.prefix("Mr.")
.pager("555-555-5555")
.optOut(ContactOptOutInput.builder()
.build())
.npi("5555555555")
.links(ContactLinksInput.builder()
.twitterUrl(Link.builder()
.href("?token=90c5f062-76ad-4ea4-aa53-00eb698d9262")
.build())
.facebookUrl(Link.builder()
.href("?token=90c5f062-76ad-4ea4-aa53-00eb698d9262")
.build())
.linkedInUrl(Link.builder()
.href("?token=90c5f062-76ad-4ea4-aa53-00eb698d9262")
.build())
.build())
.dateOfBirth(LocalDate.parse("1990-01-01"))
.passport(PassportInput.builder()
.number("123456789")
.countryCode("GB")
.build())
.socialSecurityNumber("123-45-6789")
.nationalIdentificationNumber("123456789")
.headline("Marketing Director Crafting Memorable Campaigns that Engage Audiences and Elevate Brands")
.personalWebsite("https://www.example.com")
.biography("I am a marketing professional with experience in event planning and brand strategy.")
.pronouns("he/him/she/her/they/them")
.build()))
.upsert(true)
.build();
CreateContactsResponse res = sdk.contacts().createContacts()
.request(req)
.call();
if (res.contactBulkResponse().isPresent()) {
System.out.println(res.contactBulkResponse().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
CreateContactsRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Gets a paginated list of Contacts by sending a filter in the body of the request. This method will return the same data as the GET List Contacts but allows for longer filters. For information on reading secure contact fields, see the description of GET Contact.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.ListContactsPostFiltersRequest;
import com.cvent.models.operations.ListContactsPostFiltersResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
ListContactsPostFiltersRequest req = ListContactsPostFiltersRequest.builder()
.after(OffsetDateTime.parse("2017-01-02T02:00:00Z"))
.before(OffsetDateTime.parse("2017-01-02T02:00:00Z"))
.token("0e28af57-511f-47ab-ae46-46cd1ca51a1a")
.filter(Filter.builder()
.filter("firstName eq 'John' or lastName eq 'Anderson'")
.build())
.build();
sdk.contacts().listContactsPostFilters()
.callAsStream()
.forEach((ListContactsPostFiltersResponse item) -> {
// handle page
});
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ListContactsPostFiltersRequest | ✔️ | The request object to use for the request. |
ListContactsPostFiltersResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Get the obfuscation status of a contact by the Obfuscate ID provided.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.GetContactObfuscationStatusByIdRequest;
import com.cvent.models.operations.GetContactObfuscationStatusByIdResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
GetContactObfuscationStatusByIdRequest req = GetContactObfuscationStatusByIdRequest.builder()
.obfuscateId("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
GetContactObfuscationStatusByIdResponse res = sdk.contacts().getContactObfuscationStatusById()
.request(req)
.call();
if (res.contactObfuscationStatus().isPresent()) {
System.out.println(res.contactObfuscationStatus().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetContactObfuscationStatusByIdRequest | ✔️ | The request object to use for the request. |
GetContactObfuscationStatusByIdResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Get the change history for a specific contact.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.GetChangeHistoryForASpecificContactRequest;
import com.cvent.models.operations.GetChangeHistoryForASpecificContactResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
GetChangeHistoryForASpecificContactRequest req = GetChangeHistoryForASpecificContactRequest.builder()
.contactId("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.before(OffsetDateTime.parse("2017-01-02T02:00:00Z"))
.after(OffsetDateTime.parse("2017-01-02T02:00:00Z"))
.token("0e28af57-511f-47ab-ae46-46cd1ca51a1a")
.build();
sdk.contacts().getChangeHistoryForASpecificContact()
.callAsStream()
.forEach((GetChangeHistoryForASpecificContactResponse item) -> {
// handle page
});
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetChangeHistoryForASpecificContactRequest | ✔️ | The request object to use for the request. |
GetChangeHistoryForASpecificContactResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Get a single contact.
When reading a contact, the following secure contact fields are only returned when
also providing the event/contacts:read-sensitive scope:
- socialSecurityNumber
- passportNumber
- nationalIdentificationNumber
- dateOfBirth
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.GetContactByIdRequest;
import com.cvent.models.operations.GetContactByIdResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
GetContactByIdRequest req = GetContactByIdRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
GetContactByIdResponse res = sdk.contacts().getContactById()
.request(req)
.call();
if (res.contact().isPresent()) {
System.out.println(res.contact().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetContactByIdRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Updates a contact based on contact ID and the values provided in the request body. If you're changing de-duplication fields, the new values must be unique in your account.
When writing a contact, the following secure contact fields are only written when also providing the event/contacts:write-sensitive scope:
- socialSecurityNumber
- passportNumber
- nationalIdentificationNumber
- dateOfBirth
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.UpdateContactByIdRequest;
import com.cvent.models.operations.UpdateContactByIdResponse;
import java.lang.Exception;
import java.time.LocalDate;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
UpdateContactByIdRequest req = UpdateContactByIdRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.contactUpdate(ContactUpdate.builder()
.id("35072f36-7cef-4254-82ae-1b411ba42d5f")
.firstName("Henry")
.lastName("Potterfield")
.middleName("A")
.nickname("Harry")
.email("h.potterfield@test.com")
.ccEmail("h.porter@tesing.com")
.gender(Gender.MALE)
.company("Cvent Inc.")
.designation("CPA")
.title("Event Planner")
.type(AttendeeContactTypeInput.builder()
.id("861B51EC-AA7E-475F-B38D-4C8E35C47D63")
.build())
.primaryAddressType(AddressType.HOME)
.homeAddress(AddressInput.builder()
.address1("Cvent Inc.")
.address2("4001 West Parmer Lane")
.address3("PO Box 123")
.city("Austin")
.countryCode("US")
.postalCode("78727")
.regionCode("TX")
.build())
.homePhone("555-555-5555")
.homeFax("555-555-5555")
.workAddress(AddressInput.builder()
.address1("Cvent Inc.")
.address2("4001 West Parmer Lane")
.address3("PO Box 123")
.city("Austin")
.countryCode("US")
.postalCode("78727")
.regionCode("TX")
.build())
.workPhone("555-555-5555")
.workFax("555-555-5555")
.sourceId("system-a-00000000-0000-0000-0000-000000000000")
.mobilePhone("555-555-5555")
.prefix("Mr.")
.pager("555-555-5555")
.optOut(ContactOptOutInput.builder()
.build())
.npi("5555555555")
.links(ContactLinksInput.builder()
.twitterUrl(Link.builder()
.href("?token=90c5f062-76ad-4ea4-aa53-00eb698d9262")
.build())
.facebookUrl(Link.builder()
.href("?token=90c5f062-76ad-4ea4-aa53-00eb698d9262")
.build())
.linkedInUrl(Link.builder()
.href("?token=90c5f062-76ad-4ea4-aa53-00eb698d9262")
.build())
.build())
.dateOfBirth(LocalDate.parse("1990-01-01"))
.passport(PassportInput.builder()
.number("123456789")
.countryCode("GB")
.build())
.socialSecurityNumber("123-45-6789")
.nationalIdentificationNumber("123456789")
.headline("Marketing Director Crafting Memorable Campaigns that Engage Audiences and Elevate Brands")
.personalWebsite("https://www.example.com")
.biography("I am a marketing professional with experience in event planning and brand strategy.")
.pronouns("he/him/she/her/they/them")
.build())
.build();
UpdateContactByIdResponse res = sdk.contacts().updateContactById()
.request(req)
.call();
if (res.contact().isPresent()) {
System.out.println(res.contact().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
UpdateContactByIdRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Updates a part of a contact based on the given contactId.
To update a field, pass the value to be updated. To delete a field, set the field to null. Fields not passed in the request body will remain unchanged.
For information on updating secure contact fields, see the description of PUT Contact.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.PatchContactByIdRequest;
import com.cvent.models.operations.PatchContactByIdResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
PatchContactByIdRequest req = PatchContactByIdRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.contactPatch(ContactPatch.builder()
.id("07460b8e-b91c-45c8-8cff-780165752daa")
.firstName("Henry")
.lastName("Potterfield")
.middleName("A")
.nickname("Harry")
.email("h.potterfield@test.com")
.ccEmail("h.porter@tesing.com")
.designation("CPA")
.type(AttendeeContactTypeInput.builder()
.id("861B51EC-AA7E-475F-B38D-4C8E35C47D63")
.build())
.primaryAddressType(AddressType.HOME)
.homeFax("555-555-5555")
.workAddress(AddressInput.builder()
.address1("Cvent Inc.")
.address2("4001 West Parmer Lane")
.address3("PO Box 123")
.city("Austin")
.countryCode("US")
.postalCode("78727")
.regionCode("TX")
.build())
.workPhone("555-555-5555")
.workFax("555-555-5555")
.sourceId("system-a-00000000-0000-0000-0000-000000000000")
.mobilePhone("555-555-5555")
.prefix("Mr.")
.pager("555-555-5555")
.optOut(ContactOptOutInput.builder()
.build())
.npi("5555555555")
.passport(PassportInput.builder()
.number("123456789")
.countryCode("GB")
.build())
.nationalIdentificationNumber("123456789")
.headline("Marketing Director Crafting Memorable Campaigns that Engage Audiences and Elevate Brands")
.personalWebsite("https://www.example.com")
.biography("I am a marketing professional with experience in event planning and brand strategy.")
.pronouns("he/him/she/her/they/them")
.build())
.build();
PatchContactByIdResponse res = sdk.contacts().patchContactById()
.request(req)
.call();
if (res.contact().isPresent()) {
System.out.println(res.contact().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
PatchContactByIdRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Deletes a contact from the address book but does not remove the contact from events.
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.DeleteContactByIdRequest;
import com.cvent.models.operations.DeleteContactByIdResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
DeleteContactByIdRequest req = DeleteContactByIdRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
DeleteContactByIdResponse res = sdk.contacts().deleteContactById()
.request(req)
.call();
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
DeleteContactByIdRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 401, 403, 404, 409, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Update custom field answers for a single custom field and single contact
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.UpdateContactCustomFieldAnswersRequest;
import com.cvent.models.operations.UpdateContactCustomFieldAnswersResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
UpdateContactCustomFieldAnswersRequest req = UpdateContactCustomFieldAnswersRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.customFieldId("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.customField(CustomFieldInput.builder()
.id("2900aa71-b025-4a43-ab99-825a225ac215")
.value(List.of(
"Choice C",
"Choice A"))
.type(CustomFieldCustomFieldType.GENERAL)
.build())
.build();
UpdateContactCustomFieldAnswersResponse res = sdk.contacts().updateContactCustomFieldAnswers()
.request(req)
.call();
if (res.customField().isPresent()) {
System.out.println(res.customField().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
UpdateContactCustomFieldAnswersRequest | ✔️ | The request object to use for the request. |
UpdateContactCustomFieldAnswersResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Merges two or three contacts into a single contact.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.MergeContactsRequest;
import com.cvent.models.operations.MergeContactsResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
MergeContactsRequest req = MergeContactsRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.contactMerge(ContactMerge.builder()
.secondaryContacts(List.of(
"04ca6ae2-0dc3-487b-953e-86d6abbdf7d3"))
.conflictResolution(ConflictResolution.builder()
.contactFields(List.of(
ContactMergeField.builder()
.fieldName("firstName")
.contactId("a45a3341-d30f-4bd9-bfd8-fbcdae37f0f2")
.build()))
.build())
.build())
.build();
MergeContactsResponse res = sdk.contacts().mergeContacts()
.request(req)
.call();
if (res.contact().isPresent()) {
System.out.println(res.contact().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
MergeContactsRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 409, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Initiate obfuscation of a contact based on the given ID. Verify the status of the obfuscation using Get Obfuscation Status. Once this process succeeds, all the data for the contact will be obfuscated and will no longer be retrievable. See the Obfuscation User Guide for more details.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.ObfuscateContactByIdRequest;
import com.cvent.models.operations.ObfuscateContactByIdResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
ObfuscateContactByIdRequest req = ObfuscateContactByIdRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
ObfuscateContactByIdResponse res = sdk.contacts().obfuscateContactById()
.request(req)
.call();
if (res.contactObfuscationStatus().isPresent()) {
System.out.println(res.contactObfuscationStatus().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ObfuscateContactByIdRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 401, 403, 404, 409, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Deletes the profile picture of the given contact.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.DeleteContactProfileImageRequest;
import com.cvent.models.operations.DeleteContactProfileImageResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
DeleteContactProfileImageRequest req = DeleteContactProfileImageRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
DeleteContactProfileImageResponse res = sdk.contacts().deleteContactProfileImage()
.request(req)
.call();
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
DeleteContactProfileImageRequest | ✔️ | The request object to use for the request. |
DeleteContactProfileImageResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Assign a profile picture to a contact with a file UUID from file upload endpoint. This will replace the current profile picture if one is assigned.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.*;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.AssignContactProfileImageRequest;
import com.cvent.models.operations.AssignContactProfileImageResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
AssignContactProfileImageRequest req = AssignContactProfileImageRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.contactFile(ContactFileInput.builder()
.file(ContactFileFile.builder()
.build())
.build())
.build();
AssignContactProfileImageResponse res = sdk.contacts().assignContactProfileImage()
.request(req)
.call();
if (res.contactFile().isPresent()) {
System.out.println(res.contactFile().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
AssignContactProfileImageRequest | ✔️ | The request object to use for the request. |
AssignContactProfileImageResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Get all contact Ids related to the provided contact.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.GetContactRelationshipsByIdRequest;
import com.cvent.models.operations.GetContactRelationshipsByIdResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
GetContactRelationshipsByIdRequest req = GetContactRelationshipsByIdRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.token("0e28af57-511f-47ab-ae46-46cd1ca51a1a")
.build();
sdk.contacts().getContactRelationshipsById()
.callAsStream()
.forEach((GetContactRelationshipsByIdResponse item) -> {
// handle page
});
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
GetContactRelationshipsByIdRequest | ✔️ | The request object to use for the request. |
GetContactRelationshipsByIdResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Adds a single contact relationship between the two contact Ids provided.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.CreateContactRelationshipRequest;
import com.cvent.models.operations.CreateContactRelationshipResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
CreateContactRelationshipRequest req = CreateContactRelationshipRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.relatedContactId("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
CreateContactRelationshipResponse res = sdk.contacts().createContactRelationship()
.request(req)
.call();
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
CreateContactRelationshipRequest | ✔️ | The request object to use for the request. |
CreateContactRelationshipResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 400, 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |
Deletes a single contact relationship between the two contact Ids provided.
More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>
package hello.world;
import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.DeleteContactRelationshipRequest;
import com.cvent.models.operations.DeleteContactRelationshipResponse;
import java.lang.Exception;
import java.util.List;
public class Application {
public static void main(String[] args) throws ErrorResponse1, Exception {
CventSDK sdk = CventSDK.builder()
.security(Security.builder()
.oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
.clientID("<id>")
.clientSecret("<value>")
.tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
.scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
.build())
.build())
.build();
DeleteContactRelationshipRequest req = DeleteContactRelationshipRequest.builder()
.id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.relatedContactId("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
.build();
DeleteContactRelationshipResponse res = sdk.contacts().deleteContactRelationship()
.request(req)
.call();
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
DeleteContactRelationshipRequest | ✔️ | The request object to use for the request. |
DeleteContactRelationshipResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ErrorResponse1 | 401, 403, 404, 429 | application/json |
| models/errors/APIException | 4XX, 5XX | */* |