Difference between revisions of "Get All Custom Lists"
From MyMobileWorkers API
(→Summary) |
(→Example response) |
||
| Line 44: | Line 44: | ||
"created_at": "2017-07-14T15:45:53+00:00", | "created_at": "2017-07-14T15:45:53+00:00", | ||
"updated_at": "2017-07-14T15:45:53+00:00", | "updated_at": "2017-07-14T15:45:53+00:00", | ||
| − | "order_position": 5 | + | "order_position": 5, |
| + | "triggers": "" | ||
}, | }, | ||
{ | { | ||
| Line 52: | Line 53: | ||
"created_at": "2017-07-14T15:00:14+00:00", | "created_at": "2017-07-14T15:00:14+00:00", | ||
"updated_at": "2017-07-14T15:00:14+00:00", | "updated_at": "2017-07-14T15:00:14+00:00", | ||
| − | "order_position": 6 | + | "order_position": 6, |
| + | "triggers": "" | ||
}, | }, | ||
{ | { | ||
| Line 60: | Line 62: | ||
"created_at": "2017-07-20T16:22:21+00:00", | "created_at": "2017-07-20T16:22:21+00:00", | ||
"updated_at": "2017-07-20T16:22:21+00:00", | "updated_at": "2017-07-20T16:22:21+00:00", | ||
| − | "order_position": 0 | + | "order_position": 0, |
| + | "triggers": "" | ||
} | } | ||
] | ] | ||
Revision as of 11:34, 12 March 2018
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, "triggers": "" }, { "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, "triggers": "" }, { "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, "triggers": "" } ] }, { "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"