Users
Get Users
get /sites/{siteid}/usersThe index of the item to start from.
The number of items returned.
Filter on user email.
Filter on user customernumber.
Filter on user personalid.
Filter on user mobile.
Filter on users with matching user ID, use comma as separator for multiple values.
Comma separated list of fields to return. Use this to query only the fields you are using. See User for all fields.
Returns an envelope with items of type [User](/api-reference/users#users_openapi/components/schemas/user).
{ "totalcount": 664, "items": [ { "userid": "{102DC4AA-2C19-3177-6AB2-435CB3A46499}", "email": "steve.smith@example.com", "namefirst": "Steve", "namelast": "Smith", "company": "Acme Inc.", "datecreated": 1462874210, "datemodified": 1462874210 }, { "userid": "{106BCAF2-7731-26CB-1FC6-7F0182FC31C7}", "email": "anna.wilson@example.com", "namefirst": "Anna", "namelast": "Wilson", "company": "Example Inc.", "datecreated": 1462874179, "datemodified": 1462874179 } ]}
HTTP Status Code Summary | |
---|---|
200 | Returns an envelope with items of type [User](/api-reference/users#users_openapi/components/schemas/user). |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Batch Add Users
post /sites/{siteid}/users[ { "email": "laura.smith@example.com", "namefirst": "Laura", "namelast": "Smith" }, { "email": "john.doe@example.com", "namefirst": "John", "namelast": "Doe" }]
[ { "statuscode": 200, "return": "{432586AA-3475-1DFC-39BE-B4AF86275FB4}" }, { "statuscode": 200, "return": "{50B2C5B7-40DB-34E0-4041-5333C4881185}" }]
HTTP Status Code Summary | |
---|---|
200 | Returns userid or a batch envelope if multiple users were added |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Batch Update Users
put /sites/{siteid}/usersSend an array of object. Note that the userid must be added as a field for each item.
[ { "userid": "{10840BB4-1FF3-3E63-7872-735A4846309E}", "externalid": "1234" }, { "userid": "{1F842C30-1982-5EB9-7C4F-408FE9546453}", "externalid": "5678" }]
[ { "statuscode": 200, "return": true }, { "statuscode": 200, "return": true }]
HTTP Status Code Summary | |
---|---|
200 | Returns batch envelope. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Get User
get /sites/{siteid}/users/{userid}Comma separated list of fields to return. Use this to query only the fields you are using. Default is all fields in User.
Returns an item of type [User](/api-reference/users#users_openapi/components/schemas/user).
{ "userid": "{102DC4AA-2C19-3177-6AB2-435CB3A46499}", "email": "steve.smith@example.com", "namefirst": "Steve", "namelast": "Smith", "personalid": "", "externalid": null, "company": "Acme Inc.", "department": "", "companyid": "", "address": "", "address2": "", "zip": "", "city": "Townsville", "state": "", "countryid": "us", "phone": "", "mobile": "", "notes": "", "customernumber": "", "datecreated": 1462874210, "datemodified": 1462874210, "pricelistid": 1, "voucherpasswords": [], "role": null, "warehouses": [], "posrefundcard": false, "posallstores": false}
HTTP Status Code Summary | |
---|---|
200 | Returns an item of type [User](/api-reference/users#users_openapi/components/schemas/user). |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Update User
put /sites/{siteid}/users/{userid}{ "company": "Example Inc."}
true
HTTP Status Code Summary | |
---|---|
200 | Returns true. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Delete User
delete /sites/{siteid}/users/{userid}true
HTTP Status Code Summary | |
---|---|
200 | Returns true. |
400 | Bad Request. Invalid syntax, missing required argument or invalid request. |
401 | Unauthorized. Authorization failed. |
404 | Resource not found. The url is invalid. |
429 | Too Many Requests. |
500 | Internal Server Error. |
Objects
Roleinteger
10
Admin20
Staff30
StoreManager40
StoreStaff
Timestampinteger
Number of seconds since the Unix Epoch.
Userobject
Users are common to all sites in a system. Roles and access rights are set per site.
Unique ID of user.
Email for user. Must be unique.
First name.
Last name.
Personal ID.
External ID or null if not used.
Company name.
Department.
Organization ID.
Address.
Extra address field.
Zip or postal code.
City.
State or region.
Country ID (ISO 3166-1, alpha-2).
Phone number.
Mobile phone number.
Internal notes about the user.
Write only. Personal Identification Number (4 or 6 digits). Must be unique.
Customer number.
Creation date.
Last modified date.
Price list ID. (Deprecated, use voucherpasswords to activate price lists for customer in Sitoo POS)
Array of voucher passwords (string) used to activate campaigns for customer in Sitoo POS.
The access role for this user, or null if not applicable. Note! This property is applied per site (eshop).
An array of warehouse IDs that the Store Manager or Store Staff should have access to. Other roles will not be affected by this property. Note! This property is applied per site (eshop).
If true, the user has the right to perform refund for card payments in Sitoo POS. Note! This property is applied per site (eshop).
If true, the user will have POS login access for all stores. Note! This setting is only applicable when username/password or OIDC is being used for authentication in the POS. Note! This property is applied per site (eshop).
If false, the user will not be allowed to login (disregarding all other settings). Note! This property is applied per site (eshop).