Profiles
/profiles/{scope}/default
Entry Point: 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
- Start with root
GET
the link with rel: defaultprofile- Render the response
Response
profiles.profile
Type: Name | Description | Type |
---|---|---|
given-name | The customer’s first name. | string |
family-name | The customer’s last name. | string |
company | The customer’s company name. | string |
business-number | The customer’s company business number. | string |
tax-exemption-id | The customer’s tax exemption ID. | string |
date-of-birth | The customer’s date of birth. | date |
phone | The customer’s phone number. | string |
fax | The customer’s fax number. | string |
preferred-currency | The customer’s preferred currency. | string |
preferred-locale | The customer’s preferred locale. | string |
html-email | Indicates whether the customer prefers emails in HTML format. | boolean |
notification | Indicates 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
- Start with profile
- Edit the profile object with new details
- Update profile using a
PUT
request
Read Attributes From Profile
Retrieves a list of read-only attributes for the logged in customer.
Workflow
- Start with profile
GET
the link with rel: attributes- 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
Read Payment Methods From Profile
Retrieves a list of payment methods for the signed-in shopper.
Workflow
- Start with profile
GET
the link with rel: paymentmethods- Refer to paymentmethods
Read Payment Instruments From Profile
Retrieves a list of payment instruments for the signed-in shopper.
Workflow
- Start with profile
GET
the link with rel: paymentinstruments- Refer to paymentinstruments
Read Purchases From Profile
Retrieves a list of purchases for the logged in customer.
Workflow
Read Accounts From Profile
Retrieves a list of accounts that the logged in customer is associated to.