SearchProfiles - Amazon Connect Customer Profiles

SearchProfiles

Searches for profiles within a specific domain name using name, phone number, email address, account number, or a custom defined index.

Request Syntax

POST /domains/DomainName/profiles/search?max-results=MaxResults&next-token=NextToken HTTP/1.1 Content-type: application/json { "KeyName": "string", "Values": [ "string" ] }

URI Request Parameters

The request uses the following URI parameters.

DomainName

The unique name of the domain.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

MaxResults

The maximum number of objects returned per page.

Valid Range: Minimum value of 1. Maximum value of 100.

NextToken

The pagination token from the previous SearchProfiles API call.

Length Constraints: Minimum length of 1. Maximum length of 1024.

Request Body

The request accepts the following data in JSON format.

KeyName

A searchable identifier of a customer profile. The predefined keys you can use to search include: _account, _profileId, _fullName, _phone, _email, _ctrContactId, _marketoLeadId, _salesforceAccountId, _salesforceContactId, _zendeskUserId, _zendeskExternalId, _serviceNowSystemId.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

Values

A list of key values.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Items": [ { "AccountNumber": "string", "AdditionalInformation": "string", "Address": { "Address1": "string", "Address2": "string", "Address3": "string", "Address4": "string", "City": "string", "Country": "string", "County": "string", "PostalCode": "string", "Province": "string", "State": "string" }, "Attributes": { "string" : "string" }, "BillingAddress": { "Address1": "string", "Address2": "string", "Address3": "string", "Address4": "string", "City": "string", "Country": "string", "County": "string", "PostalCode": "string", "Province": "string", "State": "string" }, "BirthDate": "string", "BusinessEmailAddress": "string", "BusinessName": "string", "BusinessPhoneNumber": "string", "EmailAddress": "string", "FirstName": "string", "Gender": "string", "HomePhoneNumber": "string", "LastName": "string", "MailingAddress": { "Address1": "string", "Address2": "string", "Address3": "string", "Address4": "string", "City": "string", "Country": "string", "County": "string", "PostalCode": "string", "Province": "string", "State": "string" }, "MiddleName": "string", "MobilePhoneNumber": "string", "PartyType": "string", "PersonalEmailAddress": "string", "PhoneNumber": "string", "ProfileId": "string", "ShippingAddress": { "Address1": "string", "Address2": "string", "Address3": "string", "Address4": "string", "City": "string", "Country": "string", "County": "string", "PostalCode": "string", "Province": "string", "State": "string" } } ], "NextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Items

The list of SearchProfiles instances.

Type: Array of Profile objects

NextToken

The pagination token from the previous SearchProfiles API call.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

BadRequestException

The input you provided is invalid.

HTTP Status Code: 400

InternalServerException

An internal service error occurred.

HTTP Status Code: 500

ResourceNotFoundException

The requested resource does not exist, or access was denied.

HTTP Status Code: 404

ThrottlingException

You exceeded the maximum number of requests.

HTTP Status Code: 429

Examples

Example 1

This example illustrates one usage of SearchProfiles.

Sample Request

POST /domains/ExampleDomainName/profiles/search?max-results=10&next-token=nextTokenString HTTP/1.1 Content-type: application/json { "KeyName": "_phone", "Values": ["555-333-7777"] }

Sample Response

