addProfileAddress
post
/ccstore/v1/profiles/current/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
Body Parameter
Root Schema : addProfileAddress_request
- address
-
Type:
object
addressRequired:true
Additional Properties Allowed:The address object of the profile - addressType
-
Type:
string
The nickname for the address.
Nested Schema : address
Type:
object
The address object of the profile
- address1
-
Type:
string
address line 1 for the address - address2
-
Type:
string
Address line 2 for the address - city
-
Type:
string
city for the address - companyName
-
Type:
string
companyName for the address. It is not mandatory for the profile addresses. - country
-
Type:
string
The country of the address - county
-
Type:
string
county for the address - firstName
-
Type:
string
The first name of the user for whom the address is created. This field can be null also - lastName
-
Type:
string
The last name of the user for whom the address is created. This field can be null also - phoneNumber
-
Type:
string
Phone number of the address - postalCode
-
Type:
string
postalCode for the address - state
-
Type:
string
state for the address
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : addProfileAddress_response
- address
-
Type:
object
addressAdditional Properties Allowed:The address object of the profile - addressType
-
Type:
string
The nickname for the address.
Nested Schema : address
Type:
object
The address object of the profile
- address1
-
Type:
string
address line 1 for the address - address2
-
Type:
string
Address line 2 for the address - city
-
Type:
string
city for the address - companyName
-
Type:
string
companyName for the address. It is not mandatory for the profile addresses. - country
-
Type:
string
The country of the address - county
-
Type:
string
county for the address - firstName
-
Type:
string
The first name of the user for whom the address is created. This field can be null also - lastName
-
Type:
string
The last name of the user for whom the address is created. This field can be null also - phoneNumber
-
Type:
string
Phone number of the address - postalCode
-
Type:
string
postalCode for the address - state
-
Type:
string
state for the address
Example application/json
{
"address":{
"country":"US",
"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 occured 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|
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Response Payload returned by endpoint:
{ "address": { "country": "US", "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" }