Difference between revisions of "Get All Custom Lists"
From MyMobileWorkers API
(→Summary) |
|||
| Line 23: | Line 23: | ||
The get all custom lists method returns lists corresponding to the company api key supplied in the request and branch if it is in the params of the request. | The get all custom lists method returns lists corresponding to the company api key supplied in the request and branch if it is in the params of the request. | ||
| + | |||
| + | A custom list cannot be created within the API it has be be created within the workflow implementation so that it corresponds with a custom list within a workflow template correctly. | ||
== Example response == | == Example response == | ||
Revision as of 11:26, 27 July 2017
Summary
| Jobs | ||
|---|---|---|
| URL | https://:base_url/:api_path/:version/lists/all?api_key=YOUR_KEY | |
| Type | GET | |
| Params: | api_key | required |
| branch | optional | |
| Response | JSON | |
The get all custom lists method returns lists corresponding to the company api key supplied in the request and branch if it is in the params of the request.
A custom list cannot be created within the API it has be be created within the workflow implementation so that it corresponds with a custom list within a workflow template correctly.
Example response
[ { "name": "Delivery sites", "description": "A list of delivery sites in the area", "branch": null, "created_at": "2017-07-11T09:40:42+00:00", "updated_at": "2017-07-20T16:22:21+00:00", "list_key": "delivery_site1", "list_items": [ { "name": "Aldcliffe Site", "notes": "small", "external_id": "12", "created_at": "2017-07-14T15:45:53+00:00", "updated_at": "2017-07-14T15:45:53+00:00", "order_position": 5 }, { "name": "Bond Estate", "notes": "medium", "external_id": "13", "created_at": "2017-07-14T15:00:14+00:00", "updated_at": "2017-07-14T15:00:14+00:00", "order_position": 6 }, { "name": "Beech Centre", "notes": "Small", "external_id": "", "created_at": "2017-07-20T16:22:21+00:00", "updated_at": "2017-07-20T16:22:21+00:00", "order_position": 0 } ] }, { "name": "Pick up Sites", "description": "Pick up sites in the area", "branch": null, "created_at": "2017-07-12T10:12:23+00:00", "updated_at": "2017-07-12T10:12:23+00:00", "list_key": "pickup_site", "list_items": [] } ]
Example curl request
curl "https://api.mymobileworkers.com:8181/api/1/lists/all?api_key=TESTKEY"curl "https://api.mymobileworkers.com:8181/api/1/lists/all?api_key=TESTKEY&branch=BRANCHNAME"