title | description | last_updated | template | originalLink | originalArticleId | redirect_from | related | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Glue API: Manage shared company user carts |
Managed shared company user carts via Glue API. |
Jun 16, 2021 |
glue-api-storefront-guide-template |
87aea51a-e7f0-43a3-a820-b72537b8395b |
|
|
This endpoint allows managing shared company user carts.
To change permissions for a shared cart, send the request:
PATCH
/shared-carts/{% raw %}{{{% endraw %}shared-cart-uuid{% raw %}}}{% endraw %}
PATH PARAMETER | DESCRIPTION |
---|---|
{% raw %}{{{% endraw %}shared-cart-uuid{% raw %}}}{% endraw %} | The unique ID of a shared cart to change the permissions of. |
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: PATCH http://glue.mysprykershop.com/shared-carts/4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa
{
"data": {
"type": "shared-carts",
"attributes": {
"idCartPermissionGroup": 2
}
}
}
ATTRIBUTE | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
idCartPermissionGroup | Integer | ✓ | The unique ID of the cart permission group that describes the permissions granted to the users with whom the cart is shared. |
Response sample:
{
"data": {
"type": "shared-carts",
"id": "4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa",
"attributes": {
"idCompanyUser": "4c677a6b-2f65-5645-9bf8-0ef3532bead1",
"idCartPermissionGroup": 2
},
"links": {
"self": "http://glue.mysprykershop.com/shared-carts/4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa"
}
}
}
ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|
idCompanyUser | String | The name of the company user the cart is shared with. |
idCartPermissionGroup | Integer | The unique ID of the cart's permission group that describes the permissions granted to the user. |
To stop sharing a cart, send the request:
DELETE
/shared-carts/{% raw %}{{{% endraw %}shared-cart-uuid{% raw %}}}{% endraw %}
PATH PARAMETER | DESCRIPTION |
---|---|
{% raw %}{{{% endraw %}shared-cart-uuid{% raw %}}}{% endraw %} | The unique ID of a shared cart to stop sharing. |
HEADER KEY | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
Authorization | string | ✓ | String containing digits, letters, and symbols that authorize the company user. Authenticate as a company user to get the value. |
Request sample: DELETE http://glue.mysprykershop.com/shared-carts/4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa
If the request is successful, the endpoint returns 204 No Content
status code.
CODE | REASON |
---|---|
001 | Access token is invalid. |
002 | Access token is missing. |
101 | Cart is not found. |
104 | Cart uuid is missing. |
2501 | Specified permission group is not found or the user does not have access to it. |
2701 | Action is forbidden. |
2702 | Failed to share a cart. |
2703 | Shared cart not found. |
2704 | Shared cart ID is missing. |
2705 | Shared cart is not found. |
2706 | Failed to save the shared cart. |