addProfileAddress
post
/ccappagent/v1/profiles/{id}/addresses
Add profile address for a shopper. Any B2C user can add profile address. The B2B user needs to have profileAddressManager role in the current organization.
Request
Supported Media Types
- application/json
Path Parameters
-
id: string
The customer profile id.
Root Schema : addProfileAddress_request
Type:
Show Source
object
-
address:
object address
The address object of the profile
-
addressType(optional):
string
The nickname for the address.
Example:
{
"address":{
"country":"US",
"lastName":"Anderson",
"address3":"abc",
"city":"Syracuse",
"address2":"xyz",
"prefix":null,
"address1":"21 Cedar Ave",
"postalCode":"13202",
"jobTitle":"dsfdsf",
"companyName":null,
"county":null,
"suffix":null,
"firstName":"Kim",
"phoneNumber":"212-555-1977",
"faxNumber":null,
"middleName":null,
"state":"NY"
},
"addressType":"Address12"
}
Nested Schema : address
Type:
object
The address object of the profile
Show Source
-
address1(optional):
string
address line 1 for the address
-
address2(optional):
string
Address line 2 for the address
-
city(optional):
string
city for the address
-
companyName(optional):
string
companyName for the address. It is not mandatory for the profile addresses.
-
country(optional):
string
The country of the address
-
county(optional):
string
county for the address
-
firstName(optional):
string
The first name of the user for whom the address is created. This field can be null also
-
lastName(optional):
string
The last name of the user for whom the address is created. This field can be null also
-
phoneNumber(optional):
string
Phone number of the address
-
postalCode(optional):
string
postalCode for the address
-
state(optional):
string
state for the address
-
types(optional):
array types
The types tagged to the address
Nested Schema : items
Type:
Show Source
object
-
id(optional):
string
repository Id of the address type
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : addProfileAddress_response
Type:
Show Source
object
-
address(optional):
object address
The address object of the profile
-
addressType(optional):
string
The nickname for the address.
Nested Schema : address
Type:
object
The address object of the profile
Show Source
-
address1(optional):
string
address line 1 for the address
-
address2(optional):
string
Address line 2 for the address
-
city(optional):
string
city for the address
-
companyName(optional):
string
companyName for the address. It is not mandatory for the profile addresses.
-
country(optional):
string
The country of the address
-
county(optional):
string
county for the address
-
firstName(optional):
string
The first name of the user for whom the address is created. This field can be null also
-
lastName(optional):
string
The last name of the user for whom the address is created. This field can be null also
-
phoneNumber(optional):
string
Phone number of the address
-
postalCode(optional):
string
postalCode for the address
-
state(optional):
string
state for the address
-
types(optional):
array types
The types tagged to the address
Nested Schema : items
Type:
Show Source
object
-
displayName(optional):
string
The name of the address type
-
id(optional):
string
repository Id of the address type
-
repositoryId(optional):
string
repository Id of the address type
Example Response (application/json)
{
"address":{
"country":"US",
"externalAddressId":"EXT_ADDR_1",
"types":[
{
"displayName":"Billing",
"repositoryId":"ss-10002",
"id":"ss-10001"
}
],
"phoneNumber":"907-385-4412",
"address2":"",
"city":"Anchorage",
"address1":"639 Main St",
"postalCode":"99501",
"companyName":"National Discount Auto Parts",
"repositoryId":"210026",
"state":"AZ"
},
"addressType":"Addr3ess313333312-Profile"
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|22031|Internal error during get profile|
|22032|Error occurred due to invalid data|
|22033|User is not logged in.|
|22000|The profile id passes is null or empty.|
|22001|Internal error while getting the profile.|
|22002|No profile found with the given id.|
|23005|Invalid phone number is specified|
|23007|No country is specified|
|23008|Postal code is not specified|
|23010|City is not specified|
|23011|Address line 1 not specified|
|100077|One of the dynamic properties is not writable by the Agent user|
||Invalid address type ID {0}|
|180106|One or more address type ID is invalid|
|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code