Users
Note: The following calls are allowed for users with SUPERVISOR
or ADMINISTRATOR
role.
Create user
POST https://your.api.fulfillmenttools.com/api/users
{
"firstname": "Donna",
"lastname": "Sheridan-Carmichael",
"username": "dsheridan",
"password": "fsdf6556",
"roles": [
{
"name": "FULFILLER",
"facilities": [
"0AMSoRCbm7kSM3LJPoeH"
]
}
]
}
Response:
201 OK
After creating a user, we receive a 201 CREATED
response:
{
"id": "x5jrZrDHvYYs6HpaDICKYG4QuIk2"
"username": "dsheridan",
"firstname": "Donna",
"lastname": "Sheridan-Carmichael",
"customClaims": {
"roles": [
{
"name": "FULFILLER",
"facilities": [
"0T1vKaEar0nuG58CxzA5"
]
}
]
},
"created": "2020-09-25T10:06:35.000Z",
"lastModified": "2020-09-25T10:06:35.009Z",
"version": 1
}
Modify user
Now we modify a user to set a new role in a facility.
PATCH https://your.api.fulfillmenttools.com/api/users/x5jrZrDHvYYs6HpaDICKYG4QuIk2
{
"actions": [
{
"action": "ModifyUser",
"roles": [
{
"name": "SUPERVISOR",
"facilities": [
"0T1vKaEar0nuG58CxzA5"
]
}
]
}
],
"version": 1
}
After modifying a user, we receive a 200 OK
response:
{
"id": "x5jrZrDHvYYs6HpaDICKYG4QuIk2"
"username": "dsheridan",
"firstname": "Donna",
"lastname": "Sheridan-Carmichael",
"customClaims": {
"roles": [
{
"name": "SUPERVISOR",
"facilities": [
"0T1vKaEar0nuG58CxzA5"
]
}
]
},
"created": "2020-09-25T10:06:35.000Z",
"lastModified": "2030-10-01T09:12:22.000Z",
"version": 2
}
Delete user
When a user is deleted, all currently active JWT Tokens of that user are invalidated.
DELETE https://your.api.fulfillmenttools.com/api/users/x5jrZrDHvYYs6HpaDICKYG4QuIk2
Last updated