Units of Measure API
There are two methods available for units of measure :
- List all units of measure
- Return full detail on a single unit of measure
List all units of measure
End Point: https://api.myposconnect.com/api/v2/uom
Verb: GET
Example Call: https://api.myposconnect.com/api/v2/uom?liPage=1&liPageSize=99999&sSortKey=UOMCodeASC
Return Codes: 200 for success, with the body containing the JSON for the UOM's. For other possible (more general) return codes please see API Build Basics
Important: This call returns a restricted flat view of the UOMs. The JSON objects in the array are not full 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 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 “UOMCodeASC” 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 “UOMId,UOMCode”). 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 unit of measure
End Point: https://api.myposconnect.com/api/v2/uom/{UOMId}
Verb: GET
Example Call: https://api.myposconnect.com/api/v2/uom/8bf03185-cfe5-45d8-a2d9-4f83f3aa78ea
Return Codes: 200 for success, with the body containing the JSON for the Unit of Measure. 404 if not found. For other possible (more general) return codes please see API Build Basics
Important: This call returns a view of a single Unit of Measure and related fields including dynamic Custom Fields tailored for individual MYPOS clients.
Example JSON Object
Single Unit of Measure
|
---|
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.