A warehouse user can have multiple warehouses assigned to them. However, because a user can be physically present only in one warehouse, a single warehouse assignment can be active for them at a time. This endpoint lets you make a user warehouse assignment active or inactive.
Installation
For detailed information about the modules that provide the API functionality and related installation instructions, see:
Update a warehouse user assignment
PATCH
/warehouse-user-assignments/{{warehouse_user_assignment_id}}
Request
HEADER KEY |
HEADER VALUE |
REQUIRED |
DESCRIPTION |
Authorization |
string |
✓ |
Alphanumeric string that authorizes the Back Office user to send requests to protected resources. Get it by authenticating as a Back Office user. |
STRING PARAMETER |
DESCRIPTION |
EXEMPLARY VALUES |
include |
Adds resource relationships to the request. |
users |
REQUEST |
USAGE |
PATCH https://glue-backend.mysprykershop.com/warehouse-user-assignments/99e048ef-8cd8-5e52-aca9-50a590a469c2 |
Update the warehouse user assignment with the specified ID. |
PATCH https://glue-backend.mysprykershop.com/warehouse-user-assignments/99e048ef-8cd8-5e52-aca9-50a590a469c2?include=users |
Update the warehouse user assignment with the specified ID. Include information about the authenticated user in the response. |
Request sample:
{
"data": {
"attributes": {
"isActive": true
}
}
}
ATTRIBUTE |
TYPE |
REQUIRED |
DESCRIPTION |
isActive |
Boolean |
✓ |
Defines if the assignment is to be active. |
Response
Response sample: Update the warehouse user assignment.
{
"data": {
"type": "warehouse-user-assignments",
"id": "99e048ef-8cd8-5e52-aca9-50a590a469c2",
"attributes": {
"userUuid": "0c1b09b7-fb51-5fdc-9ef0-1c809d7d99da",
"isActive": true,
"warehouse": {
"name": "Warehouse1",
"uuid": "834b3731-02d4-5d6f-9a61-d63ae5e70517",
"isActive": true
}
},
"links": {
"self": "https://glue-backend.mysprykershop.com/warehouse-user-assignments/99e048ef-8cd8-5e52-aca9-50a590a469c2"
}
}
}
Response sample: Update the warehouse user assignment. Include the user information in the response.
{
"data": {
"type": "warehouse-user-assignments",
"id": "99e048ef-8cd8-5e52-aca9-50a590a469c2",
"attributes": {
"userUuid": "0c1b09b7-fb51-5fdc-9ef0-1c809d7d99da",
"isActive": true,
"warehouse": {
"name": "Warehouse1",
"uuid": "834b3731-02d4-5d6f-9a61-d63ae5e70517",
"isActive": true
}
},
"relationships": {
"users": {
"data": [
{
"type": "users",
"id": "0c1b09b7-fb51-5fdc-9ef0-1c809d7d99da"
}
]
}
},
"links": {
"self": "https://glue-backend.mysprykershop.com/warehouse-user-assignments/99e048ef-8cd8-5e52-aca9-50a590a469c2?include=users"
}
},
"included": [
{
"type": "users",
"id": "0c1b09b7-fb51-5fdc-9ef0-1c809d7d99da",
"attributes": {
"username": "herald.hopkins@spryker.com",
"firstName": "Herald",
"lastName": "Hopkins"
},
"links": {
"self": "https://glue-backend.mysprykershop.com/users/0c1b09b7-fb51-5fdc-9ef0-1c809d7d99da?include=users"
}
}
]
}
ATTRIBUTE |
TYPE |
DESCRIPTION |
userUuid |
String |
Unique identifier of the warehouse user the assignment belongs to. |
isActive |
Boolean |
Defines if the warehouse assignment is active. |
warehouse.name |
String |
Name of the warehouse in the assignment. |
warehouse.uuid |
String |
Unique identifier of the warehouse in the assignment. |
warehouse.isActive |
Boolean |
Defines if the warehouse in the assignment is active. |
RESOURCE |
ATTRIBUTE |
TYPE |
DESCRIPTION |
users |
username |
String |
Username of the user you are authenticated with. |
users |
firstName |
String |
First name. |
users |
lastName |
String |
Last name. |
Possible errors
CODE |
REASON |
5201 |
The warehouse user assignment with the specified ID doesn’t exist. |
To view generic errors that originate from the Glue Application, see Reference information: GlueApplication errors.