{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"b7863aa6-e428-4ab0-b670-98813143749c","name":"WorkMax API","description":"_**NOTE: This documentation supersedes the older documentation and is much more robust including showing how to insert/update records back into WorkMax via the API. It also shows examples in multiple languages and utilizes the full power of Postman as a tool to help you. Your previous Custom Integration Token will continue to work for querying data out of WorkMax; however, you will need to use the provided Control Center login call and use that token for insert/update calls until the Custom Integration Token has been made to support those calls. The Control Center login token works for all calls.**_\n\nThe WM Client API should be fairly straight forward for all GET calls to retrieve data from the WorkMax API. There should be a call to get ALL entities as well as a call to get a specific entity by id value.\n\n**ODATA**\n\nWorkMax utilizes the ODATA protocol in most cases of its API calls. The examples in this documentation show some basic ODATA $filtering based on id values but you can utilized all of the ODATA functionality to filter down on any exposed properties within an Entity. More info on ODATA can be found at [https://www.odata.org/documentation/](https://www.odata.org/documentation/)\n\n**Data Format**  \nAll data payloads sent into upsert API calls and received from API query calls are in JSON format.\n\n**ID**\n\nThe **id** value is important to note as it's also used to insert new records with or update existing records with as well. You need to make sure in inserts you generate a universal unique id to pass into that field. You can use a UUID from your system or generate one from a site like [https://www.uuidgenerator.net/version4](https://www.uuidgenerator.net/version4) and used that for the ID value on upsert calls. **(We do prefer UUIDs with the hyphens stripped out)**\n\n**External ID**\n\nYou can set the ID value to any 3rd party external ID from the system you are interfacing with on an upsert call and it can be in any format. WorkMax will see that it's not a standard UID that WorkMax uses by default and set the ExternalId property to your 3rd party value for you as well as set the ID property to a standard WorkMax UID automatically. You can then reference records by ID but pass in your 3rd party externalId or the WorkMax generated ID to lookup the record.\n\n**State Management**\n\nYou can store state on an entity which can be helpful on subsequent queries. A good example is querying for time batches and storing the last time you queried into state on the records you last received. Then on the next query you can use the state value to filter out previously processed time batch records and only work on the new records. See STATE- Update State and STATE - Query State API calls for examples.\n\n_**NOTE**\\*_: You must request from AboutTime support what state keys you will be storing data against for all entities you will be storing state data on. Once that has been enabled for each key, you can then store state data on those keys and entities.\\*\n\n**Inactive Records**\n\nIn order to get back data with an Inactive status on GET queries you will need to add a special parameter to the query string outside of any ODATA expressions. Add: **&includeInactiveData=true**\n\nexample: {{base_url}}v2/Employee?$filter=externalId eq '12345'&includeInactiveData=true\n\n**Postman**\n\nThere are four environment or collection variables you need to set before making any calls:\n\n1- **dsURL:** This is set to the data service endpoint for querying data out of WM. You will need to set the URI to one of the following URL's based on what environment you are targeting:\n\nAPP(Production) = [https://ds.app.workmax.com](https://ds.app.workmax.com)  \nSandbox = [https://ds.sdbx.workmax.com](https://ds.beta.workmax.com)  \nQA/Dev = [https://ds.qa.workmax.com](https://ds.qa.workmax.com)\n\n2- **wfUrl:** This needs to be set to the proper workflow endpoint for inserting/updating data back into WM. You will need to set the URI to one of the following URL's based on what environment you are targeting:\n\nAPP(Production) = [https://wf-app.workmax.com](https://wf-app.workmax.com)  \nSandbox/QA/Dev = [https://wf-qa.workmax.com](https://wf-qa.workmax.com)\n\n3- **env:** Set this value to the environment you are working in.\n\nAPP(Production) = prod\n\nSANDBOX = sdbx\n\nQA=qa\n\nThen in every POST request or wf-xx request, set a Header variable to:\n\nKey: **WM-ENV**\n\nValue: **{{env}}**\n\n4- **token:** This is the token obtained from the **Login** call which gives a short lived token to use. After retrieving that token, copy and paste it into this collection variable and you should be able to make any API call against the account you logged into.\n\n**NOTE:** You can setup a Custom Integration Token in the Control Center and that token will work on all GET(query) calls but will not work yet on POST/PUT/PATCH(upsert) calls yet. Use a Control Center Login token for now which works in both cases. The Control Center token is short-lived(2 hours) so you may need to call the login API call to get the token each time before you make the call for an insert/update operation. _(Custom Integration Token support for insert/update calls is coming soon!)_\n\n**NOTE**: The dsUrl, wfUrl and token variables can be overridden at the Postman environment level so you can easily setup a QA, Sandbox and APP environment with those values set to the proper endpoint URL's for each environment and quickly switch between environments to run API calls against. All you would need to set is the token at the collection variable level after a login call at that point.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"9955549","team":3103058,"collectionId":"b7863aa6-e428-4ab0-b670-98813143749c","publishedId":"UVeMJPjD","public":true,"publicUrl":"https://documenter-api.postman.tech/view/9955549/UVeMJPjD","privateUrl":"https://go.postman.co/documentation/9955549-b7863aa6-e428-4ab0-b670-98813143749c","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.12.0","publishDate":"2022-04-18T21:59:02.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"APP(Production)","id":"48fa8a8e-778b-4ca4-8149-aa6928b62531","owner":"9955549","values":[{"key":"dsUrl","value":"https://ds.app.workmax.com","enabled":true,"type":"default"},{"key":"wfUrl","value":"https://wf-app.workmax.com","enabled":true,"type":"default"},{"key":"env","value":"prod","enabled":true,"type":"default"},{"key":"token","value":"","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/7fd850a8a332a6e87f8ca20636e238b1f1f23fc685567b3496ca7f180067da37","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"APP(Production)","value":"9955549-48fa8a8e-778b-4ca4-8149-aa6928b62531"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/UVeMJPjD"}