Glue API: Manage shared company user carts

Edit on GitHub

This endpoint allows managing shared company user carts.

Change permissions

To change permissions for a shared cart, send the request:


PATCH /shared-carts/{{shared-cart-uuid}}


PATH PARAMETER DESCRIPTION
{{shared-cart-uuid}} The unique ID of a shared cart to change the permissions of.

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: 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

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.

Stop sharing a cart

To stop sharing a cart, send the request:


DELETE /shared-carts/{{shared-cart-uuid}}


PATH PARAMETER DESCRIPTION
{{shared-cart-uuid}} The unique ID of a shared cart to stop sharing.

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: DELETE http://glue.mysprykershop.com/shared-carts/4c677a6b-2f65-5645-9bf8-0ef3532bbbccaa

Response

If the request is successful, the endpoint returns 204 No Content status code.

Possible errors

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.