CreateProfile
Creates a standard profile.
A standard profile represents the following attributes for a customer profile in a domain.
Request Syntax
POST /domains/DomainName
/profiles HTTP/1.1
Content-type: application/json
{
"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
",
"GenderString": "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
",
"PartyTypeString": "string
",
"PersonalEmailAddress": "string
",
"PhoneNumber": "string
",
"ShippingAddress": {
"Address1": "string
",
"Address2": "string
",
"Address3": "string
",
"Address4": "string
",
"City": "string
",
"Country": "string
",
"County": "string
",
"PostalCode": "string
",
"Province": "string
",
"State": "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
Request Body
The request accepts the following data in JSON format.
- AccountNumber
-
An account number that you have given to the customer.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- AdditionalInformation
-
Any additional information relevant to the customer’s profile.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1000.
Required: No
- Address
-
A generic address associated with the customer that is not mailing, shipping, or billing.
Type: Address object
Required: No
- Attributes
-
A key value pair of attributes of a customer profile.
Type: String to string map
Key Length Constraints: Minimum length of 1. Maximum length of 255.
Value Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- BillingAddress
-
The customer’s billing address.
Type: Address object
Required: No
- BirthDate
-
The customer’s birth date.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- BusinessEmailAddress
-
The customer’s business email address.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- BusinessName
-
The name of the customer’s business.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- BusinessPhoneNumber
-
The customer’s business phone number.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- EmailAddress
-
The customer’s email address, which has not been specified as a personal or business address.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- FirstName
-
The customer’s first name.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- Gender
-
This parameter has been deprecated.
The gender with which the customer identifies.
Type: String
Valid Values:
MALE | FEMALE | UNSPECIFIED
Required: No
- GenderString
-
An alternative to
Gender
which accepts any string as input.Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- HomePhoneNumber
-
The customer’s home phone number.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- LastName
-
The customer’s last name.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- MailingAddress
-
The customer’s mailing address.
Type: Address object
Required: No
- MiddleName
-
The customer’s middle name.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- MobilePhoneNumber
-
The customer’s mobile phone number.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- PartyType
-
This parameter has been deprecated.
The type of profile used to describe the customer.
Type: String
Valid Values:
INDIVIDUAL | BUSINESS | OTHER
Required: No
- PartyTypeString
-
An alternative to
PartyType
which accepts any string as input.Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- PersonalEmailAddress
-
The customer’s personal email address.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- PhoneNumber
-
The customer’s phone number, which has not been specified as a mobile, home, or business number.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: No
- ShippingAddress
-
The customer’s shipping address.
Type: Address object
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"ProfileId": "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.
- ProfileId
-
The unique identifier of a customer profile.
Type: String
Pattern:
[a-f0-9]{32}
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
This example illustrates one usage of CreateProfile.
Sample Request
POST /domains/ExampleDomainName/profiles HTTP/1.1
Content-type: application/json
{
"AccountNumber": "ACCT12344",
"Address": {
"Address1": "123 Sample St",
"Address2": "Apt 4",
"Address3": "null",
"Address4": "null",
"City": "Seattle",
"Country": "USA",
"County": "King",
"PostalCode": "98011",
"Province": "",
"State": "WA"
},
"Attributes": {
"SSN" : "123-44-3433",
"LoyaltyPoints" : "3000"
},
"BillingAddress": {
"Address1": "789 Sample St",
"Address2": "Apt 1",
"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",
"City": "Seattle",
"Country": "USA",
"County": "King",
"PostalCode": "98011",
"Province": "",
"State": "WA"
},
"AdditionalInformation": "High Profile Customer",
"MiddleName": "",
"MobilePhoneNumber": "555-334-7777",
"PartyType": "INDIVIDUAL",
"PersonalEmailAddress": "email1@gmail.com",
"PhoneNumber": "",
"ShippingAddress": {
"Address1": "555 A St",
"Address2": "Suite 100",
"City": "Seattle",
"Country": "USA",
"County": "King",
"PostalCode": "98011",
"Province": "",
"State": "WA"
}
}
Sample Response
Content-type: application/json
{
"ProfileId" : "3991a7d959d248bb982546b2dEXAMPLE"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: