Authorizationcontexts
note
Account Management API is now deprecated and we recommend that you use Account Management functionality built into Elastic Path Commerce 8.2 and later.
The authorization contexts resource family provides associates with the authorization to stores and accounts. An authorization context contains an authorization profile that represents the account that an associate might be authorized to access. For example, you can use an authorization context, such as login to a store, to complete a shopping flow.
Read List Of Authorization Contexts
Retrieve the list of authorization contexts an associate has access to. Authorization contexts are the stores an associate has access to.
Workflow
- Start with root
GET
the link with rel: authorizationcontexts- Render the response
Read An Authorization Context
Retrieve the details for an authorization context. An authorization context represents a store.
Workflow
- Start with authorization-contexts
GET
the link with rel: element- Render the response
Response Fields
elasticpath.authorizationcontexts.authorization-context
Type: Name | Description | Type |
---|---|---|
name | Name of the authorization context. | string |
Create Authorization Context
Create an authorization context using a store code from Commerce, to allow access to that store for all accounts.
Workflow
- Start with authorization-contexts
GET
the link with rel: authorizationcontextform- Fill out the form
POST
the form using the link with rel: addauthorizationcontextaction
Request Fields
elasticpath.authorizationcontexts.authorization-context
Type: Name | Description | Type |
---|---|---|
name | Name of the authorization context. | string |
Delete Authorization Context
Delete an authorization context, removing access to that store for all accounts.
Workflow
- Start with authorization-context
DELETE
authorization-context
Read An Authorization Profile
Retrieve the details for an authorization profile. An authorization profile represents the account an associate can login on behalf of.
Workflow
- Start with authorization-context
GET
the link with rel: element- Render the response
Response Fields
elasticpath.authorizationcontexts.authorization-profile
Type: Name | Description | Type |
---|---|---|
name | Name of the authorization profile. This name is used by the user to select an authorization profile. | string |
Create Access Token
Retrieve the token used to authorize an associate that is part of a buying account.
The OAuth 2.0 access token returned when creating access token is the bearer token that is used with requests from the client to the Commerce Cortex API. You must add the bearer token to the HTTP request headers when making requests to the Commerce Cortex API Service.
For Example, when making Commerce Shopping API requests, the bearer token would be included in the Authorization header:
Authorization: Bearer AbCdEf123456
Workflow
- Start with authorization-profile
GET
the link with rel: accesstokenform- Fill out the form
POST
the form using the link with rel: createaccesstokenaction