updateProfile

put

/ccstore/v1/profiles/current

Update Profile. Updates customer profile attributes. Optionally takes the x-ccasset-language header to get translated content in another language. Dynamic Properties of profile can also be updated like any other attribute ("dynamicPropertyKey":"dynamicPropertyValue").

Request

Supported Media Types
  • application/json
Header Parameters
X-CCAsset-Language
Type: string
The asset language of the request
Body Parameter
Root Schema : updateProfile_request
Nested Schema : shippingAddress
Type: object
Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
Nested Schema : shippingAddresses
Type: array
List of shipping addresses associated with profile.
Nested Schema : items
Type: object

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updateProfile_response
Nested Schema : dynamicProperties
Type: array
Read-only list of dynamic properties associated with profile along with meta-data.
Nested Schema : roles
Type: array
List of role assigned to the profile.
Nested Schema : shippingAddress
Type: object
Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
Nested Schema : shippingAddresses
Type: array
List of shipping addresses associated with profile.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Example application/json

{
    "lastName":"Anderson",
    "gender":"female",
    "receiveEmail":"yes",
    "dateOfBirth":"null",
    "locale":"en",
    "firstName":"Kim",
    "repositoryId":"110033",
    "shippingAddress":{
        "lastName":"Black",
        "country":"US",
        "address3":"",
        "address2":"",
        "city":"Wake Forest",
        "address1":"405 Kilmarnock",
        "postalCode":"27587",
        "county":"",
        "firstName":"Jack",
        "phoneNumber":"555123456",
        "repositoryId":"110053",
        "alias":"Address",
        "state":"NC"
    },
    "links":[
        {
            "rel":"self",
            "href":"http://localhost:8080/ccstoreui/v1/profiles/current"
        }
    ],
    "id":"se-570031",
    "email":"kim@gmail.com",
    "daytimeTelephoneNumber":"212-555-1977",
    "shippingAddresses":[
        {
            "lastName":"Anderson",
            "country":"US",
            "address3":"",
            "address2":"Broadway",
            "address1":"326",
            "prefix":"",
            "postalCode":"30005",
            "regionName":"Georgia",
            "companyName":"",
            "county":null,
            "firstName":"Kim",
            "phoneNumber":"9898989898",
            "repositoryId":"se-980032",
            "alias":"Address",
            "state":"GA",
            "countryName":"United States"
        },
        {
            "lastName":"anderson",
            "country":"US",
            "address3":"",
            "address2":"",
            "address1":"anderson",
            "prefix":"",
            "postalCode":"13202",
            "regionName":"Georgia",
            "companyName":"",
            "county":null,
            "firstName":"kim",
            "phoneNumber":"",
            "repositoryId":"se-980031",
            "alias":"Address##0",
            "state":"GA",
            "countryName":"United States"
        }
    ]
}
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| |------------------|------------------| |22000|If the profile id passes is null or empty| |22001|If there was any internal error while getting the profile| |22002|If there was no profile found with the given id| |22024|{0}({1}) must be a String|
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Request:

{
  "firstName": "Jack",
  "lastName": "Black",
  "gender": "male",
  "receiveEmail": "yes",
  "dateOfBirth": "null",
  "locale": "en",
  "email": "jack@example.com",
  "shippingAddresses": [
    {
      "lastName": "Black",
      "country": "United States",
      "address3": "",
      "address2": "",
      "city": "Wake Forest",
      "prefix": "",
      "address1": "405 Example Street",
      "defaultCountryCode": "US",
      "postalCode": "27587",
      "jobTitle": "",
      "companyName": "",
      "county": "",
      "isDefaultAddress": true,
      "suffix": "",
      "selectedCountry": "US",
      "firstName": "Jack",
      "phoneNumber": "555123456",
      "alias": "Address",
      "faxNumber": "",
      "middleName": "",
      "state": "North Carolina",
      "selectedState": "NC",
      "state_ISOCode": "US-NC"
    },
    {
      "lastName": "Hill",
      "country": "United States",
      "address3": "",
      "address2": "",
      "city": "Wake Forest",
      "prefix": "",
      "address1": "415 Example Road",
      "defaultCountryCode": "US",
      "postalCode": "27587",
      "jobTitle": "",
      "companyName": "",
      "county": "",
      "isDefaultAddress": false,
      "suffix": "",
      "selectedCountry": "US",
      "firstName": "Jill",
      "phoneNumber": "55512345",
      "alias": "Address##0",
      "faxNumber": "",
      "middleName": "",
      "state": "North Carolina",
      "selectedState": "NC",
      "state_ISOCode": "US-NC"
    }
  ]
}

Sample Response Payload returned by endpoint:

{
  "lastName": "Anderson",
  "gender": "female",
  "receiveEmail": "yes",
  "dateOfBirth": "null",
  "locale": "en",
  "firstName": "Kim",
  "repositoryId": "110033",
  "shippingAddress": {
    "lastName": "Black",
    "country": "US",
    "address3": "",
    "address2": "",
    "city": "Wake Forest",
    "address1": "405 Kilmarnock",
    "postalCode": "27587",
    "county": "",
    "firstName": "Jack",
    "phoneNumber": "555123456",
    "repositoryId": "110053",
    "alias": "Address",
    "state": "NC"
  },
  "links": [{
    "rel": "self",
    "href": "http://localhost:8080/ccstoreui/v1/profiles/current"
  }],
  "id": "se-570031",
  "email": "kim@gmail.com",
  "daytimeTelephoneNumber": "212-555-1977",
  "shippingAddresses": [
    {
      "lastName": "Anderson",
      "country": "US",
      "address3": "",
      "address2": "Broadway",
      "address1": "326",
      "prefix": "",
      "postalCode": "30005",
      "regionName": "Georgia",
      "companyName": "",
      "county": null,
      "firstName": "Kim",
      "phoneNumber": "9898989898",
      "repositoryId": "se-980032",
      "alias": "Address",
      "state": "GA",
      "countryName": "United States"
    },
    {
      "lastName": "anderson",
      "country": "US",
      "address3": "",
      "address2": "",
      "address1": "anderson",
      "prefix": "",
      "postalCode": "13202",
      "regionName": "Georgia",
      "companyName": "",
      "county": null,
      "firstName": "kim",
      "phoneNumber": "",
      "repositoryId": "se-980031",
      "alias": "Address##0",
      "state": "GA",
      "countryName": "United States"
    }
  ]
}