Skip to main content
Version: 8.8.x

Profiles

Entry Point: /profiles/{scope}/default​

The profiles resource provides access to the currently logged in customer and their details. Using the resource you can retrieve and update a customer’s first name, last name, username, addresses. You can also retrieve the customer’s purchases and paymentmethods through this resource.

Read Default Profile​

Retrieve the customer’s default profile. Retrieves the customer’s first name, last name, username, addresses, and link to the customer’s payment methods.

Workflow​

  1. Start with root
  2. GET the link with rel: defaultprofile
  3. Render the response

Response​

Type: profiles.profile​

NameDescriptionType
given-nameThe customer’s first name.string
family-nameThe customer’s last name.string
companyThe customer’s company name.string
business-numberThe customer’s company business number.string
tax-exemption-idThe customer’s tax exemption ID.string
date-of-birthThe customer’s date of birth.date
phoneThe customer’s phone number.string
faxThe customer’s fax number.string
preferred-currencyThe customer’s preferred currency.string
preferred-localeThe customer’s preferred locale.string
html-emailIndicates whether the customer prefers emails in HTML format.boolean
notificationIndicates whether the customer opts-in to marketing emails.boolean

Sample​

{
"self": {
"type": "profiles.profile",
"uri": "/profiles/mobee/mntggztemq4gmljqmjrweljugrrgcljymy3ggljvgvtdqzjygq3demrsmm=",
"href": "https://cortex.elasticpath.com/cortex/profiles/mobee/mntggztemq4gmljqmjrweljugrrgcljymy3ggljvgvtdqzjygq3demrsmm="
},
"messages": [],
"links": [
{
"rel": "addresses",
"type": "addresses.addresses",
"href": "https://cortex.elasticpath.com/cortex/addresses/mobee"
},
{
"rel": "data-policies",
"type": "datapolicies.data-policies",
"href": "https://cortex.elasticpath.com/cortex/datapolicies/mobee"
},
{
"rel": "emails",
"type": "emails.emails",
"href": "https://cortex.elasticpath.com/cortex/emails/mobee"
},
{
"rel": "attributes",
"type": "profiles.attributes",
"href": "https://cortex.elasticpath.com/cortex/profiles/mobee/mntggztemq4gmljqmjrweljugrrgcljymy3ggljvgvtdqzjygq3demrsmm=/attributes"
},
{
"rel": "purchases",
"type": "purchases.purchases",
"href": "https://cortex.elasticpath.com/cortex/purchases/mobee"
},
{
"rel": "wishlists",
"type": "wishlists.wishlists",
"href": "https://cortex.elasticpath.com/cortex/wishlists/mobee"
}
],
"business-number": null,
"company": null,
"date-of-birth": null,
"family-name": null,
"fax": null,
"given-name": null,
"html-email": null,
"notification": null,
"phone": null,
"preferred-currency": null,
"preferred-locale": null,
"tax-exemption-id": null
}

Update Profile​

Update attributes on the profile.

Workflow​

  1. Start with profile
  2. Edit the profile object with new details
  3. Update profile using a PUT request

Read Attributes From Profile​

Retrieves a list of read-only attributes for the logged in customer.

Workflow​

  1. Start with profile
  2. GET the link with rel: attributes
  3. Render the response

Response​

Sample​

{
"self": {
"type": "profiles.attributes",
"uri": "/profiles/mobee/mntggztemq4gmljqmjrweljugrrgcljymy3ggljvgvtdqzjygq3demrsmm=/attributes",
"href": "https://cortex.elasticpath.com/cortex/profiles/mobee/mntggztemq4gmljqmjrweljugrrgcljymy3ggljvgvtdqzjygq3demrsmm=/attributes"
},
"messages": [],
"links": [],
"TEST_ATTRIBUTE": "read only attribute"
}

Read Addresses From Profile​

Retrieves a list of addresses for the shopper.

Workflow​

  1. Start with profile
  2. GET the link with rel: addresses
  3. Refer to addresses

Read Payment Methods From Profile​

Retrieves a list of payment methods for the signed-in shopper.

Workflow​

  1. Start with profile
  2. GET the link with rel: paymentmethods
  3. Refer to paymentmethods

Read Payment Instruments From Profile​

Retrieves a list of payment instruments for the signed-in shopper.

Workflow​

  1. Start with profile
  2. GET the link with rel: paymentinstruments
  3. Refer to paymentinstruments

Read Purchases From Profile​

Retrieves a list of purchases for the logged in customer.

Workflow​

  1. Start with profile
  2. GET the link with rel: purchases
  3. Refer to purchases

Read Accounts From Profile​

Retrieves a list of accounts that the logged in customer is associated to.

Workflow​

  1. Start with profile
  2. GET the link with rel: accounts
  3. Refer to accounts

Transition Public User to Registered User​

Merges shopping cart details from a single-session user to the currently logged-in registered user. This functionality is only enabled if using Trusted Header Authentication.

Workflow​

  1. Start with profile
  2. GET the link with rel: mergefrompublicform
  3. Fill out the form
  4. POST the form using the link with rel: mergeaction

Request Fields​

Type: mergeprofiles.merge-form​

NameDescriptionType
public-user-idThe public profile user id.String
  • The way that public-user-id is interpreted depends on the value of the COMMERCE/SYSTEM/CUSTOMER/identifier setting, as described in Trusted Header Authentication.
  • A response of 400 Bad Request will be returned if a required field is not present or the value is empty.
  • A response of 404 Not Found will be returned if there is no public customer with the passed user id.