Difference between revisions of "Get jobs assigned to route"
From MyMobileWorkers API
(→Example curl request) |
(→Example curl request) |
||
| Line 204: | Line 204: | ||
== Example curl request == | == Example curl request == | ||
| − | curl "http:// | + | curl "http://api.mymobileworkers.com:8080/api/1/routes/route/jobs?api_key=TEST_KEY&route_code=ROUTE-001&route_date=2013-12-05" |
Latest revision as of 12:49, 14 November 2016
[edit] Summary
| Jobs assigned to route | ||
|---|---|---|
| URL | http://:base_url/:api_path/:version/routes/route/jobs?api_key=YOUR_KEY&route_code=CODE&route_date=DATE | |
| Type | GET | |
| Params: | api_key | required |
| route_code | required | |
| route_date | required | |
| Response | JSON | |
The jobs by route method returns all jobs that have been assigned to the route specified by the route code in the 'route_code' parameter, and which have the date specified in the 'route_date' parameter.
[edit] Example response
{ "jobs":[ { "type":"repair", "date":"2013-12-05", "time":"10:00:00", "status":"NEW", "duration":0, "product":"Internet", "created_at":"2013-11-07T15:09:49+00:00", "job_number":"JOB-0103", "repair_description":null, "repair_code":null, "notes":null, "gas_safe_inspection":[ ], "satisfaction":null, "fault":"Doesn't work", "failure_type":null, "mobile_user":{ "username":"test_username", "email":"testing@momote.com", "color":"FA909B", "engineer_registration_number":null }, "address_1":"567 Lord Street", "address_2":"Liverpool", "address_3":"Merseyside", "address_4":"", "postcode":"L236YU", "contact_name":"Fred Jones", "contact_number_1":"1234567890", "contact_number_2":"1234567890", "special_instructions":"Ask for Fred at the gate", "timeslot":"2013-12-05T10:00:00+00:00", "customer":{ "name":"test", "created_at":1382956809000, "address_1":"1 the street", "address_2":null, "address_3":null, "address_4":null, "postcode":"WA12 0JQ", "contact_name":"testName", "external_id":"hello", "updated_at":1382956809000, "contact_number":"01942295900" }, "external_id":null, "signee":null, "attachments":[ ], "items":[ ], "activities":[ ], "parts":[ ], "post_job_checks":[ ], "pre_job_checks":[ ], "photos":[ ], "invoices":[ ], "asset_histories":[ ], "route":{ "external_id":null, "route_name":"Liverpool-AM", "route_code":"LIV-001", "route_limit":180.0 } }, { "type":"repair", "date":"2013-12-05", "time":"11:00:00", "status":"NEW", "duration":0, "product":"", "created_at":"2013-11-07T15:10:54+00:00", "job_number":"JOB-0104", "repair_description":null, "repair_code":null, "notes":null, "gas_safe_inspection":[ ], "satisfaction":null, "fault":"", "failure_type":null, "mobile_user":{ "username":"test_username", "email":"tester@momote.com", "color":"FA909B", "engineer_registration_number":null }, "address_1":"89 Sale Road", "address_2":"Warrington", "address_3":"", "address_4":"", "postcode":"L456YT", "contact_name":"Elaine Griffiths", "contact_number_1":"1234567890", "contact_number_2":"", "special_instructions":"", "timeslot":"2013-12-05T11:00:00+00:00", "customer":{ "name":"test", "created_at":1382956809000, "address_1":"1 the street", "address_2":null, "address_3":null, "address_4":null, "postcode":"WA12 0JQ", "contact_name":"testName", "external_id":"hello", "updated_at":1382956809000, "contact_number":"01942295900" }, "external_id":null, "signee":null, "attachments":[ ], "items":[ ], "activities":[ ], "parts":[ ], "post_job_checks":[ ], "pre_job_checks":[ ], "photos":[ ], "invoices":[ ], "asset_histories":[ ], "weight":100.15, "route":{ "external_id":null, "route_name":"Liverpool-AM", "route_code":"LIV-001", "route_limit":180.0 } } ] }