Content-type: application/json { "NextToken": "5231b533-ba17-4787-98a3-f2df3EXAMPLE", "Items":[ { "ProfileId" : "3991a7d95sd248bba82546b2dEXAMPLE", "AccountNumber": "ACCT12344", "Address": { "Address1": "123 Sample St", "Address2": "Apt 4", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "Attributes": { "SSN" : "123-44-3433", "LoyaltyPoints" : "4000" }, "BillingAddress": { "Address1": "789 Sample St", "Address2": "Apt 1", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "BirthDate": "07/12/1980", "BusinessEmailAddress": "example@amazon.com", "BusinessName": "My Awesome Company", "BusinessPhoneNumber": "555-334-3389", "EmailAddress": "example@gmail.com", "FirstName": "John", "Gender": "MALE", "HomePhoneNumber": "555-334-3344", "LastName": "Doe", "MailingAddress": { "Address1": "234 Home St", "Address2": "Apt 5", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "AdditionalInformation": "High Profile Customer", "MiddleName": "", "MobilePhoneNumber": "555-333-7777", "PartyType": "INDIVIDUAL", "PersonalEmailAddress": "email1@gmail.com", "PhoneNumber": "", "ShippingAddress": { "Address1": "555 A St", "Address2": "Suite 100", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" } }, { "ProfileId" : "ef30fad550894e0a95f9d64cbEXAMPLE", "AccountNumber": "ACCT12344", "Address": { "Address1": "123 Sample St", "Address2": "Apt 4", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "Attributes": { "SSN" : "123-44-3433", "LoyaltyPoints" : "4000" }, "BillingAddress": { "Address1": "789 Sample St", "Address2": "Apt 1", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "BirthDate": "07/12/1980", "BusinessEmailAddress": "example@amazon.com", "BusinessName": "My Awesome Company", "BusinessPhoneNumber": "555-334-3389", "EmailAddress": "example@gmail.com", "FirstName": "John", "Gender": "MALE", "HomePhoneNumber": "555-334-3344", "LastName": "Doe", "MailingAddress": { "Address1": "234 Home St", "Address2": "Apt 5", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "AdditionalInformation": "High Profile Customer", "MiddleName": "", "MobilePhoneNumber": "555-333-7777", "PartyType": "INDIVIDUAL", "PersonalEmailAddress": "email1@gmail.com", "PhoneNumber": "", "ShippingAddress": { "Address1": "555 A St", "Address2": "Suite 100", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" } } ] }

Example 2

This example illustrates one usage of SearchProfiles.

Sample Request

POST /domains/ExampleDomainName/profiles/search?max-results=10&next-token=nextTokenString HTTP/1.1 Content-type: application/json { "KeyName": "_email", "Values": ["email1@gmail.com"] }

Sample Response

Content-type: application/json { "NextToken": "5231b533-ba17-4787-98a3-f2df3EXAMPLE", "Items":[ { "ProfileId" : "ef30fad55099ee0a95f9d64cbEXAMPLE", "AccountNumber": "ACCT12344", "Address": { "Address1": "123 Sample St", "Address2": "Apt 4", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "Attributes": { "SSN" : "123-44-3433", "LoyaltyPoints" : "4000" }, "BillingAddress": { "Address1": "789 Sample St", "Address2": "Apt 1", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "BirthDate": "07/12/1980", "BusinessEmailAddress": "example@amazon.com", "BusinessName": "My Awesome Company", "BusinessPhoneNumber": "555-334-3389", "EmailAddress": "example@gmail.com", "FirstName": "John", "Gender": "MALE", "HomePhoneNumber": "555-334-3344", "LastName": "Doe", "MailingAddress": { "Address1": "234 Home St", "Address2": "Apt 5", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "AdditionalInformation": "High Profile Customer", "MiddleName": "", "MobilePhoneNumber": "555-333-7777", "PartyType": "INDIVIDUAL", "PersonalEmailAddress": "email5@gmail.com", "PhoneNumber": "", "ShippingAddress": { "Address1": "555 A St", "Address2": "Suite 100", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" } }, { "ProfileId" : "3991a7d959d238bba82546b2dEXAMPLE", "AccountNumber": "ACCT12344", "Address": { "Address1": "123 Sample St", "Address2": "Apt 4", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "Attributes": { "SSN" : "123-44-3433", "LoyaltyPoints" : "4000" }, "BillingAddress": { "Address1": "789 Sample St", "Address2": "Apt 1", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "BirthDate": "07/12/1980", "BusinessEmailAddress": "example@amazon.com", "BusinessName": "My Awesome Company", "BusinessPhoneNumber": "555-334-3389", "EmailAddress": "example@gmail.com", "FirstName": "John", "Gender": "MALE", "HomePhoneNumber": "555-334-3344", "LastName": "Doe", "MailingAddress": { "Address1": "234 Home St", "Address2": "Apt 5", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" }, "AdditionalInformation": "High Profile Customer", "MiddleName": "", "MobilePhoneNumber": "555-333-7777", "PartyType": "INDIVIDUAL", "PersonalEmailAddress": "email1@gmail.com", "PhoneNumber": "", "ShippingAddress": { "Address1": "555 A St", "Address2": "Suite 100", "Address3": "", "Address4": "", "City": "Seattle", "Country": "USA", "County": "King", "PostalCode": "98011", "Province": "", "State": "WA" } } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: