PUT /portal/user/{email}ΒΆ
Create or update a user.
Path parameters:
Name |
Type |
Description |
---|---|---|
|
string, required |
retailer portal user email address |
Query parameters:
Name |
Type |
Description |
---|---|---|
|
boolean, optional, default: false |
readable output formatting |
Body parameters:
Name |
Type |
Description |
---|---|---|
|
string, required |
group this user belongs to |
|
string, required |
user status |
|
boolean, optional, default: true |
whether to send a password reset email if the account was created |
groups and group names must be configured before this api can be used, please contact your Yocuda representative
an empty group name
""
can be used to indicate that the user is not a member of any groupstatus can be one of
active
orinactive
to send a password reset email when a user is created use
send_password_reset_on_create
. Password reset emails are only sent if the user was created in our system. A password reset email can also be triggered by using PATCH /portal/user/{email}/_send_password_reset
Possible responses:
201 - if a user was created
204 - if a user was updated
- 400 - if the payload is incorrect, e.g.:
the group is invalid
the status is invalid
404 - the user already exists, but is not manageable by this api
Example request:
Create a new user.
PUT /portal/user/me@example.com HTTP/1.1
Host: api.ereceipts.co.uk
Accept: application/json
Content-Length: 47
Content-Type: application/json
{
"group": "group100",
"status": "active"
}
Example response:
HTTP/1.1 201 Created