Users

Get Users

get /sites/{siteid}/users
PARAMETERS
siteid
integer
path
REQUIRED
start
integer
query

The index of the item to start from

Default: 0
num
integer
query

The number of items returned

Default: 10
email
string
query

Filter on user email.

customernumber
string
query

Filter on user customernumber.

personalid
string
query

Filter on user personalid.

mobile
string
query

Filter on user mobile.

userid
array (string)
query

Filter on users with matching user ID, use comma as separator for multiple values.

Example: /sites/{siteid}/users?userid={102DC4AA-2C19-3177-6AB2-435CB3A46499},{106BCAF2-7731-26CB-1FC6-7F0182FC31C7}
fields
array (string)
query

Comma separated list of fields to return. Use this to query only the fields you are using. See User for all fields.

Default: [ "userid", "email", "namefirst", "namelast", "company", "datecreated", "datemodified" ]
Example: /sites/{siteid}/users?fields=userid,email,namefirst,namelast
Returns

Returns an envelope with items of type [User](/api-reference/users#users_openapi/components/schemas/user).

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/users.json?num=2
RESPONSE JSON
{
"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
200Returns an envelope with items of type [User](/api-reference/users#users_openapi/components/schemas/user).
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Batch Add Users

post /sites/{siteid}/users
PARAMETERS
siteid
integer
path
REQUIRED
REQUEST BODY
array
posthttps://api.mysitoo.com/v2/accounts/1500/sites/1/users.json
[
{
"email": "laura.smith@example.com",
"namefirst": "Laura",
"namelast": "Smith"
},
{
"email": "john.doe@example.com",
"namefirst": "John",
"namelast": "Doe"
}
]
RESPONSE JSON
[
{
"statuscode": 200,
"return": "{432586AA-3475-1DFC-39BE-B4AF86275FB4}"
},
{
"statuscode": 200,
"return": "{50B2C5B7-40DB-34E0-4041-5333C4881185}"
}
]
HTTP Status Code Summary
200Returns userid or a batch envelope if multiple users were added
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Batch Update Users

put /sites/{siteid}/users

Send an array of object. Note that the userid must be added as a field for each item.

PARAMETERS
siteid
integer
path
REQUIRED
REQUEST BODY
array
puthttps://api.mysitoo.com/v2/accounts/1500/sites/1/users.json
[
{
"userid": "{10840BB4-1FF3-3E63-7872-735A4846309E}",
"externalid": "1234"
},
{
"userid": "{1F842C30-1982-5EB9-7C4F-408FE9546453}",
"externalid": "5678"
}
]
RESPONSE JSON
[
{
"statuscode": 200,
"return": true
},
{
"statuscode": 200,
"return": true
}
]
HTTP Status Code Summary
200Returns batch envelope.
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Get User

get /sites/{siteid}/users/{userid}
PARAMETERS
siteid
integer
path
REQUIRED
userid
string
path
REQUIRED
fields
array (string)
query

Comma separated list of fields to return. Use this to query only the fields you are using. Default is all fields in User.

Example: /sites/{siteid}/users/{userid}?fields=userid,email,namefirst,namelast
Returns

Returns an item of type [User](/api-reference/users#users_openapi/components/schemas/user).

gethttps://api.mysitoo.com/v2/accounts/1500/sites/1/users/{102DC4AA-2C19-3177-6AB2-435CB3A46499}.json
RESPONSE JSON
{
"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
200Returns an item of type [User](/api-reference/users#users_openapi/components/schemas/user).
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Update User

put /sites/{siteid}/users/{userid}
PARAMETERS
siteid
integer
path
REQUIRED
userid
string
path
REQUIRED
REQUEST BODY
object
puthttps://api.mysitoo.com/v2/accounts/1500/sites/1/users/{1F842C30-1982-5EB9-7C4F-408FE9546453}.json
{
"company": "Example Inc."
}
RESPONSE JSON
true
HTTP Status Code Summary
200Returns true
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Delete User

delete /sites/{siteid}/users/{userid}
PARAMETERS
siteid
integer
path
REQUIRED
userid
string
path
REQUIRED
deletehttps://api.mysitoo.com/v2/accounts/1500/sites/1/users/{1F842C30-1982-5EB9-7C4F-408FE9546453}.json
RESPONSE JSON
true
HTTP Status Code Summary
200Returns true
400Bad Request. Invalid syntax, missing required argument or invalid request.
401Unauthorized. Authorization failed.
404Resource not found. The url is invalid.
429Too Many Requests.
500Internal Server Error.

Objects

Role
integer

  • 10 Admin
  • 20 Staff
  • 30 StoreManager
  • 40 StoreStaff

Timestamp
integer

Number of seconds since the Unix Epoch.

User
object

Users are common to all sites in a system. Roles and access rights are set per site.

PROPERTIES
userid
string
READ ONLY

Unique ID of user.

email
string
REQUIRED

Email for user. Must be unique.

namefirst
string

First name.

namelast
string

Last name.

personalid
string

Personal ID.

externalid
string

External ID or null if not used.

company
string

Company name.

department
string

Department.

companyid
string

Organization ID.

address
string

Address.

address2
string

Extra address field.

zip
string

Zip or postal code.

city
string

City.

state
string

State or region.

countryid
string

Country ID (ISO 3166-1, alpha-2).

phone
string

Phone number.

mobile
string

Mobile phone number.

notes
string

Internal notes about the user.

pin
string

Write only. Personal Identification Number (4 or 6 digits). Must be unique.

customernumber
string

Customer number.

datecreated
READ ONLY

Creation date.

datemodified
READ ONLY

Last modified date.

pricelistid
integer
DEPRECATED

Price list ID. (Deprecated, use voucherpasswords to activate price lists for customer in Sitoo POS)

voucherpasswords
array
(string)

Array of voucher passwords (string) used to activate campaigns for customer in Sitoo POS.

role

The access role for this user, or null if not applicable. Note! Admin value is Read only. Note! This property is applied per site (eshop).

warehouses
array
(integer)

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).

posrefundcard
boolean

If true, the user has the right to perform refund for card payments in Sitoo POS. Note! This property is applied per site (eshop).

Default: false
posallstores
boolean

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).

Default: false
active
boolean

If false, the user will not be allowed to login (disregarding all other settings). Note! This property is applied per site (eshop).

Default: true