addProfileAddress
post
/ccadmin/v1/profiles/{id}/addresses
Add profile address for a shopper.
Request
Supported Media Types
- application/json
Path Parameters
-
id(required): string
The customer profile id.
Root Schema : addProfileAddress_request
Type:
Show Source
object
-
address(required):
object address
The address object of the profile
-
addressType:
string
The nickname for the address.
Example:
{
"address":{
"lastName":"Anderson",
"country":"US",
"types":[
{
"id":"ss-10002"
}
],
"address3":"",
"city":"Buffalo",
"address2":"",
"address1":"1234, International Avenue",
"postalCode":"32305",
"companyName":"Oracle",
"firstName":"kim",
"phoneNumber":"813-123-1234",
"repositoryId":"ss-1234",
"state":"FL"
},
"addressType":"Home"
}
Nested Schema : address
Type:
object
The address object of the profile
Show Source
-
address1(required):
string
address line 1 for the address
-
address2:
string
Address line 2 for the address
-
address3:
string
Address line 3 for the address
-
city(required):
string
city for the address
-
companyName:
string
companyName for the address. It is not mandatory for the profile addresses.
-
country(required):
string
The country of the address
-
county:
string
county for the address
-
externalAddressId:
string
External address id
-
firstName:
string
The first name of the user for whom the address is created. This field can be null also
-
lastName:
string
The last name of the user for whom the address is created. This field can be null also
-
phoneNumber:
string
Phone number of the address
-
postalCode(required):
string
postalCode for the address
-
repositoryId:
boolean
repository id of the address
-
state(required):
string
state for the address
-
types:
array types
The types tagged to the address
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : addProfileAddress_response
Type:
Show Source
object
-
address:
object address
The address object of the profile
-
addressType:
string
The nickname for the address.
Nested Schema : address
Type:
object
The address object of the profile
Show Source
-
address1:
string
address line 1 for the address
-
address2:
string
Address line 2 for the address
-
address3:
string
Address line 3 for the address
-
city:
string
city for the address
-
companyName:
string
companyName for the address. It is not mandatory for the profile addresses.
-
country:
string
The country of the address
-
county:
string
county for the address
-
externalAddressId:
string
External address id
-
firstName:
string
The first name of the user for whom the address is created. This field can be null also
-
lastName:
string
-
phoneNumber:
string
Phone number of the address
-
postalCode:
string
postalCode for the address
-
state:
string
state for the address
-
types:
array types
The types tagged to the address
Nested Schema : items
Type:
Show Source
object
-
displayName:
string
The name of the address type
-
id:
string
repository Id of the address type
-
repositoryId:
string
repository Id of the address type
Example Response (application/json)
{
"address":{
"lastName":"Anderson",
"country":"US",
"types":[
{
"displayName":"Billing",
"repositoryId":"ss-10002",
"id":"ss-10002"
}
],
"address3":null,
"address2":"",
"city":"Buffalo",
"address1":"1234, International Avenue",
"postalCode":"32305",
"companyName":"Oracle",
"county":null,
"firstName":"kim",
"phoneNumber":"813-123-1234",
"repositoryId":"130000",
"state":"FL"
},
"addressType":"Home"
}
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|
|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 user|
|23030|Invalid country and state is specified|
|180106|One or more address type ID is invalid|
|100204|Missing ID for address type|
|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code