Sharing company user carts
Edit on GitHub
You are browsing a previous version of the document. The latest version is 202212.0.
Company users can share their carts with other company users, so multiple representatives of a company can work on the same order. When sharing carts, users can choose what type of access they want to grant to different each other.
This endpoint allows sharing carts with company users.
Installation
For detailed information on the modules that provide the API functionality and related installation instructions, see Shared Carts feature integration.
Share a cart
To share a cart, send the request:
POST
/carts/{{cart-uuid}}/shared-carts
Path parameter | Description |
---|---|
{{cart-uuid}} | Unique identifier of a cart to share. |
Request
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: POST https://glue.mysprykershop.com/carts/f23f5cfa-7fde-5706-aefb-ac6c6bbadeab/shared-carts
{
"data": {
"type": "shared-carts",
"attributes": {
"idCompanyUser": "4c677a6b-2f65-5645-9bf8-0ef3532bead1",
"idCartPermissionGroup": 1
}
}
}
Attribute | Type | Required | Description |
---|---|---|---|
idCompanyUser | String | ✓ | Unique identifier of a company user to share the cart with. The user must belong to the same company as the cart owner. |
idCartPermissionGroup | Integer | ✓ | Unique identifier of a cart permission group that defines the permissions of the company user for the cart. To get the full list of cart permission groups, retrieve permission groups. |
Response
Response sample:
{
"data": {
"type": "shared-carts",
"id": "4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa",
"attributes": {
"idCompanyUser": "4c677a6b-2f65-5645-9bf8-0ef3532bead1",
"idCartPermissionGroup": 1
},
"links": {
"self": "https://glue.mysprykershop.com/shared-carts/4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa"
}
}
}
Attribute | Type | Description |
---|---|---|
id | String | Unique identifier used for sharing the cart. |
idCompanyUser | String | Unique identifier of the company user the cart is shared with. |
idCartPermissionGroup | Integer | Unique identifier of the cart permission group that describes the permissions granted to the user the cart is shared with. |
Possible errors
Status | Reason |
---|---|
401 | The access token is invalid. |
403 | The access token is missing. |
404 | Cart not found. |
422 | Failed to share a cart. |
Next steps
Thank you!
For submitting the form