updateProfileAddress
put
/ccstore/v1/profiles/current/addresses/{addressId}
Update profile address of the customer. If the customer is B2B, then the customer should have profile address manager role in that organization.
Request
Supported Media Types
- application/json
Path Parameters
- addressId
-
Type:
stringRequired:trueThe address Id associated to profile.
Body Parameter
Root Schema : updateProfileAddress_request
- address
-
Type:
objectaddressRequired:trueAdditional Properties Allowed:The address object of the profile - addressType
-
Type:
stringThe nickname for the address.
Nested Schema : address
Type:
objectThe address object of the profile
- address1
-
Type:
stringaddress line 1 for the address - address2
-
Type:
stringAddress line 2 for the address - city
-
Type:
stringcity for the address - companyName
-
Type:
stringcompanyName for the address. It is not mandatory for the profile addresses. - country
-
Type:
stringThe country of the address - county
-
Type:
stringcounty for the address - firstName
-
Type:
stringThe first name of the user for whom the address is created. This field can be null also - lastName
-
Type:
stringThe last name of the user for whom the address is created. This field can be null also - phoneNumber
-
Type:
stringPhone number of the address - postalCode
-
Type:
stringpostalCode for the address - state
-
Type:
stringstate for the address
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateProfileAddress_response
- address
-
Type:
objectaddressAdditional Properties Allowed:The address object of the profile - addressType
-
Type:
stringThe nickname for the address.
Nested Schema : address
Type:
objectThe address object of the profile
- address1
-
Type:
stringaddress line 1 for the address - address2
-
Type:
stringAddress line 2 for the address - city
-
Type:
stringcity for the address - companyName
-
Type:
stringcompanyName for the address. It is not mandatory for the profile addresses. - country
-
Type:
stringThe country of the address - county
-
Type:
stringcounty for the address - firstName
-
Type:
stringThe first name of the user for whom the address is created. This field can be null also - lastName
-
Type:
stringThe last name of the user for whom the address is created. This field can be null also - phoneNumber
-
Type:
stringPhone number of the address - postalCode
-
Type:
stringpostalCode for the address - state
-
Type:
stringstate for the address
Example application/json
{
"address":{
"firstName":"tr",
"lastName":"et",
"country":"US",
"phoneNumber":"631-748-6479",
"address2":"et",
"city":"te",
"address1":"et",
"postalCode":"35005",
"repositoryId":"130023",
"state":"AL"
},
"addressType":"tertr",
"links":[
{
"rel":"self",
"href":"http://localhost:9080/ccagentui/v1/profiles/se-570031/addresses/130023"
}
]
}
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|
|------------------|------------------|
|22030|User is not logged in|
|22031|Internal error during get profile|
|22032|Error occured due to invalid data|
|22002|No profile found with profile id|
|89103|The current user does not have administrator privileges and is not associated to an account|
|100190|Error occurred while attempting to fetch addresses from the repository.|
|22038|Invalid Address ID : address is not associated with user profile.|
|89101|User {0} does not have required permission to manage addresses.|
|100186|Updating of multiple address is not allowed|
|100183|Addresses is required|
|23010|City not specified in shipping address|
|23011|Address line 1 not specified in shipping address|
|22000|The profile id passes is null or empty.|
|23012|No last name specified in shipping address|
|22001|Internal error while getting the profile.|
|23013|No first name specified in shipping address|
|23015|Phone number not specified in shipping address|
|23005|Invalid phone number in shipping address|
|23007|No country specified in shipping address|
|23008|Postal code not specified in shipping address|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Response Payload returned by endpoint:
{
"address": {
"firstName": "tr",
"lastName": "et",
"country": "US",
"phoneNumber": "631-748-6479",
"address2": "et",
"city": "te",
"address1": "et",
"postalCode": "35005",
"repositoryId": "130023",
"state": "AL"
},
"addressType": "tertr",
"links": [{
"rel": "self",
"href": "http://localhost:9080/ccagentui/v1/profiles/se-570031/addresses/130023"
}]
}