Difference between revisions of "Get Jobs By Status"
From MyMobileWorkers API
(→Example response) |
(→Example response) |
||
| Line 34: | Line 34: | ||
<source lang="java"> | <source lang="java"> | ||
{ | { | ||
| − | " | + | "type":"repair", |
| + | "status":"NEW", | ||
| + | "duration":0, | ||
| + | "product":null, | ||
| + | "customer":null, | ||
| + | "created_at":"2013-08-05T00:00:00+01:00", | ||
| + | "job_number":"123", | ||
| + | "gas_safe_inspection":[ | ||
| + | |||
| + | ], | ||
| + | "mobile_user":{ | ||
| + | "username":"Darren_test32", | ||
| + | "email":"darren.atherton19@yahoo.com", | ||
| + | "color":"AE3B94", | ||
| + | "engineer_registration_number":null | ||
| + | }, | ||
| + | "timeslot":null, | ||
| + | "asset_histories":[ | ||
{ | { | ||
| − | " | + | "location":"aPlace2", |
| − | "status":" | + | "status":{ |
| − | + | "external_id":null, | |
| − | " | + | "name":"test" |
| − | " | + | }, |
| − | " | + | "description":"describingwords", |
| − | " | + | "item":{ |
| − | + | "external_id":null, | |
| − | + | "category":"test2", | |
| − | " | + | "name":"Woo" |
| − | " | + | }, |
| − | " | + | "serial_number":"serialNo456", |
| − | + | "external_id":"sss32", | |
| − | + | "last_scanned_by":null, | |
| − | " | + | "last_updated_by":null, |
| − | + | "created_at":1376650412000, | |
| − | + | "job":{ | |
| − | " | + | "job_ number":"123" |
| − | " | + | }, |
| − | " | + | "asset":{ |
| − | " | + | "external_id":"sss32", |
| − | " | + | "serial_number":"serialNo456" |
| + | }, | ||
| + | "custom_fields":{ | ||
| + | "testFieldName3":"testFieldValue3", | ||
| + | "testFieldName2":"testFieldValue2", | ||
| + | "testFieldName1":"testFieldValue1" | ||
| + | }, | ||
| + | "customer":{ | ||
| + | "name":"john" | ||
| + | }, | ||
| + | "branch":{ | ||
| + | "name":"DarrenDevTest" | ||
}, | }, | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
"photos":[ | "photos":[ | ||
| − | |||
| − | |||
| − | |||
] | ] | ||
}, | }, | ||
{ | { | ||
| − | " | + | "location":"aPlace2", |
| − | "status":" | + | "status":{ |
| − | + | "external_id":null, | |
| − | " | + | "name":"test" |
| − | " | + | }, |
| − | " | + | "description":"describingwords", |
| − | " | + | "item":{ |
| − | + | "external_id":null, | |
| − | + | "category":"test2", | |
| − | " | + | "name":"Woo" |
| − | " | + | }, |
| − | " | + | "serial_number":"serialNo456", |
| − | + | "external_id":"sss32", | |
| − | + | "last_scanned_by":null, | |
| − | " | + | "last_updated_by":null, |
| − | + | "created_at":1376650421000, | |
| − | + | "job":{ | |
| − | " | + | "job_ number":"123" |
| − | " | + | }, |
| − | " | + | "asset":{ |
| − | " | + | "external_id":"sss32", |
| − | " | + | "serial_number":"serialNo456" |
| + | }, | ||
| + | "custom_fields":{ | ||
| + | "testFieldName3":"testFieldValue3", | ||
| + | "testFieldName2":"testFieldValue2", | ||
| + | "testFieldName1":"testFieldValue1" | ||
| + | }, | ||
| + | "customer":{ | ||
| + | "name":"john" | ||
| + | }, | ||
| + | "branch":{ | ||
| + | "name":"DarrenDevTest" | ||
}, | }, | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
"photos":[ | "photos":[ | ||
| − | |||
| − | |||
| − | |||
] | ] | ||
}, | }, | ||
{ | { | ||
| − | " | + | "location":"aPlace2", |
| − | "status":" | + | "status":{ |
| − | + | "external_id":null, | |
| − | " | + | "name":"test" |
| − | " | + | }, |
| − | " | + | "description":"describingwords", |
| − | " | + | "item":{ |
| − | + | "external_id":null, | |
| − | + | "category":"test2", | |
| − | " | + | "name":"Woo" |
| − | " | + | }, |
| − | " | + | "serial_number":"serialNo456", |
| − | + | "external_id":"sss32", | |
| − | + | "last_scanned_by":null, | |
| − | " | + | "last_updated_by":null, |
| − | + | "created_at":1377005632000, | |
| − | + | "job":{ | |
| − | " | + | "job_ number":"123" |
| − | " | + | }, |
| − | " | + | "asset":{ |
| − | " | + | "external_id":"sss32", |
| − | " | + | "serial_number":"serialNo456" |
| + | }, | ||
| + | "custom_fields":{ | ||
| + | "testFieldName3":"testFieldValue3", | ||
| + | "testFieldName2":"testFieldValue2", | ||
| + | "testFieldName1":"testFieldValue1" | ||
| + | }, | ||
| + | "customer":{ | ||
| + | "name":"john" | ||
| + | }, | ||
| + | "branch":{ | ||
| + | "name":"DarrenDevTest" | ||
}, | }, | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
"photos":[ | "photos":[ | ||
| − | |||
| − | |||
| − | |||
] | ] | ||
}, | }, | ||
{ | { | ||
| − | " | + | "location":"aPlace2", |
| − | "status | + | "status":{ |
| − | + | "external_id":null, | |
| − | + | "name":"test" | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | " | + | |
| − | " | + | |
| − | + | ||
| − | + | ||
}, | }, | ||
| − | " | + | "description":"describingwords", |
| − | + | "item":{ | |
| − | " | + | "external_id":null, |
| − | + | "category":"test2", | |
| − | " | + | "name":"Woo" |
| − | " | + | }, |
| − | " | + | "serial_number":"serialNo789", |
| − | + | "external_id":"sss34", | |
| − | " | + | "last_scanned_by":null, |
| − | ", | + | "last_updated_by":null, |
| − | " | + | "created_at":1377005675000, |
| − | " | + | "job":{ |
| − | " | + | "job_ number":"123" |
| − | + | }, | |
| − | + | "asset":{ | |
| − | + | "external_id":"sss34", | |
| − | " | + | "serial_number":"serialNo789" |
| − | + | }, | |
| + | "custom_fields":{ | ||
| + | "testFieldName3":"testFieldValue3", | ||
| + | "testFieldName2":"testFieldValue2", | ||
| + | "testFieldName1":"testFieldValue1" | ||
| + | }, | ||
| + | "customer":{ | ||
| + | "name":"john" | ||
| + | }, | ||
| + | "branch":{ | ||
| + | "name":"DarrenDevTest" | ||
| + | }, | ||
| + | "photos":[ | ||
| + | { | ||
| + | "file_name":"www.testFileName.com/test" | ||
| + | }, | ||
| + | { | ||
| + | "file_name":"www.testFileName.com/test" | ||
| + | } | ||
| + | ] | ||
| + | } | ||
| + | ], | ||
| + | "contact_name":"qwerty", | ||
| + | "address_1":"qwerty", | ||
| + | "address_2":null, | ||
| + | "postcode":"qqwerty", | ||
| + | "notes":null, | ||
| + | "address_3":null, | ||
| + | "address_4":null, | ||
| + | "contact_number_1":"0", | ||
| + | "contact_number_2":null, | ||
| + | "special_instructions":null, | ||
| + | "fault":null, | ||
| + | "repair_code":null, | ||
| + | "repair_description":null, | ||
| + | "signee":null, | ||
| + | "satisfaction":null, | ||
| + | "failure_type":null, | ||
| + | "attachments":[ | ||
| − | + | ], | |
| − | + | "items":[ | |
| + | { | ||
| + | "name":"Bob", | ||
| + | "type":"C", | ||
| + | "status":"COMPLETED", | ||
| + | "notes":"exampleNotes", | ||
| + | "expected_quantity":4, | ||
| + | "other":"test", | ||
| + | "actual_quantity":null | ||
| + | }, | ||
| + | { | ||
| + | "name":"Bob", | ||
| + | "type":"C", | ||
| + | "status":"COMPLETED", | ||
| + | "notes":"exampleNotes", | ||
| + | "expected_quantity":4, | ||
| + | "other":"test", | ||
| + | "actual_quantity":null | ||
| + | }, | ||
| + | { | ||
| + | "name":"darrenItem", | ||
| + | "type":"C", | ||
| + | "status":"COMPLETED", | ||
| + | "notes":"exampleNotes", | ||
| + | "expected_quantity":4, | ||
| + | "other":"test", | ||
| + | "actual_quantity":null | ||
| + | }, | ||
| + | { | ||
| + | "name":"darrenItem245", | ||
| + | "type":"C", | ||
| + | "status":"COMPLETED", | ||
| + | "notes":"exampleNotes", | ||
| + | "expected_quantity":4, | ||
| + | "other":"test", | ||
| + | "actual_quantity":null | ||
| + | }, | ||
| + | { | ||
| + | "name":"darrenItem245", | ||
| + | "type":"C", | ||
| + | "status":"COMPLETED", | ||
| + | "notes":"exampleNotes", | ||
| + | "expected_quantity":4, | ||
| + | "other":"test", | ||
| + | "actual_quantity":null | ||
| + | }, | ||
| + | { | ||
| + | "name":"darrenItem245", | ||
| + | "type":"C", | ||
| + | "status":"COMPLETED", | ||
| + | "notes":"exampleNotes", | ||
| + | "expected_quantity":4, | ||
| + | "other":"test", | ||
| + | "actual_quantity":null | ||
| + | }, | ||
| + | { | ||
| + | "name":"darrenItem", | ||
| + | "type":"C", | ||
| + | "status":"COMPLETED", | ||
| + | "notes":"exampleNotes", | ||
| + | "expected_quantity":4, | ||
| + | "other":"test", | ||
| + | "actual_quantity":null | ||
| + | } | ||
| + | ], | ||
| + | "activities":[ | ||
| − | + | ], | |
| − | + | "post_job_checks":[ | |
| − | + | ||
| − | + | ], | |
| − | + | "pre_job_checks":[ | |
| − | + | ], | |
| − | + | "photos":[ | |
| − | + | ], | |
| − | + | "invoices":[ | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
] | ] | ||
} | } | ||
Revision as of 09:16, 21 August 2013
Summary
| Jobs | ||
|---|---|---|
| URL | http://:base_url/:api_path/:version/jobs/status?api_key=YOUR_KEY&status=A_STATUS&start_date=DATETIME&end_date=DATETIME | |
| Type | GET | |
| Params: | api_key | required |
| status | required | |
| start_date | required | |
| end_date | required | |
| Response | JSON | |
The jobs/status method returns all jobs listed between the specified date range, currently in the specified status
Example response
{ "type":"repair", "status":"NEW", "duration":0, "product":null, "customer":null, "created_at":"2013-08-05T00:00:00+01:00", "job_number":"123", "gas_safe_inspection":[ ], "mobile_user":{ "username":"Darren_test32", "email":"darren.atherton19@yahoo.com", "color":"AE3B94", "engineer_registration_number":null }, "timeslot":null, "asset_histories":[ { "location":"aPlace2", "status":{ "external_id":null, "name":"test" }, "description":"describingwords", "item":{ "external_id":null, "category":"test2", "name":"Woo" }, "serial_number":"serialNo456", "external_id":"sss32", "last_scanned_by":null, "last_updated_by":null, "created_at":1376650412000, "job":{ "job_ number":"123" }, "asset":{ "external_id":"sss32", "serial_number":"serialNo456" }, "custom_fields":{ "testFieldName3":"testFieldValue3", "testFieldName2":"testFieldValue2", "testFieldName1":"testFieldValue1" }, "customer":{ "name":"john" }, "branch":{ "name":"DarrenDevTest" }, "photos":[ ] }, { "location":"aPlace2", "status":{ "external_id":null, "name":"test" }, "description":"describingwords", "item":{ "external_id":null, "category":"test2", "name":"Woo" }, "serial_number":"serialNo456", "external_id":"sss32", "last_scanned_by":null, "last_updated_by":null, "created_at":1376650421000, "job":{ "job_ number":"123" }, "asset":{ "external_id":"sss32", "serial_number":"serialNo456" }, "custom_fields":{ "testFieldName3":"testFieldValue3", "testFieldName2":"testFieldValue2", "testFieldName1":"testFieldValue1" }, "customer":{ "name":"john" }, "branch":{ "name":"DarrenDevTest" }, "photos":[ ] }, { "location":"aPlace2", "status":{ "external_id":null, "name":"test" }, "description":"describingwords", "item":{ "external_id":null, "category":"test2", "name":"Woo" }, "serial_number":"serialNo456", "external_id":"sss32", "last_scanned_by":null, "last_updated_by":null, "created_at":1377005632000, "job":{ "job_ number":"123" }, "asset":{ "external_id":"sss32", "serial_number":"serialNo456" }, "custom_fields":{ "testFieldName3":"testFieldValue3", "testFieldName2":"testFieldValue2", "testFieldName1":"testFieldValue1" }, "customer":{ "name":"john" }, "branch":{ "name":"DarrenDevTest" }, "photos":[ ] }, { "location":"aPlace2", "status":{ "external_id":null, "name":"test" }, "description":"describingwords", "item":{ "external_id":null, "category":"test2", "name":"Woo" }, "serial_number":"serialNo789", "external_id":"sss34", "last_scanned_by":null, "last_updated_by":null, "created_at":1377005675000, "job":{ "job_ number":"123" }, "asset":{ "external_id":"sss34", "serial_number":"serialNo789" }, "custom_fields":{ "testFieldName3":"testFieldValue3", "testFieldName2":"testFieldValue2", "testFieldName1":"testFieldValue1" }, "customer":{ "name":"john" }, "branch":{ "name":"DarrenDevTest" }, "photos":[ { "file_name":"www.testFileName.com/test" }, { "file_name":"www.testFileName.com/test" } ] } ], "contact_name":"qwerty", "address_1":"qwerty", "address_2":null, "postcode":"qqwerty", "notes":null, "address_3":null, "address_4":null, "contact_number_1":"0", "contact_number_2":null, "special_instructions":null, "fault":null, "repair_code":null, "repair_description":null, "signee":null, "satisfaction":null, "failure_type":null, "attachments":[ ], "items":[ { "name":"Bob", "type":"C", "status":"COMPLETED", "notes":"exampleNotes", "expected_quantity":4, "other":"test", "actual_quantity":null }, { "name":"Bob", "type":"C", "status":"COMPLETED", "notes":"exampleNotes", "expected_quantity":4, "other":"test", "actual_quantity":null }, { "name":"darrenItem", "type":"C", "status":"COMPLETED", "notes":"exampleNotes", "expected_quantity":4, "other":"test", "actual_quantity":null }, { "name":"darrenItem245", "type":"C", "status":"COMPLETED", "notes":"exampleNotes", "expected_quantity":4, "other":"test", "actual_quantity":null }, { "name":"darrenItem245", "type":"C", "status":"COMPLETED", "notes":"exampleNotes", "expected_quantity":4, "other":"test", "actual_quantity":null }, { "name":"darrenItem245", "type":"C", "status":"COMPLETED", "notes":"exampleNotes", "expected_quantity":4, "other":"test", "actual_quantity":null }, { "name":"darrenItem", "type":"C", "status":"COMPLETED", "notes":"exampleNotes", "expected_quantity":4, "other":"test", "actual_quantity":null } ], "activities":[ ], "post_job_checks":[ ], "pre_job_checks":[ ], "photos":[ ], "invoices":[ ] }