Sitecore OrderCloud Documentation


Portal login

Me and My Stuff

Up until now, we have been working in the seller perspective. We bootstrapped a new organization and populated our first product catalog. Now that the administrative work is complete, we can change to the perspective of the buyer user we created in "Establishing API Access".

To do so, you will need to retrieve an access token for your buyer user:

Password Grant-Type Workflow

Use the access token in the response for the remainder of this chapter.

Content-Type: application/x-www-form-urlencoded;

    grant_type: "password",
    username: "buyer01",
    scope: "MeAdmin PasswordReset Shopper",

A Unique Perspective

Authenticating as a buyer user provides a unique perspective. The Shopper role (reserved for buyer users) provides access to a miriad of personalized API resources that unravel and flatten complex relationships created by the admin user. These resources are commonly referred to as Me and My Stuff.


Me and My Stuff

While other perspectives still can access the /me endpoint for managing their profile, they do not have access to its sub-resources. These resources are generally for interacting with data that the buyer user is assigned to at the organization, user group, or user level. A few of them are for managing data that the buyer user owns:

  • Personal Addresses - a personal address book only accessible to the authenticated user

  • Personal Credit Cards - essentially a wallet for storing credit card tokens retrieved from a 3rd party payment provider

Security Alert - OrderCloud terms of service strictly prohibits storing full credit card information. Credit cards and payment processing should be handled by an authorized provider such as Authorize.NET or Stripe.

To access these features the buyer user must be granted specific roles: MeAddressAdmin and MeCreditCardAdmin respectively.

Validate Your Perspective

Let's confirm we are in the correct perspective by getting the currently authenticated user using our new access token:

Get the currently authenticated user
Authorization: Bearer INSERT_ACCESS_TOKEN_HERE
Content-Type: application/json; charset=UTF-8;

Your response should look like this:

	"Buyer": {
		"DefaultCatalogID": "BUYER_ORGANIZATION"
	"Supplier": null,
	"Seller": {
		"ID": "xxxxxxxxxxxxxxxxxx"
	"Username": "buyer01",
	"Password": null,
	"FirstName": "Buyer",
	"LastName": "User",
	"Email": "",
	"Phone": null,
	"TermsAccepted": null,
	"Active": true,
	"xp": null,
	"AvailableRoles": [
	"DateCreated": "2021-02-08T23:09:14.82+00:00",
	"PasswordLastSetDate": "2021-02-08T23:10:00.56+00:00"

Pay close attention to AvailableRoles. If it does not match, take another look at when we created our buyer user in "Establishing API Access" before continuing to the next guide.

Still have questions?
Ask in our Community Channel

Content Powered By
Sitecore Logo

© Copyright 2024, Sitecore OrderCloud®. All rights reserved.

Contact Us
Privacy Policy