You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
You are viewing the article in preview mode. It is not live at the moment.
Users API
print icon
Users API
 

There are two methods available for users :

  1. List all users
  2. Return full detail on a single user
List all users

End Point: https://api.myposconnect.com/api/v2/users

Verb: GET

Example Call: https://api.myposconnect.com/api/v2/users?liPage=1&liPageSize=99999&sSortKey=UserCodeASC

Return Codes: 200 for success, with the body containing the JSON for the Users. For other possible (more general) return codes please see API Build Basics

Important: This call returns a restricted flat view of the Users. The JSON objects in the array are not full Users JSON objects as shown in the appendices of this document. If some of the deeper information is required then you will need to use the method for getting a single user object. There are several query string arguments that can be used with this call as follows (you may need to URL encode your argument values).

Filters: 

liPage

Optional Integer - defaults to 1 if not supplied

liPageSize

Optional Integer - defaults to 10 if not supplied

sSortKey

Optional String – acceptable values are the name of any returned field appended with ASC or DESC (eg “UserCodeASC” means sort the results by the code field in ascending order)

sFieldList

Optional String – use to limit which fields are returned. Acceptable value is the comma-separated names of any returned field (eg “UserId,UserCode”). It is a good idea to use this argument if you do not require all the fields in the returned JSON. Please note you will always receive the fields “customSortRowNumber” and “liTotalCount” which allow you to establish how many pages of results there are and where each row lies within the results.

Return full detail on a single user by User Identifier userId

End Point: https://api.myposconnect.com/api/v2/user/{identifier}

Verb: GET

Example Call: https://api.myposconnect.com/api/v2/users/67fcefb2-fcaf-4424-98fa-7768e7025825

Return Codes: 200 for success, with the body containing the JSON for the User. For other possible (more general) return codes please see API Build Basics

Important: This call returns a view of a single user and related fields including dynamic Custom Fields tailored for individual MYPOS clients. 

Example JSON Object
Single User

{
       "userId": "x123997a-ebf6-4112-b0a2-56f6ec1afac7",
       "userCode": "123456789",
       "firstName": "William",
       "lastName": "Gates",
       "displayName": "Bill Gates",
       "userPayroll": "1",
       "userMessage": "Welcome new user!",
       "dateofBirth": "1900-12-31T00:00:00",
       "active": true,
       "userStartupMenu": "",
       "address": "",
       "city": "",
       "region": "",
       "postalCode": "",
       "country": "",
       "phoneNumber": "",
       "emailAdress": "",
       "password": null,
       "passCard": null,
       "userLessBtn": true,
       "userMoreBtn": true,
       "userErrorBtn": true,
       "userNoSaleBtn": true,
       "userQtyBtn": true,
       "userDiscountBtn": true,
       "userReopenSaleBtn": true,
       "userRefundItemBtn": true,
       "userPettyCashBtn": true,
       "userCashLiftBtn": true,
       "userDeclareFloatBtn": true,
       "userPriceOverrideBtn": true,
       "userXReadingBtn": true,
       "userZReadingBtn": true,
       "userJournalBtn": true,
       "userCloseTillBtn": true,
       "userBackOfficeBtn": true,
       "userBackOfficeReportBtn": true,
       "userShowFinancialInfo": true,
       "openInBackOffice": false,
       "cC_001": null,
       "cC_002": null,
       "cC_003": null,
       "cC_004": null,
       "cC_005": null, 
       "cC_006": null,
       "cC_007": null,
       "cC_008": null,
       "cC_009": null, 
       "cC_010": null,
       "dynamicCustomFields": {},
       "lastEditUser": "Steve Jobs",
       "creationUser": "Steve Jobs",
       "lastEditDevice": "99PC",
       "creationDevice": "99PC",
       "lastEditDate": "2010-09-06T22:18:27.227",
       "creationDate": "1986-08-25T14:22:57.517",
       "lastEditDateUTC": "2010-09-06T21:18:27.227",
       "creationDateUTC": "1986-08-25T14:22:57.517"
}

Troubleshooting Ideas

As with all API connections, you will need to have acquired a bearer token and the user that acquired the token will need to be assigned access permission to this table. If you are not receiving any results send the full endpoint together with any filters and the API user to us from a valid email address and we can advise if permissions have been authorised. You might be able to see data with one table and not another if specific permissions are not applied.

 

Feedback
0 out of 0 found this helpful

scroll to top icon