Glue API: Retrieve cart permission groups
Edit on GitHubCompany users can share their carts with others so that multiple representatives of the same company can work together on the same order. In addition to that, users can choose what type of access they want to grant to different users. This endpoint allows retrieving cart permission groups of a company.
Installation
For detailed information on the modules that provide the API functionality and related installation instructions, see Install the Shared Carts feature.
Retrieve cart permission groups
To retrieve cart permission groups, send the request:
GET
/cart-permission-groups
Request
HEADER KEY | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
Authorization | string | ✓ | A string containing digits, letters, and symbols that authorize the company user. Authenticate as a company user to get the value. |
Request sample : GET http://glue.mysprykershop.com/cart-permission-groups
Response
Response sample
{
"data": [
{
"type": "cart-permission-groups",
"id": "1",
"attributes": {
"name": "READ_ONLY",
"isDefault": true
},
"links": {
"self": "http://glue.mysprykershop.com/cart-permission-groups/1"
}
},
{
"type": "cart-permission-groups",
"id": "2",
"attributes": {
"name": "FULL_ACCESS",
"isDefault": false
},
"links": {
"self": "http://glue.mysprykershop.com/cart-permission-groups/2"
}
}
],
"links": {
"self": "http://glue.mysprykershop.com/cart-permission-groups"
}
}
ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|
id | String | A unique ID that is used to define permissions with this permission group. |
name | String | The permission group’s name. For example, READ_ONLY or FULL_ACCESS . |
isDefault | Boolean | If true, the permission group is applied to shared carts by default. |
Retrieve a cart permission group
To retrieve a cart permission group, send the request:
GET
/cart-permission-groups/{{permission_group_id}}
PATH PARAMETER | DESCRIPTION |
---|---|
{{permission_group_id}} | The unique identifier of a cart’s permission group to retrieve. |
Request
HEADER KEY | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
Authorization | string | ✓ | A string containing digits, letters, and symbols that authorize the company user. Authenticate as a company user to get the value. |
Request sample: GET http://glue.mysprykershop.com/cart-permission-groups/1
Response
Response sample:
{
"data": {
"type": "cart-permission-groups",
"id": "1",
"attributes": {
"name": "READ_ONLY",
"isDefault": true
},
"links": {
"self": "http://glue.mysprykershop.com/cart-permission-groups/1"
}
}
}
ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|
id | String | A unique ID that is used to assign permissions with this permission group. |
name | String | The permission group’s name. For example, READ_ONLY or FULL_ACCESS . |
isDefault | Boolean | If true, the permission group is applied to shared carts by default. |
Possible errors
CODE | REASON |
---|---|
001 | Access token is invalid. |
002 | Access token is missing. |
2501 | Specified permission group is not found or the user does not have access to it. |
Next steps
Thank you!
For submitting the form