updateProfile

put

/ccagent/v1/profiles/{id}

Update Profile. Updates customer name, email address, phone number, shipping address and email marketing flag status of the profile depending on the profile ID. Dynamic Properties of profile can also be updated like any other attribute ("dynamicPropertyKey":"dynamicPropertyValue"). Takes additonal header parameter x-ccsite corresponding to which site specific properties should be updated. If x-ccsite value is not provided, it indicates default site.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
Root Schema : updateProfile_request
Type: object
Show Source
Example:
{
    "firstName":"Jack",
    "lastName":"Black",
    "GDPRProfileP13nConsentGranted":false,
    "gender":"male",
    "receiveEmail":"yes",
    "dateOfBirth":"null",
    "locale":"en",
    "email":"jack@example.com",
    "shippingAddresses":[
        {
            "lastName":"Black",
            "country":"United States",
            "types":[
                {
                    "id":"ss-100002"
                }
            ],
            "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",
            "types":[
                {
                    "id":"ss-100002"
                }
            ],
            "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"
        }
    ]
}
Nested Schema : shippingAddress
Type: object
Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
Show Source
Nested Schema : shippingAddresses
Type: array
List of shipping addresses associated with profile.
Show Source
Nested Schema : types
Type: array
The types tagged to the address
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : types
Type: array
The types tagged to the address
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : updateProfile_response
Type: object
Show Source
Nested Schema : catalog
Type: object
The catalog associated with this profile.
Show Source
Nested Schema : contactBillingAddress
Type: object
The default billing address for B2B contact.
Show Source
Nested Schema : contactShippingAddress
Type: object
The default shipping address for B2B contact
Show Source
Nested Schema : currentOrganization
Type: object
The current Organization
Show Source
Nested Schema : dynamicProperties
Type: array
Read-only list of dynamic properties associated with profile along with meta-data.
Show Source
Nested Schema : loyaltyPrograms
Type: array
Loyalty Programs Information
Show Source
Nested Schema : parentOrganization
Type: object
The parent Organization associated with the B2B customer profile.
Show Source
Nested Schema : priceListGroup
Type: object
Price list group properties
Show Source
Nested Schema : roles
Type: array
List of roles assigned to the profile.
Show Source
Nested Schema : secondaryAddresses
Type: object
Secondary addresses for B2B contact.
Show Source
Nested Schema : secondaryOrganizations
Type: array
List of secondary organizations that need to associate with the user.
Show Source
Nested Schema : shippingAddress
Type: object
Default shipping address of the profile (Deprecated, please use 'shippingAddresses' instead).
Show Source
Nested Schema : shippingAddresses
Type: array
List of shipping addresses associated with profile.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : currency
Type: object
Currency of the price list group
Show Source
Nested Schema : listPriceList
Type: object
Show Source
Nested Schema : salePriceList
Type: object
Sale price list properties
Show Source
Nested Schema : shippingSurchargePriceList
Type: object
Shipping surcharge price list properties
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : types
Type: array
The types tagged to the address
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : types
Type: array
The types tagged to the address
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "lastName":"Anderson",
    "GDPRProfileP13nConsentDate":"2018-03-21T13:10:08.463Z",
    "GDPRProfileP13nConsentGranted":true,
    "customerContactId":"CRMID_1",
    "dynamicProperties":[
        {
            "id":"dynamicPropertyMaritalStatus",
            "label":"Marital Status",
            "type":"string",
            "value":"Married"
        }
    ],
    "contactBillingAddress":{
        "lastName":"Anderson",
        "firstName":"Kim",
        "country":"US",
        "externalAddressId":"EXT_ADDR_1",
        "phoneNumber":"212-555-2150",
        "address2":null,
        "city":"Buffalo",
        "address1":"451 Brooks Ave",
        "postalCode":"14201",
        "county":null,
        "repositoryId":"se-990031",
        "state":"NY"
    },
    "receiveEmail":"yes",
    "dateOfBirth":"2007-11-14T00:00:00.000Z",
    "secondaryAddresses":{
        "Work":{
            "lastName":"Anderson",
            "firstName":"Kim",
            "country":"US",
            "externalAddressId":"EXT_ADDR_1",
            "phoneNumber":"212-555-2150",
            "address2":null,
            "city":"Buffalo",
            "address1":"451 Brooks Ave",
            "postalCode":"14201",
            "county":null,
            "repositoryId":"se-970031",
            "state":"NY"
        },
        "Mom' s house":{
            "lastName":"Anderson",
            "firstName":"Dolores",
            "country":"US",
            "externalAddressId":"EXT_ADDR_1",
            "phoneNumber":"212-555-4321",
            "address2":null,
            "city":"Dewitt",
            "address1":"41 Wexford Rd ",
            "postalCode":"13214",
            "county":null,
            "repositoryId":"se-140010",
            "state":"NY"
        },
        "Home":{
            "lastName":"dd",
            "firstName":"sdf",
            "country":"US",
            "externalAddressId":"EXT_ADDR_1",
            "phoneNumber":"1231231231",
            "address2":"f",
            "city":"f",
            "address1":"dd",
            "postalCode":"36123",
            "county":null,
            "repositoryId":"se-980031",
            "state":"AL"
        }
    },
    "locale":"en_US",
    "contactShippingAddress":{
        "lastName":"dd",
        "firstName":"sdf",
        "country":"US",
        "externalAddressId":"EXT_ADDR_1",
        "phoneNumber":"1231231231",
        "address2":"f",
        "city":"f",
        "address1":"dd",
        "postalCode":"36123",
        "county":null,
        "repositoryId":"se-980031",
        "state":"AL"
    },
    "receiveEmailDate":"2018-03-21T13:10:08.463Z",
    "firstName":"Kim",
    "profileType":"b2b_user",
    "repositoryId":"120117",
    "shippingAddress":{
        "lastName":"Anderson",
        "firstName":"Kim",
        "country":"US",
        "externalAddressId":"EXT_ADDR_1",
        "phoneNumber":"212-555-1977",
        "address2":"",
        "city":"Montgomery",
        "address1":"21 Cedar Ave",
        "postalCode":"13202",
        "county":null,
        "repositoryId":"142021",
        "state":"NY"
    },
    "id":"120117",
    "email":"kim@example.com",
    "daytimeTelephoneNumber":"212-555-1977",
    "shippingAddresses":[
        {
            "lastName":"Anderson",
            "country":"United States",
            "address3":"",
            "address2":"",
            "city":"Syracuse",
            "prefix":"",
            "address1":"21 Cedar Ave",
            "postalCode":"13202",
            "jobTitle":"",
            "companyName":"",
            "county":"",
            "isDefaultAddress":false,
            "suffix":"",
            "selectedCountry":"US",
            "firstName":"Kim",
            "externalAddressId":"EXT_ADDR_1",
            "phoneNumber":"212-555-1977",
            "faxNumber":"",
            "middleName":"",
            "state":"New York",
            "selectedState":"NY",
            "state_ISOCode":"US-NY"
        },
        {
            "lastName":"Anderson",
            "country":"United States",
            "address3":"",
            "address2":"",
            "city":"Montgomery",
            "prefix":"",
            "address1":"21 Cedar Ave",
            "postalCode":"13202",
            "jobTitle":"",
            "companyName":"",
            "county":"",
            "isDefaultAddress":true,
            "suffix":"",
            "selectedCountry":"US",
            "firstName":"Kim",
            "externalAddressId":"EXT_ADDR_1",
            "phoneNumber":"212-555-1977",
            "faxNumber":"",
            "middleName":"",
            "state":"New York",
            "selectedState":"NY",
            "state_ISOCode":"US-NY"
        }
    ]
}

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| |------------------|------------------| |200012|please provide valid input| |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| |22002|No profile found with the given id.| |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| |13036|One of the dynamic properties is not writable by the Agent user| |23041|You cannot activate or inactivate this profile as it is linked to multiple accounts.| |
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top