User
The User object is for anyone who has access to Shopmonkey for a given Customer and Location. Users can have Roles within each Location which defined access controls and permissions.
You can set custom fields for a Users by updating the custom field. Any data you place in the User object will be your responsibility. Shopmonkey will never mutate any values in this object. It is your responsibility to manage the data in this field.
List user types
Find all the User Roles, as well as the user's current role
URL parameters
- Name
userId
- Type
- string Required
- Description
- the id for the user
Produces
The response content type: application/json
200
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if success = false
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
- Name
data
- Type
- object Required
- Description
Properties for data
object
- Name
roles
- Type
- array Required
- Description
- Name
userRole
- Type
- object Required
- Description
Properties for userRole
object
- Name
id
- Type
- string Required
- Description
- Name
meta
- Type
- object Required
- Description
- the metadata about the most recent change to the row
- Name
createdDate
- Type
- string Required
- Description
- Name
updatedDate
- Type
- string Required
- Description
- Name
companyId
- Type
- string Required
- Description
- Name
name
- Type
- string Required
- Description
- Name
description
- Type
- string Required
- Description
- Name
derrivedFromId
- Type
- string Required
- Description
- Name
active
- Type
- boolean Required
- Description
- Name
custom
- Type
- boolean Required
- Description
- Name
internal
- Type
- boolean Required
- Description
- Name
showInShop
- Type
- boolean Required
- Description
- Name
permissions
- Type
- array Required
- Description
Properties for meta
object
- Name
userId
- Type
- string
- Description
- the user id that made the most recent change
- Name
sessionId
- Type
- string
- Description
- the session id for the most recent change
- Name
version
- Type
- number
- Description
- a monotonically increasing number for the most recent change
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Request
curl https://api.shopmonkey.cloud/v3/user/:userId/role \
-H "Authorization: Bearer ${SM_TOKEN}"
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id"
}
}
Update Role
Assign the User Type/role
URL parameters
- Name
userId
- Type
- string Required
- Description
- the id for the user
Body parameters
Consumes
The following content type is required: application/json
- Name
allLocations
- Type
- boolean
- Description
- whether to assign this role across the entire company - only callable by HQ users
- Name
locationIds
- Type
- array
- Description
- Name
roleId
- Type
- string Required
- Description
Produces
The response content type: application/json
200
Response
- Name
data
- Type
- object
- Description
- Name
success
- Type
- boolean Required
- Description
Properties for data
object
- Name
id
- Type
- string Required
- Description
- the id for the object
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
curl https://api.shopmonkey.cloud/v3/user/:userId/role \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{ "roleId" : "value" }'
Example Responseapplication/json
{
"success": true
}
Find User
Find one User by id
URL parameters
- Name
id
- Type
- string Required
- Description
- the id for the object to retrieve
Produces
The response content type: application/json
200
Response
- Name
data
- Type
- object Required
- Description
- User schema
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Properties for data
object
- Name
id
- Type
- string Required
- Description
- Name
meta
- Type
- one of: any, any
- Description
- the metadata about the most recent change to the row
- Name
metadata
- Type
- object
- Description
- metadata reserved for customers to control
- Name
createdDate
- Type
- string Required
- Description
- Name
updatedDate
- Type
- string Required
- Description
- Name
companyId
- Type
- string Required
- Description
- Name
active
- Type
- boolean Required
- Description
- Name
assignedServiceWriter
- Type
- boolean Required
- Description
- Name
assignedTechnician
- Type
- boolean Required
- Description
- Name
deactivatedByUserId
- Type
- string Required
- Description
- the user that deactivated the record or null if not deactivated
- Name
deactivatedDate
- Type
- string Required
- Description
- the date that the record was deactivated or null if not deactivated
- Name
requireEmailChange
- Type
- one of: any, any
- Description
- whether the user has to set a new email address, used only for imports
- Name
laborRateId
- Type
- one of: any, any
- Description
- the id of the labor rate for the user
- Name
firstName
- Type
- string Required
- Description
- Name
lastName
- Type
- string Required
- Description
- Name
email
- Type
- one of: any, any
- Description
- the email address of the user
- Name
phone
- Type
- one of: any, any
- Description
- the phone number of the user
- Name
preferredLanguage
- Type
- one of: en, en_US, fr_CA Required
- Description
- Name
color
- Type
- one of: aqua, blue, brown, green, orange, purple, red, yellow Required
- Description
- Name
currentLocationId
- Type
- one of: any, any
- Description
- the last location the user logged into
- Name
customPhotoId
- Type
- one of: any, any Required
- Description
- a custom photo blob id for this user
- Name
customPhotoUrl
- Type
- one of: any, any Required
- Description
- a url to the custom photo url for this user
- Name
googlePhotoUrl
- Type
- one of: any, any Required
- Description
- a url to a profile photo for this user from a google login
- Name
googlePhotoDisabled
- Type
- one of: any, any Required
- Description
- if the profile photo was removed to force a monogram
- Name
locationIds
- Type
- array Required
- Description
- Name
customFields
- Type
- object
- Description
- custom fields as JSON object
- Name
deactivator
- Type
- object
- Description
- User schema
- Name
laborRate
- Type
- object
- Description
- Name
multiLocation
- Type
- boolean
- Description
- whether the user has access to multiple locations
- Name
pendingEmail
- Type
- string
- Description
- whether the user is trying to update their email
- Name
pendingEmailChangeToken
- Type
- string
- Description
- token to verify against for email verification
- Name
userCommission
- Type
- object
- Description
- Name
userRoles
- Type
- array
- Description
- Name
company
- Type
- object
- Description
- Name
location
- Type
- object
- Description
Properties for deactivator
object
- Name
id
- Type
- string Required
- Description
- Name
companyId
- Type
- string Required
- Description
- Name
active
- Type
- boolean Required
- Description
- Name
firstName
- Type
- string Required
- Description
- Name
lastName
- Type
- string Required
- Description
- Name
color
- Type
- one of: aqua, blue, brown, green, orange, purple, red, yellow Required
- Description
- Name
customPhotoUrl
- Type
- string Required
- Description
- a url to the custom photo url for this user
- Name
googlePhotoUrl
- Type
- string Required
- Description
- a url to a profile photo for this user from a google login
- Name
googlePhotoDisabled
- Type
- boolean Required
- Description
- if the profile photo was removed to force a monogram
Properties for laborRate
object
- Name
flatRate
- Type
- boolean Required
- Description
- Name
valueCents
- Type
- number Required
- Description
Properties for userCommission
object
- Name
laborPercent
- Type
- number Required
- Description
- the labor percent commission for the user
- Name
partPercent
- Type
- number Required
- Description
- the part percent commission for the user
- Name
tirePercent
- Type
- number Required
- Description
- the tire percent commission for the user
Properties for company
object
- Name
createdDate
- Type
- string Required
- Description
- The company's creation date
- Name
hqEnabled
- Type
- boolean Required
- Description
- Returns true of the user is part of a company that has HQ enabled
- Name
inventoryTransfersEnabled
- Type
- boolean
- Description
- Returns true if the company is allowed to transfer inventory between locations
- Name
name
- Type
- string
- Description
- The company name
- Name
upgradeScheduledDate
- Type
- string Required
- Description
- The date the company is scheduled to upgrade from v1
- Name
upgraded
- Type
- boolean Required
- Description
- Returns true if the company has been upgraded from v1
- Name
upgradedDate
- Type
- string Required
- Description
- The date the company was upgraded from v1
- Name
whiteLabelBlobId
- Type
- string
- Description
- The white label blob id
Properties for location
object
- Name
country
- Type
- string
- Description
- The location country
- Name
createdDate
- Type
- string Required
- Description
- The location's creation date
- Name
locationConfig
- Type
- object
- Description
- Name
name
- Type
- string
- Description
- The location name
- Name
postalCode
- Type
- string
- Description
- The location postal code
- Name
state
- Type
- string
- Description
- The location state
- Name
timezone
- Type
- string
- Description
- The location timezone
Properties for locationConfig
object
- Name
requireMileageRecordBeforeInvoice
- Type
- boolean Required
- Description
- True if the location requires mileage recorded before an order can be invoiced
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Request
curl https://api.shopmonkey.cloud/v3/user/:id \
-H "Authorization: Bearer ${SM_TOKEN}"
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id",
"meta": {
"userId": "userId",
"sessionId": "sessionId",
"version": 1
},
"createdDate": "createdDate",
"updatedDate": null,
"companyId": "companyId",
"locationId": null,
"firstName": null,
"lastName": null,
"calendarColor": null,
"customFields": {}
}
}
List Users
Find all users
Query String parameters
- Name
ids
- Type
- array
- Description
- Name
limit
- Type
- number
- Description
- the limit on the number of records to return
- Name
orderby
- Type
- string
- Description
- the order instructions for the result
- Name
params
- Type
- string
- Description
- additional request specific params
- Name
skip
- Type
- number
- Description
- the number of records to skip for a paginated result
- Name
where
- Type
- one of: any, any
- Description
- an object to use for filtering the results
Produces
The response content type: application/json
200
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- array Required
- Description
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if success = false
- Name
meta
- Type
- object
- Description
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Properties for meta
object
- Name
hasMore
- Type
- boolean
- Description
- if there are more records available
- Name
sums
- Type
- object
- Description
- Name
total
- Type
- number
- Description
- the total number of records
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Request
curl https://api.shopmonkey.cloud/v3/user \
-H "Authorization: Bearer ${SM_TOKEN}"
Example Responseapplication/json
{
"success": true,
"data": [
{
"id": "id",
"createdDate": "createdDate",
"updatedDate": null,
"companyId": "companyId",
"locationId": null,
"firstName": null,
"lastName": null,
"calendarColor": null,
"customFields": {}
}
]
}
Create
Create an
Body parameters
Consumes
The following content type is required: application/json
- Name
active
- Type
- boolean
- Description
- Name
requireEmailChange
- Type
- boolean
- Description
- Name
laborRateId
- Type
- string
- Description
- Name
firstName
- Type
- string Required
- Description
- Name
lastName
- Type
- string Required
- Description
- Name
email
- Type
- string Required
- Description
- Name
phone
- Type
- string
- Description
- Name
preferredLanguage
- Type
- one of: en, en_US, fr_CA
- Description
- Name
color
- Type
- one of: aqua, blue, brown, green, orange, purple, red, yellow
- Description
- Name
customFields
- Type
- object
- Description
- custom field values
- Name
customPhotoId
- Type
- string
- Description
- a custom photo blob id for this user
- Name
customPhotoUrl
- Type
- string
- Description
- a url to the custom photo url for this user
- Name
googlePhotoUrl
- Type
- string
- Description
- a url to a profile photo for this user from a google login
- Name
googlePhotoDisabled
- Type
- boolean
- Description
- if the profile photo was removed to force a monogram
- Name
locationIds
- Type
- one of: any, any
- Description
- Name
allLocations
- Type
- boolean
- Description
- whether the user has access to all locations
- Name
companyId
- Type
- string
- Description
- the id for the company the user should be in
- Name
flatRate
- Type
- boolean
- Description
- whether the user has a flat rate
- Name
hq
- Type
- boolean
- Description
- whether the user is a HQ admin user
- Name
laborRateCents
- Type
- number
- Description
- the labor rate for the user
- Name
roleId
- Type
- string Required
- Description
- the id for the role to assign to the user
- Name
userCommission
- Type
- object
- Description
Properties for userCommission
object
- Name
laborPercent
- Type
- number Required
- Description
- the labor percent commission for the user
- Name
partPercent
- Type
- number Required
- Description
- the part percent commission for the user
- Name
tirePercent
- Type
- number Required
- Description
- the tire percent commission for the user
Produces
The response content type: application/json
200
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if success = false
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
- Name
data
- Type
- object Required
- Description
- User schema
Properties for data
object
- Name
id
- Type
- string Required
- Description
- Name
createdDate
- Type
- string Required
- Description
- Name
updatedDate
- Type
- string Required
- Description
- Name
companyId
- Type
- string Required
- Description
- Name
active
- Type
- boolean Required
- Description
- Name
assignedServiceWriter
- Type
- boolean Required
- Description
- Name
assignedTechnician
- Type
- boolean Required
- Description
- Name
deactivatedByUserId
- Type
- string Required
- Description
- the user that deactivated the record or null if not deactivated
- Name
deactivatedDate
- Type
- string Required
- Description
- the date that the record was deactivated or null if not deactivated
- Name
requireEmailChange
- Type
- boolean Required
- Description
- Name
laborRateId
- Type
- string Required
- Description
- Name
firstName
- Type
- string Required
- Description
- Name
lastName
- Type
- string Required
- Description
- Name
email
- Type
- string Required
- Description
- Name
phone
- Type
- string Required
- Description
- Name
preferredLanguage
- Type
- one of: en, en_US, fr_CA Required
- Description
- Name
color
- Type
- one of: aqua, blue, brown, green, orange, purple, red, yellow Required
- Description
- Name
customFields
- Type
- object
- Description
- custom field values
- Name
currentLocationId
- Type
- string Required
- Description
- Name
customPhotoId
- Type
- string Required
- Description
- a custom photo blob id for this user
- Name
customPhotoUrl
- Type
- string Required
- Description
- a url to the custom photo url for this user
- Name
googlePhotoUrl
- Type
- string Required
- Description
- a url to a profile photo for this user from a google login
- Name
googlePhotoDisabled
- Type
- boolean Required
- Description
- if the profile photo was removed to force a monogram
- Name
locationIds
- Type
- array Required
- Description
- Name
imported
- Type
- boolean Required
- Description
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
curl https://api.shopmonkey.cloud/v3/user \
-H "Authorization: Bearer ${SM_TOKEN}" \
-H 'Content-Type: application/json' \
--data '{ "firstName" : "value", "lastName" : "value", "email" : "value", "roleId" : "value" }'
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id",
"createdDate": "createdDate",
"updatedDate": null,
"companyId": "companyId",
"locationId": null,
"firstName": null,
"lastName": null,
"calendarColor": null
}
}
Update
Update one by id
URL parameters
- Name
id
- Type
- string Required
- Description
- the id for the object to update
Body parameters
Consumes
The following content type is required: application/json
- Name
active
- Type
- boolean
- Description
- Name
deactivatedByUserId
- Type
- string
- Description
- the user that deactivated the record or null if not deactivated
- Name
deactivatedDate
- Type
- string
- Description
- the date that the record was deactivated or null if not deactivated
- Name
requireEmailChange
- Type
- boolean
- Description
- Name
laborRateId
- Type
- string
- Description
- Name
firstName
- Type
- string
- Description
- Name
lastName
- Type
- string
- Description
- Name
email
- Type
- string
- Description
- Name
phone
- Type
- string
- Description
- Name
preferredLanguage
- Type
- one of: en, en_US, fr_CA
- Description
- Name
color
- Type
- one of: aqua, blue, brown, green, orange, purple, red, yellow
- Description
- Name
customFields
- Type
- object
- Description
- custom field values
- Name
currentLocationId
- Type
- string
- Description
- Name
customPhotoId
- Type
- string
- Description
- a custom photo blob id for this user
- Name
customPhotoUrl
- Type
- string
- Description
- a url to the custom photo url for this user
- Name
googlePhotoUrl
- Type
- string
- Description
- a url to a profile photo for this user from a google login
- Name
googlePhotoDisabled
- Type
- boolean
- Description
- if the profile photo was removed to force a monogram
- Name
locationIds
- Type
- array
- Description
- Name
flatRate
- Type
- boolean
- Description
- whether the user has a flat rate
- Name
laborRateCents
- Type
- number
- Description
- the labor rate for the user
- Name
userCommission
- Type
- object
- Description
Properties for userCommission
object
- Name
laborPercent
- Type
- number Required
- Description
- the labor percent commission for the user
- Name
partPercent
- Type
- number Required
- Description
- the part percent commission for the user
- Name
tirePercent
- Type
- number Required
- Description
- the tire percent commission for the user
Produces
The response content type: application/json
200
Response
- Name
data
- Type
- object
- Description
- Name
success
- Type
- boolean Required
- Description
Properties for data
object
- Name
id
- Type
- string Required
- Description
- the id for the object
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
curl https://api.shopmonkey.cloud/v3/user/:id \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true
}
Delete User
Permanently delete a User by id
URL parameters
- Name
id
- Type
- string Required
- Description
- the id of the record to delete
Produces
The response content type: application/json
200
Response
- Name
data
- Type
- object
- Description
- Name
success
- Type
- boolean Required
- Description
Properties for data
object
- Name
id
- Type
- string Required
- Description
- the id for the object
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
curl https://api.shopmonkey.cloud/v3/user/:id \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X DELETE -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true
}
Update Custom Fields
Update a User's Custom Fields
URL parameters
- Name
id
- Type
- string Required
- Description
Body parameters
Consumes
The following content type is required: application/json
- Name
customFields
- Type
- object
- Description
- custom fields as JSON object
Produces
The response content type: application/json
200
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if success = false
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
- Name
data
- Type
- object Required
- Description
Properties for data
object
- Name
id
- Type
- string Required
- Description
- the id for the object
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
curl https://api.shopmonkey.cloud/v3/user/:id/customfield \
-H "Authorization: Bearer ${SM_TOKEN}" \
-X PUT -H 'Content-Type: application/json' \
--data '{}'
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id"
}
}
Logged In User
Find all information about the logged in User
Produces
The response content type: application/json
200
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if success = false
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
- Name
data
- Type
- object Required
- Description
Properties for data
object
- Name
color
- Type
- one of: aqua, blue, brown, green, orange, purple, red, yellow
- Description
- Name
companyId
- Type
- string Required
- Description
- The unique company identifier
- Name
companyLocations
- Type
- array
- Description
- A list of all company locations (even ones the user does not have access to) — only returned on HQ login/session requests
- Name
companyWideAccess
- Type
- boolean Required
- Description
- Whether the user has company wide access or location specific access
- Name
createdDate
- Type
- string Required
- Description
- The user's creation date
- Name
currentLocationId
- Type
- string
- Description
- The unique location identifier
- Name
customPhotoId
- Type
- string Required
- Description
- the custom photo id for the avatar
- Name
customPhotoUrl
- Type
- string Required
- Description
- the custom photo url for the avatar
- Name
email
- Type
- string Required
- Description
- The user's email address
- Name
firstName
- Type
- string Required
- Description
- The user's given name
- Name
googlePhotoDisabled
- Type
- boolean Required
- Description
- if the google profile photo is disabled
- Name
googlePhotoUrl
- Type
- string Required
- Description
- the google profile photo url for the user
- Name
id
- Type
- string Required
- Description
- The unique identifier for the user
- Name
isSMEmployee
- Type
- boolean
- Description
- true if the user is a ShopMonkey employee
- Name
lastName
- Type
- string Required
- Description
- The user's family name
- Name
locations
- Type
- array
- Description
- Name
permissions
- Type
- array Required
- Description
- Name
preferredLanguage
- Type
- one of: 'en', 'en_US', 'fr_CA' Required
- Description
- The user's preferred language
- Name
userRoleIds
- Type
- array
- Description
- Name
userRoleNames
- Type
- array
- Description
- Name
company
- Type
- object
- Description
- Name
location
- Type
- object
- Description
- Name
smBranch
- Type
- string Required
- Description
- SM_BRANCH value
Properties for company
object
- Name
createdDate
- Type
- string Required
- Description
- The company's creation date
- Name
hqEnabled
- Type
- boolean Required
- Description
- Returns true of the user is part of a company that has HQ enabled
- Name
inventoryTransfersEnabled
- Type
- boolean
- Description
- Returns true if the company is allowed to transfer inventory between locations
- Name
name
- Type
- string
- Description
- The company name
- Name
upgradeScheduledDate
- Type
- string Required
- Description
- The date the company is scheduled to upgrade from v1
- Name
upgraded
- Type
- boolean Required
- Description
- Returns true if the company has been upgraded from v1
- Name
upgradedDate
- Type
- string Required
- Description
- The date the company was upgraded from v1
- Name
whiteLabelBlobId
- Type
- string
- Description
- The white label blob id
Properties for location
object
- Name
country
- Type
- string
- Description
- The location country
- Name
createdDate
- Type
- string Required
- Description
- The location's creation date
- Name
locationConfig
- Type
- object
- Description
- Name
name
- Type
- string
- Description
- The location name
- Name
postalCode
- Type
- string
- Description
- The location postal code
- Name
state
- Type
- string
- Description
- The location state
- Name
timezone
- Type
- string
- Description
- The location timezone
Properties for locationConfig
object
- Name
requireMileageRecordBeforeInvoice
- Type
- boolean Required
- Description
- True if the location requires mileage recorded before an order can be invoiced
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Request
curl https://api.shopmonkey.cloud/v3/user/me \
-H "Authorization: Bearer ${SM_TOKEN}"
Example Responseapplication/json
{
"success": true,
"data": {
"id": "id",
"locationId": "locationId",
"companyId": "companyId",
"firstName": "firstName",
"lastName": "lastName",
"permissions": [
"permissions"
]
}
}
Change password
Change password for an already logged in user
Body parameters
Consumes
The following content type is required: application/json
- Name
currentPassword
- Type
- string Required
- Description
- Name
newPassword
- Type
- string Required
- Description
Produces
The response content type: application/json
200
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if success = false
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
- Name
data
- Type
- object Required
- Description
Properties for data
object
- Name
color
- Type
- one of: aqua, blue, brown, green, orange, purple, red, yellow
- Description
- Name
companyId
- Type
- string Required
- Description
- The unique company identifier
- Name
companyLocations
- Type
- array
- Description
- A list of all company locations (even ones the user does not have access to) — only returned on HQ login/session requests
- Name
companyWideAccess
- Type
- boolean Required
- Description
- Whether the user has company wide access or location specific access
- Name
createdDate
- Type
- string Required
- Description
- The user's creation date
- Name
currentLocationId
- Type
- string
- Description
- The unique location identifier
- Name
customPhotoId
- Type
- string Required
- Description
- the custom photo id for the avatar
- Name
customPhotoUrl
- Type
- string Required
- Description
- the custom photo url for the avatar
- Name
email
- Type
- string Required
- Description
- The user's email address
- Name
firstName
- Type
- string Required
- Description
- The user's given name
- Name
googlePhotoDisabled
- Type
- boolean Required
- Description
- if the google profile photo is disabled
- Name
googlePhotoUrl
- Type
- string Required
- Description
- the google profile photo url for the user
- Name
id
- Type
- string Required
- Description
- The unique identifier for the user
- Name
isSMEmployee
- Type
- boolean
- Description
- true if the user is a ShopMonkey employee
- Name
lastName
- Type
- string Required
- Description
- The user's family name
- Name
locations
- Type
- array
- Description
- Name
permissions
- Type
- array Required
- Description
- Name
preferredLanguage
- Type
- one of: 'en', 'en_US', 'fr_CA' Required
- Description
- The user's preferred language
- Name
userRoleIds
- Type
- array
- Description
- Name
userRoleNames
- Type
- array
- Description
- Name
company
- Type
- object
- Description
- Name
location
- Type
- object
- Description
Properties for company
object
- Name
createdDate
- Type
- string Required
- Description
- The company's creation date
- Name
hqEnabled
- Type
- boolean Required
- Description
- Returns true of the user is part of a company that has HQ enabled
- Name
inventoryTransfersEnabled
- Type
- boolean
- Description
- Returns true if the company is allowed to transfer inventory between locations
- Name
name
- Type
- string
- Description
- The company name
- Name
upgradeScheduledDate
- Type
- string Required
- Description
- The date the company is scheduled to upgrade from v1
- Name
upgraded
- Type
- boolean Required
- Description
- Returns true if the company has been upgraded from v1
- Name
upgradedDate
- Type
- string Required
- Description
- The date the company was upgraded from v1
- Name
whiteLabelBlobId
- Type
- string
- Description
- The white label blob id
Properties for location
object
- Name
country
- Type
- string
- Description
- The location country
- Name
createdDate
- Type
- string Required
- Description
- The location's creation date
- Name
locationConfig
- Type
- object
- Description
- Name
name
- Type
- string
- Description
- The location name
- Name
postalCode
- Type
- string
- Description
- The location postal code
- Name
state
- Type
- string
- Description
- The location state
- Name
timezone
- Type
- string
- Description
- The location timezone
Properties for locationConfig
object
- Name
requireMileageRecordBeforeInvoice
- Type
- boolean Required
- Description
- True if the location requires mileage recorded before an order can be invoiced
4xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
5xx
Response
- Name
code
- Type
- string
- Description
- The error code
- Name
data
- Type
- object
- Description
- An optional object containing relevant error data
- Name
documentation_url
- Type
- string
- Description
- An optional link to the documentation for the error
- Name
message
- Type
- string
- Description
- the error message if not successful
- Name
success
- Type
- boolean Required
- Description
- if successful, will be true. if not successful, will be false and message will contain a human readable error message
Example Requestapplication/json
curl https://api.shopmonkey.cloud/v3/user/password \
-H "Authorization: Bearer ${SM_TOKEN}" \
-H 'Content-Type: application/json' \
--data '{ "currentPassword" : "value", "newPassword" : "value" }'
Example Responseapplication/json
{
"success": true,
"data": {
"color": "color",
"companyId": "companyId",
"createdDate": "createdDate",
"firstName": "firstName",
"id": "id",
"lastName": "lastName",
"locationId": "locationId",
"locations": [
{
"id": "id",
"name": "name"
}
],
"permissions": [
"permissions"
],
"userRoleNames": [
"userRoleNames"
],
"company": {
"createdDate": "createdDate",
"name": "name"
},
"location": {
"country": "country",
"createdDate": "createdDate",
"name": "name",
"state": "state",
"timezone": "timezone",
"locationConfig": {
"requireMileageRecordBeforeInvoice": true
}
}
}
}