Difference between revisions of "Get Job By Job Number"
From MyMobileWorkers API
Paularthur (Talk | contribs) |
(→Example response) |
||
| Line 358: | Line 358: | ||
} | } | ||
], | ], | ||
| + | "audits": [ | ||
| + | { | ||
| + | "created_at": "2019-10-30T17:19:31+00:00", | ||
| + | "updated_at": "2019-10-30T17:19:31+00:00", | ||
| + | "audit_checklists": [ | ||
| + | { | ||
| + | "name": "Post Job Audit", | ||
| + | "createdAt": "2019-10-30T17:19:31+00:00", | ||
| + | "updatedAt": "2019-10-30T17:19:31+00:00", | ||
| + | "orderId": 0, | ||
| + | "checklist_questions": [ | ||
| + | { | ||
| + | "type": "divider", | ||
| + | "createdAt": "2019-10-30T17:19:31+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:31+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Post Delivery Audit Questions", | ||
| + | "answer": "" | ||
| + | }, | ||
| + | { | ||
| + | "type": "yesno", | ||
| + | "createdAt": "2019-10-30T17:19:31+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:31+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Has a sufficient amount of pre-call attempts been made to the customer by the mobile user?", | ||
| + | "answer": "yes" | ||
| + | }, | ||
| + | { | ||
| + | "type": "yesno", | ||
| + | "createdAt": "2019-10-30T17:19:31+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:31+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Has the mobile user spent a reflective amount of time at the property, based on work they have undertaken ?", | ||
| + | "answer": "yes" | ||
| + | }, | ||
| + | { | ||
| + | "type": "yesno", | ||
| + | "createdAt": "2019-10-30T17:19:31+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:31+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Has a sufficient amount of photos been taken by the mobile user ?", | ||
| + | "answer": "yes" | ||
| + | }, | ||
| + | { | ||
| + | "type": "yesno", | ||
| + | "createdAt": "2019-10-30T17:19:31+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:31+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Have the photos that have been taken by the mobile user of good quality ?", | ||
| + | "answer": "yes" | ||
| + | }, | ||
| + | { | ||
| + | "type": "text", | ||
| + | "createdAt": "2019-10-30T17:19:31+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:31+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "If NO was selected in previous question, please enter why the photos were not of good enough ?", | ||
| + | "answer": "" | ||
| + | }, | ||
| + | { | ||
| + | "type": "yesnona", | ||
| + | "createdAt": "2019-10-30T17:19:31+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:31+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Has the correct failure reason been selected by the mobile user ?", | ||
| + | "answer": "yes" | ||
| + | }, | ||
| + | { | ||
| + | "type": "yesnona", | ||
| + | "createdAt": "2019-10-30T17:19:31+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:31+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Has an alert code been added to the order in MasterOffice ?", | ||
| + | "answer": "yes" | ||
| + | }, | ||
| + | { | ||
| + | "type": "yesno", | ||
| + | "createdAt": "2019-10-30T17:19:32+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:32+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Have the correct end quantities been set by the mobile user for all items ?", | ||
| + | "answer": "no" | ||
| + | }, | ||
| + | { | ||
| + | "type": "yesno", | ||
| + | "createdAt": "2019-10-30T17:19:32+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:32+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Has the correct Job Status been applied by the mobile user ?", | ||
| + | "answer": "no" | ||
| + | }, | ||
| + | { | ||
| + | "type": "yesnona", | ||
| + | "createdAt": "2019-10-30T17:19:32+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:32+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Will the job need to be reversed in MasterOffice ?", | ||
| + | "answer": "yes" | ||
| + | }, | ||
| + | { | ||
| + | "type": "text", | ||
| + | "createdAt": "2019-10-30T17:19:32+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:32+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "If YES selected in previous question, what is the amount in £ that will need to be reversed ?", | ||
| + | "answer": "0.00" | ||
| + | }, | ||
| + | { | ||
| + | "type": "yesnona", | ||
| + | "createdAt": "2019-10-30T17:19:32+00:00", | ||
| + | "notes": null, | ||
| + | "updatedAt": "2019-10-30T17:19:32+00:00", | ||
| + | "orderId": 0, | ||
| + | "question": "Will the job need to be confirmed as delivered in MasterOffice ?", | ||
| + | "answer": "no" | ||
| + | } | ||
| + | ] | ||
| + | } | ||
| + | ], | ||
| + | "mobile_user": "HUNTDewhurst", | ||
| + | "audited_portal_user": null, | ||
| + | "byPortalUser": "Lynn Ramsay", | ||
| + | "total_score": 7, | ||
| + | "percentage": 7000, | ||
| + | "max_score": 10, | ||
| + | "score_threshold": 0 | ||
| + | } | ||
| + | ], | ||
| + | "job_links": [], | ||
| + | "damage_sheets": [], | ||
| + | "tracking_references": [ | ||
| + | { | ||
| + | "job_number": "B5232213-1", | ||
| + | "tracking_reference": "CECCJ84B1HIGGJL4", | ||
| + | "expiry_datetime": "2019-10-31T06:06:03+00:00" | ||
| + | } | ||
| + | ], | ||
"post_job_checks": [], | "post_job_checks": [], | ||
"pre_job_checks": [], | "pre_job_checks": [], | ||
Revision as of 11:29, 6 November 2019
Summary
| Jobs | ||
|---|---|---|
| URL | https://:base_url/:api_path/:version/jobs/job?api_key=YOUR_KEY&job_number=A_JOB_NUMBER | |
| Type | GET | |
| Params: | api_key | required |
| job_number | required | |
| Response | JSON | |
The get job method returns a job corresponding to the job number supplied in the request
Example response
{ "secondary_users": [], "type": "repair", "signatures": [], "date": "2017-03-28", "time": null, "status": "NEW", "task": null, "duration": 0, "product": null, "weight": 100.15, "branch": { "name": "BranchA", "number": null, "external_id": null, "contact_name": "Joe Bloggs", "address_1": "", "address_2": "", "address_3": "", "address_4": "", "postcode": "", "created_at": 1473425398000, "contact_number": "06575346575", "contact_email": "branch@example.com" }, "route": { "external_id": null, "route_name": "Liverpool-AM", "route_code": "LIV-001", "route_limit": 180 }, "customer": null, "customer_sites": { "external_id": null, "contact_name": "Joe", "address_1": "29 bath road", "address_2": "", "address_3": "", "address_4": "", "postcode": "la1 3cd", "created_at": 1465210944000, "updated_at": 1465210944000, "contact_number": "06709253543", "contact_email": "joe@example.com", "sic_code": null, "customer_site_emails": [ { "customer_email": "joe@example.com" } ] }, "created_at": "2017-03-28T10:54:41+01:00", "updated_at": "2017-03-28T10:54:41+01:00", "actualStart": null, "job_number": "123", "gas_safe_inspection": [], "mobile_user": { "username": "Darren_test32", "email": "darren.atherton19@yahoo.com", "color": "AE3B94", "engineer_registration_number": null }, "priorityDetails": { "colour": "00731D", "name": "Very Low" }, "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": "2013-10-08 14:19:17", "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": "2013-10-08 14:19:17", "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": "2013-10-08 14:19:17", "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": "2013-10-08 14:19:17", "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, "barcodes":"test1,test2" }, { "name": "Bob", "type": "C", "status": "COMPLETED", "notes": "exampleNotes", "expected_quantity": 4, "other": "test", "actual_quantity": null, "barcodes":"" }, { "name": "darrenItem", "type": "C", "status": "COMPLETED", "notes": "exampleNotes", "expected_quantity": 4, "other": "test", "actual_quantity": null, "barcodes":"" }, { "name": "darrenItem245", "type": "C", "status": "COMPLETED", "notes": "exampleNotes", "expected_quantity": 4, "other": "test", "actual_quantity": null, "barcodes":"" }, { "name": "darrenItem245", "type": "C", "status": "COMPLETED", "notes": "exampleNotes", "expected_quantity": 4, "other": "test", "actual_quantity": null. "barcodes":"" }, { "name": "darrenItem245", "type": "C", "status": "COMPLETED", "notes": "exampleNotes", "expected_quantity": 4, "other": "test", "actual_quantity": null, "barcodes":"" }, { "name": "darrenItem", "type": "C", "status": "COMPLETED", "notes": "exampleNotes", "expected_quantity": 4, "other": "test", "actual_quantity": null, "barcodes":"" } ], "activities": [ { "type": "JOB_VIEWED", "created_at": "2014-01-13T10:15:00+00:00" }, { "type": "JOB_VIEWED", "created_at": "2014-01-13T10:15:00+00:00" }, { "type": "JOB_STARTED", "created_at": "2014-01-13T10:16:00+00:00" }, { "type": "JOB_ARRIVED", "created_at": "2014-01-13T10:21:00+00:00" } ], "audits": [ { "created_at": "2019-10-30T17:19:31+00:00", "updated_at": "2019-10-30T17:19:31+00:00", "audit_checklists": [ { "name": "Post Job Audit", "createdAt": "2019-10-30T17:19:31+00:00", "updatedAt": "2019-10-30T17:19:31+00:00", "orderId": 0, "checklist_questions": [ { "type": "divider", "createdAt": "2019-10-30T17:19:31+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:31+00:00", "orderId": 0, "question": "Post Delivery Audit Questions", "answer": "" }, { "type": "yesno", "createdAt": "2019-10-30T17:19:31+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:31+00:00", "orderId": 0, "question": "Has a sufficient amount of pre-call attempts been made to the customer by the mobile user?", "answer": "yes" }, { "type": "yesno", "createdAt": "2019-10-30T17:19:31+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:31+00:00", "orderId": 0, "question": "Has the mobile user spent a reflective amount of time at the property, based on work they have undertaken ?", "answer": "yes" }, { "type": "yesno", "createdAt": "2019-10-30T17:19:31+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:31+00:00", "orderId": 0, "question": "Has a sufficient amount of photos been taken by the mobile user ?", "answer": "yes" }, { "type": "yesno", "createdAt": "2019-10-30T17:19:31+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:31+00:00", "orderId": 0, "question": "Have the photos that have been taken by the mobile user of good quality ?", "answer": "yes" }, { "type": "text", "createdAt": "2019-10-30T17:19:31+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:31+00:00", "orderId": 0, "question": "If NO was selected in previous question, please enter why the photos were not of good enough ?", "answer": "" }, { "type": "yesnona", "createdAt": "2019-10-30T17:19:31+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:31+00:00", "orderId": 0, "question": "Has the correct failure reason been selected by the mobile user ?", "answer": "yes" }, { "type": "yesnona", "createdAt": "2019-10-30T17:19:31+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:31+00:00", "orderId": 0, "question": "Has an alert code been added to the order in MasterOffice ?", "answer": "yes" }, { "type": "yesno", "createdAt": "2019-10-30T17:19:32+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:32+00:00", "orderId": 0, "question": "Have the correct end quantities been set by the mobile user for all items ?", "answer": "no" }, { "type": "yesno", "createdAt": "2019-10-30T17:19:32+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:32+00:00", "orderId": 0, "question": "Has the correct Job Status been applied by the mobile user ?", "answer": "no" }, { "type": "yesnona", "createdAt": "2019-10-30T17:19:32+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:32+00:00", "orderId": 0, "question": "Will the job need to be reversed in MasterOffice ?", "answer": "yes" }, { "type": "text", "createdAt": "2019-10-30T17:19:32+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:32+00:00", "orderId": 0, "question": "If YES selected in previous question, what is the amount in £ that will need to be reversed ?", "answer": "0.00" }, { "type": "yesnona", "createdAt": "2019-10-30T17:19:32+00:00", "notes": null, "updatedAt": "2019-10-30T17:19:32+00:00", "orderId": 0, "question": "Will the job need to be confirmed as delivered in MasterOffice ?", "answer": "no" } ] } ], "mobile_user": "HUNTDewhurst", "audited_portal_user": null, "byPortalUser": "Lynn Ramsay", "total_score": 7, "percentage": 7000, "max_score": 10, "score_threshold": 0 } ], "job_links": [], "damage_sheets": [], "tracking_references": [ { "job_number": "B5232213-1", "tracking_reference": "CECCJ84B1HIGGJL4", "expiry_datetime": "2019-10-31T06:06:03+00:00" } ], "post_job_checks": [], "pre_job_checks": [], "photos": [], "job_invoices": [], "pre_job_details": [ { "invoice_number": null, "po_no": "TestPo" } ] }
Example curl request
curl "https://api.mymobileworkers.com:8181/api/1/jobs/job?api_key=TESTKEY&job_number=sss32"