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.


GET/v3/user/:userId/role

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

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

GET
/v3/user/:userId/role
curl https://api.shopmonkey.cloud/v3/user/USERID/role \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id"
  }
}

PUT/v3/user/:userId/role

Update Role

Assign the User Type/role

URL parameters

  • Name
    userId
    Type
    string Required
    Description
    the id for the user

Body parameters

  • 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

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
    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
    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
application/json

PUT
/v3/user/:userId/role
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 Response
application/json

{
  "success": true
}

GET/v3/user/:id

Find User

Find one User by id

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object to retrieve

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
    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
    color
    Type
    string Required
    Description
  • Name
    currentLocationId
    Type
    one of: any, any
    Description
    the last location the user logged into
  • 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
    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
    string Required
    Description

Properties for laborRate object

  • Name
    valueCents
    Type
    number
    Description

Properties for company object

  • Name
    createdDate
    Type
    string Required
    Description
    The company's creation date
  • Name
    name
    Type
    string
    Description
    The company name
  • 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
    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
    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

GET
/v3/user/:id
curl https://api.shopmonkey.cloud/v3/user/ID \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/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": {}
  }
}

GET/v3/user

List Users

Find all users

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
    meta
    Type
    object
    Description
  • Name
    success
    Type
    boolean Required
    Description

Properties for meta object

  • Name
    hasMore
    Type
    boolean Required
    Description
    if there are more records available
  • Name
    sums
    Type
    object
    Description
  • Name
    total
    Type
    number Required
    Description
    the total number of records

4xx 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 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
    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

GET
/v3/user
curl https://api.shopmonkey.cloud/v3/user \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/json

{
  "success": true,
  "data": [
    {
      "id": "id",
      "createdDate": "createdDate",
      "updatedDate": null,
      "companyId": "companyId",
      "locationId": null,
      "firstName": null,
      "lastName": null,
      "calendarColor": null,
      "customFields": {}
    }
  ]
}

POST/v3/user

Create

Create an

Body parameters

  • 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
    color
    Type
    string
    Description
  • Name
    customFields
    Type
    object
    Description
    custom field values
  • Name
    allLocations
    Type
    boolean
    Description
    whether the user has access to all locations
  • 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
    laborRate
    Type
    number
    Description
    the labor rate for the user
  • Name
    locationIds
    Type
    array
    Description
  • Name
    roleId
    Type
    string Required
    Description
    the id for the role to assign to the user

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
    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
    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
    color
    Type
    string Required
    Description
  • Name
    customFields
    Type
    object
    Description
    custom field values
  • Name
    currentLocationId
    Type
    string Required
    Description

4xx 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 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
    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
application/json

POST
/v3/user
curl https://api.shopmonkey.cloud/v3/user \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X POST -H 'Content-Type: application/json' \ 
  --data '{ "firstName" : "value", "lastName" : "value", "email" : "value", "roleId" : "value" }'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "createdDate": "createdDate",
    "updatedDate": null,
    "companyId": "companyId",
    "locationId": null,
    "firstName": null,
    "lastName": null,
    "calendarColor": null
  }
}

PUT/v3/user/:id

Update User

Update one User by id

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id for the object to update

Body parameters

  • 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
    color
    Type
    string
    Description
  • Name
    customFields
    Type
    object
    Description
    custom field values
  • Name
    currentLocationId
    Type
    string
    Description

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
    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
    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
application/json

PUT
/v3/user/:id
curl https://api.shopmonkey.cloud/v3/user/ID \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X PUT -H 'Content-Type: application/json' \ 
  --data '{}'

Example Response
application/json

{
  "success": true
}

DELETE/v3/user/:id

Delete User

Permanently delete a User by id

URL parameters

  • Name
    id
    Type
    string Required
    Description
    the id of the record to delete

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
    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
    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
application/json

DELETE
/v3/user/:id
curl https://api.shopmonkey.cloud/v3/user/ID \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X DELETE -H 'Content-Type: application/json' \ 
  --data '{}'

Example Response
application/json

{
  "success": true
}

PUT/v3/user/:id/customfield

Update Custom Fields

Update a User's Custom Fields

URL parameters

  • Name
    id
    Type
    string Required
    Description

Body parameters

  • Name
    customFields
    Type
    object
    Description
    custom fields as JSON object

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
    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
    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
    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
application/json

PUT
/v3/user/:id/customfield
curl https://api.shopmonkey.cloud/v3/user/ID/customfield \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X PUT -H 'Content-Type: application/json' \ 
  --data '{}'

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id"
  }
}

GET/v3/user/me

Logged In User

Find all information about the logged in User

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
    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
    string
    Description
    The user's color
  • 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
    firstName
    Type
    string
    Description
    The user's given name
  • Name
    id
    Type
    string Required
    Description
    The unique identifier for the user
  • Name
    lastName
    Type
    string
    Description
    The user's family name
  • Name
    locations
    Type
    array
    Description
  • Name
    permissions
    Type
    array Required
    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
    name
    Type
    string
    Description
    The company name
  • 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
    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
    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

GET
/v3/user/me
curl https://api.shopmonkey.cloud/v3/user/me \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

Example Response
application/json

{
  "success": true,
  "data": {
    "id": "id",
    "locationId": "locationId",
    "companyId": "companyId",
    "firstName": "firstName",
    "lastName": "lastName",
    "permissions": [
      "permissions"
    ]
  }
}

POST/v3/user/password

Change password

Change password for an already logged in user

Body parameters

  • Name
    currentPassword
    Type
    string Required
    Description
  • Name
    newPassword
    Type
    string Required
    Description

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
    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
    string
    Description
    The user's color
  • 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
    firstName
    Type
    string
    Description
    The user's given name
  • Name
    id
    Type
    string Required
    Description
    The unique identifier for the user
  • Name
    lastName
    Type
    string
    Description
    The user's family name
  • Name
    locations
    Type
    array
    Description
  • Name
    permissions
    Type
    array Required
    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
    name
    Type
    string
    Description
    The company name
  • 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
    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
    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
application/json

POST
/v3/user/password
curl https://api.shopmonkey.cloud/v3/user/password \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X POST -H 'Content-Type: application/json' \ 
  --data '{ "currentPassword" : "value", "newPassword" : "value" }'

Example Response
application/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
      }
    }
  }
}