# Shiftwork API - My Job ###### tags: `api` ## API Specification ### Base Url https://fixzyapp.co --- ### My job list ``` GET /subwebsite/shiftwork/api/shiftwork_api_v100/my_job_list/format/json ``` #### Authorization (Header) - สำหรับช่าง ``` Bearer b89b0eb0f39e80730b81dea0ebc3276800cd02094936c59d02922eba40323766 ``` #### Perameter ``` my_job_status: "HAVE_NOT_CHOOSE"[HAVE_NOT_CHOOSE/CHOOSED/JOB_CLOSED] page: 1 ``` #### Response ##### Response - `Success 200` ##### Response example Example : Success ```json= { "data": { "list": [ { "job_id": "6429012a59a23c36134f3d19", "image": "https://s3-ap-southeast-1.amazonaws.com/fixzy/category/main_v5/160/ic_sub_01.png?1", "title": "ส้วมตัน ", "status_text": "สถานะ : รอลูกค้าตอบรับ", "status_color": "#FF8A00", "responsible_person": "ผู้ดูแล : nikky fixzy", "customer": "ผู้เรียก : นิกกี้ เก้าเมตร", "location": "สถานที่ : Bang Kapi Bangkok", "request_service_date": "สะดวกวันที่บริการ : ไม่ระบุวันที่" } ], "last_page": false,[true/false] "api_result": true } } ``` --- ### My job detail ``` GET /subwebsite/shiftwork/api/shiftwork_api_v100/my_job_detail/format/json ``` #### Authorization (Header) - สำหรับช่าง ``` Bearer b89b0eb0f39e80730b81dea0ebc3276800cd02094936c59d02922eba40323766 ``` #### Perameter ``` job_id: 6429012a59a23c36134f3d19 ``` #### Response ##### Response - `Success 200` ##### Response example Example : Success ```json= { "data": { "choosed_by_user": "(ลูกค้าเคยเลือกช่างแล้ว)", "credit": { "use": 0, "balance": 2257 }, "main_category": "ระบบน้ำ", "sub_category": "ปั๊มน้ำ", "status_text": "ลูกค้าปิดงาน", "status_color": "#F38324", "job_progress": [ { "title": "นัดวัน", "type": "APPOINTMENT", "status": true }, { "title": "เดินทาง", "type": "TRAVELING", "status": true }, { "title": "เริ่มงาน", "type": "JOB_START", "status": false }, { "title": "เสร็จงาน", "type": "JOB_FINISH", "status": true } ], "appointment_date": "22 พ.ค. 2566 15:00", "appointment_history": [ { "change_date": "6 พฤษภาคม 2023", "reason": "ลูกค้าขอเลื่อนนัด", "detail": "test change date", "new_appointment_date": "21-05-2023 | 13:00" }, { "change_date": "6 พฤษภาคม 2023", "reason": "ลูกค้าขอเลื่อนนัด", "detail": "test change date 2", "new_appointment_date": "22-05-2023 | 15:00" }, { "change_date": "6 พฤษภาคม 2023", "reason": "ลูกค้าขอเลื่อนนัด", "detail": "test change date 2", "new_appointment_date": "22-05-2023 | 15:00" } ], "job_code": "168040887267", "note": { "text": "", "can_edit": true }, "image_before_start_job": [ "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/6429012a59a23c36134f3d19/before-working-1683371014.jpg", "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/6429012a59a23c36134f3d19/before-working-1683371015.jpg", "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/6429012a59a23c36134f3d19/before-working-1683729751.jpg", "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/6429012a59a23c36134f3d19/before-working-1683729752.jpg", "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/6429012a59a23c36134f3d19/before-working-1683729860.jpg", "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/6429012a59a23c36134f3d19/before-working-1683729861.jpg", "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/6429012a59a23c36134f3d19/before-working-1683730019.jpg", "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/6429012a59a23c36134f3d19/before-working-1683730020.jpg" ], "quotation": { "price_estimate": "500", "site_inspection_price": "เข้าหน้างานฟรีครับ", "warranty": "3 months", "detail": "ติดต่อคุยรายละเอียดงานเพิ่มเติมทางโทรศัพท์ก่อนได้เลยครับ ขอบคุณครับ" }, "customer_name": "นิกกี้", "problem_detail": "เสียงดัง, น้ำรั่ว", "payment_channel": "-ชำระค่าบริการกับช่างโดยตรง (COD)", "place": "บ้าน", "contact_number": "0888888889", "optional_contact_number": null, "address": "1/1 tst test Chatuchak Bangkok 10900", "location": { "latitude": "13.8567648", "longitude": "100.5774513" }, "convenient_date": "31 พ.ค. 2566 00:00 13:00", "details": "test", "picture_attached": null, "warranty": "3 months", "close_job_date": "11 พ.ค. 2023 07:14", "wage": 800, "material_price": 3000, "house_no": "11/11", "property_name": "100 A", "user_rating": "5", "user_comment": "Good job", "fixman_comment": "test close jon api", "complete_code": "63153", "image_complete_job": [ "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/fixman/6429012a59a23c36134f3d19-fixman-0.jpg", "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/fixman/6429012a59a23c36134f3d19-fixman-1.jpg", "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/fixman/6429012a59a23c36134f3d19-fixman-1684124374.jpg", "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/fixman/6429012a59a23c36134f3d19-fixman-1684124375.jpg" ], "signature": "https://fixzy.s3-ap-southeast-1.amazonaws.com/request/signature/6429012a59a23c36134f3d19.jpg", "traveling_date": "6 พ.ค. 2023 16:20", "start_job_date": null, "have_complete_code": false, "master_data": { "appointment_reason": [ { "title": "งานเสร็จบางส่วน", "id": "5f2b79e79eecfe0c332e1b24" }, { "title": "งานมีปัญหาเข้าแก้ไข", "id": "5f2b7aa39eecfe0c332e3606" }, { "title": "รออะไหล่", "id": "5f2b7a2b9eecfe0c332e22e4" }, { "title": "ไม่สามารถติดต่อลูกค้าได้", "id": "5f4335e62651df6aec7ea7a2" }, { "title": "ลูกค้าขอเลื่อนนัด", "id": "5f4336082651df6aec7eaed3" }, { "title": "อื่นๆ", "id": "5f5af2b8bb9d27933f30d035" } ], "close_job_question": [ { "type": "dropdown", "key": "fixman_warranty", "title": "ระยะเวลาประกันงาน", "enable": true, "validate": [ { "type": "required", "regex": "", "error_message": "กรุณากรอกระยะเวลาประกันงาน" } ], "dropdown_1": [ { "id": "ไม่มี", "title": "ไม่มี" }, { "id": "1 วัน", "title": "1 วัน" }, { "id": "7 วัน", "title": "7 วัน" }, { "id": "1 เดือน", "title": "1 เดือน" }, { "id": "2 เดือน", "title": "2 เดือน" }, { "id": "3 เดือน", "title": "3 เดือน" }, { "id": "4 เดือน", "title": "4 เดือน" }, { "id": "6 เดือน", "title": "6 เดือน" }, { "id": "1 ปี", "title": "1 ปี" }, { "id": "2 ปี", "title": "2 ปี" } ] }, { "type": "number", "key": "key_wage", "title": "ค่าแรง", "enable": true, "validate": [ { "type": "required", "regex": "", "error_message": "กรุณากรอกค่าแรง" } ] }, { "type": "number", "key": "key_material", "title": "ราคาอุปกรณ์", "enable": true, "validate": [] }, { "type": "text", "key": "house_number", "title": "บ้านเลขที่", "enable": true, "validate": [] }, { "type": "text", "key": "project_name", "title": "ชื่อหมู่บ้าน", "enable": true, "validate": [] }, { "type": "text", "key": "comment", "title": "คุณคิดอย่างไรกับลูกค้า", "enable": true, "validate": [] }, { "type": "image", "key": "image", "title": "รูปปิดงาน", "enable": true, "image_path": "request/fixman/6429012a59a23c36134f3d19-fixman-", "maximum_upload": 5, "validate": [] } ] }, "api_result": true } } ``` --- ### My job save ``` POST /subwebsite/shiftwork/api/shiftwork_api_v100/my_job_detail/format/json ``` #### Authorization (Header) - สำหรับช่าง ``` Bearer b89b0eb0f39e80730b81dea0ebc3276800cd02094936c59d02922eba40323766 ``` #### Request Example [บันทึก]: ```json= { "job_id": "6429012a59a23c36134f3d19", "action": "save_note",["save_note"/"cancel"] "value": "note to save"[ส่งกับ acction "save_note"] } ``` Example [นัดหมาย]: ```json= { "job_id": "6429012a59a23c36134f3d19", "action": "save_appointment", "appointment_date": "2023-05-20", "appointment_time": "10:00" } ``` Example [เปลี่ยนนัดหมาย]: ```json= { "job_id": "6429012a59a23c36134f3d19", "action": "save_appointment", "appointment_reason_id": "5f4336082651df6aec7eaed3", "appointment_detail" : "ของไม่ครบ" "appointment_date": "2023-05-20", "appointment_time": "10:00" } ``` Example [เดินทาง]: ```json= { "job_id": "6429012a59a23c36134f3d19", "action": "traveling", "latitude": "13.1309870089", "longitude": "100.0886800" } ``` Example [เริ่มงาน]: ```json= { "job_id": "6429012a59a23c36134f3d19", "action": "start_job", "latitude": "13.1309870089", "longitude": "100.0886800" } ``` Example [ปิดงาน]: ```json= { "job_id": "6429012a59a23c36134f3d19", "action": "close_job", "fixman_complete_code": "CODE", "comment": "test close jon api", "house_number": "11/11", "project_name": "100 A", "fixman_warranty": "3 months", "key_wage": "800", "key_material": "3000", "latitude": "13.0988987654", "longitude": "100.0987654345"', } ``` #### Response ##### Response - `Success 200` ##### Response example Example : Success ```json= { "data": { "api_result": true } } ``` --- ### Upload image before start job ``` POST /subwebsite/shiftwork/api/shiftwork_api_v100/upload_image_before_start_job/format/json ``` #### Authorization (Header) - สำหรับช่าง ``` Bearer b89b0eb0f39e80730b81dea0ebc3276800cd02094936c59d02922eba40323766 ``` #### Request Example [รูปก่อนเริ่มงาน]: ```json= { "job_id": "6429012a59a23c36134f3d19", "file": [image_file_1, image_file_2] } ``` #### Response ##### Response - `Success 200` ##### Response example Example : Success ```json= { "data": { "api_result": true } } ``` --- ### Upload image complete job ``` POST /subwebsite/shiftwork/api/shiftwork_api_v100/upload_image_complete_job/format/json ``` #### Authorization (Header) - สำหรับช่าง ``` Bearer b89b0eb0f39e80730b81dea0ebc3276800cd02094936c59d02922eba40323766 ``` #### Request Example [รูปเสร็จงาน]: ```json= { "job_id": "6429012a59a23c36134f3d19", "file": [image_file_1, image_file_2] } ``` #### Response ##### Response - `Success 200` ##### Response example Example : Success ```json= { "data": { "api_result": true } } ``` --- ### Upload image signature ``` POST /subwebsite/shiftwork/api/shiftwork_api_v100/upload_image_signature/format/json ``` #### Authorization (Header) - สำหรับช่าง ``` Bearer b89b0eb0f39e80730b81dea0ebc3276800cd02094936c59d02922eba40323766 ``` #### Request Example [รูปลายเซ็น]: ```json= { "job_id": "6429012a59a23c36134f3d19", "file": image_file_1 } ``` #### Response ##### Response - `Success 200` ##### Response example Example : Success ```json= { "data": { "api_result": true } } ``` --- ### Update tax invoice ``` POST /subwebsite/shiftwork/api/shiftwork_api_v100/update_tax_invoice/format/json ``` #### Authorization (Header) - สำหรับช่าง ``` Bearer b89b0eb0f39e80730b81dea0ebc3276800cd02094936c59d02922eba40323766 ``` #### Request Example : ```json= { "tax_type": "company",[compayny/individual] "tax_branch": "00000", "tax_id": "1234567890098", "tax_firstname": "fname", "tax_lastname": "lname", "tax_company_name": "company name", "tax_address": "1/3 313", "tax_province": "558d06e8ea228663008b65a1", "tax_district": "558d06e9ea228663008b67bd", "tax_parish": "558d06f3ea228663008b7992", "tax_post_code": "54321", "tax_delivery_from": "current_address",[invoice_address/current_address/other] "tax_branch": "00000", "tax_delivery_address": "1/4 delivery", "tax_delivery_province": "558d06e8ea228663008b65a1", "tax_delivery_district": "558d06e9ea228663008b67bd", "tax_delivery_parish": "558d06f3ea228663008b7992", "tax_delivery_post_code": "54321"' } ``` #### Response ##### Response - `Success 200` ##### Response example Example : Success ```json= { "data": { "tax_invoice_address": "1/3 313 ขุนยวม แม่ฮ่องสอน 54321", "api_result": true } } ``` --- ### Upload slip ``` GET /subwebsite/shiftwork/api/shiftwork_api_v100/upload_slip/format/json ``` #### Authorization (Header) - สำหรับช่าง ``` Bearer b89b0eb0f39e80730b81dea0ebc3276800cd02094936c59d02922eba40323766 ``` #### Response ##### Response - `Success 200` ##### Response example Example : Success ```json= { "data": { "bank_list": [ { "title": "GSB | ธนาคารออมสิน", "id": "5892ce29b168e32c14000039" }, { "title": "SCB | ธนาคารไทยพาณิชย์", "id": "5892ce29b168e32c1400002f" }, { "title": "BBL | ธนาคารกรุงเทพ", "id": "590081a79e0464e39e66db06" }, { "title": "TISCO | ธนาคารทิสโก้", "id": "5892ce29b168e32c1400002e" }, { "title": "KBANK | ธนาคารกสิกรไทย", "id": "5892ce29b168e32c1400002a" }, { "title": "HSBC | ธนาคาร HSBC", "id": "5b9b4229d0dfc47751f6ea33" }, { "title": "KTB | ธนาคารกรุงไทย", "id": "5892ce29b168e32c14000035" }, { "title": "BAY | ธนาคารกรุงศรีอยุธยา", "id": "5892ce29b168e32c14000029" }, { "title": "Other | อื่นๆ", "id": "5c6a75ad4d7021c78157653c" }, { "title": "SCBT | ธนาคารสแตนดาร์ดชาร์เตอร์ด(ไทย)", "id": "5892ce29b168e32c14000034" }, { "title": "CIMB | ธนาคารซีไอเอ็มบีไทย", "id": "5892ce29b168e32c1400002c" }, { "title": "GHB | ธนาคารอาคารสงเคราะห์", "id": "5892ce29b168e32c1400003a" }, { "title": "LH BANK | ธนาคารแลนด์ แอนด์ เฮาส์", "id": "5892ce29b168e32c14000033" }, { "title": "KNK | ธนาคารเกียรตินาคิน", "id": "5892ce29b168e32c1400002b" }, { "title": "TMB | ธนาคารทหารไทย", "id": "5892ce29b168e32c1400002d" }, { "title": "TBANK | ธนาคารธนชาต", "id": "5892ce29b168e32c14000031" }, { "title": "UOB | ธนาคารยูโอบี", "id": "5892ce29b168e32c14000032" }, { "title": "TTB | ทหารไทยธนชาต", "id": "61d4267cfcff0ab823785dbe" } ], "package_list": [ { "title": "Fixzy Gold รับงานฟรีไม่เสียเครดิต 3,531.00 บาท", "price": 3531, "id": "645779b820584b554e2ba1e5" }, { "title": "Fixzy Police Checked ตรวจประวัติ 749.00 บาท", "price": 749, "id": "6457792220584b554e2ba09e" }, { "title": "เติมเครดิต 250 เครดิต 267.50 บาท", "price": 267.5, "id": "5729af8d0f40d2a2ca05efcf" }, { "title": "เติมเครดิต 500 เครดิต 535.00 บาท", "price": 535, "id": "5729af8d0f40d2a2ca05efd0" }, { "title": "เติมเครดิต 750 เครดิต 802.50 บาท", "price": 802.5, "id": "5af56849b26b3b0a05b12529" }, { "title": "เติมเครดิต 900 เครดิต (แถมฟรี!! ตรวจประวัติ) 963.00 บาท", "price": 963, "id": "6406f81b78c469deb273d720" }, { "title": "เติมเครดิต 1500 เครดิต (แถมฟรี!! ตรวจประวัติ) 1,605.00 บาท", "price": 1605, "id": "63f34db031e51b9a9521206e" }, { "title": "เติมเครดิต 1750 เครดิต (แถมฟรี!! ตรวจประวัติ) 1,872.50 บาท", "price": 1872.5, "id": "63f34dd331e51b9a9521210b" }, { "title": "เติมเครดิต 2000 เครดิต (แถมฟรี!! ตรวจประวัติ) 2,140.00 บาท", "price": 2140, "id": "63f34e0231e51b9a95212139" }, { "title": "เงินประกัน", "price": 0, "id": "5e8eec90e03a9dc6b7f78c48" }, { "title": "เสื้อยืด 1ตัว พร้อมค่าส่ง 225.00 บาท", "price": 225, "id": "63440c8f367708d636b7318f" }, { "title": "เสื้อช็อป 1ตัว พร้อมค่าส่ง 595.00 บาท", "price": 595, "id": "63440e55367708d636b7382a" }, { "title": "เสื้อช็อป 1ตัว เสื้อยืด 1ตัว พร้อมค่าส่ง 770.00 บาท", "price": 770, "id": "63440ed6367708d636b73cea" }, { "title": "เสื้อยืด 1ตัว มารับเอง 165.00 บาท", "price": 165, "id": "63440ffa367708d636b74161" }, { "title": "เสื้อช็อป 1ตัว มารับเอง 535.00 บาท", "price": 535, "id": "6344108d367708d636b7433d" } ], "api_result": true } } ``` --- ### Upload slip ``` POST /subwebsite/shiftwork/api/shiftwork_api_v100/upload_slip/format/json ``` #### Authorization (Header) - สำหรับช่าง ``` Bearer b89b0eb0f39e80730b81dea0ebc3276800cd02094936c59d02922eba40323766 ``` #### Request Example : ```json= { "transfer_date": "2023-05-12", "transfer_time": "12:43", "bank_id": "5892ce29b168e32c1400002c", "transfer_amount": "1872.5", "package_id": "63f34dd331e51b9a9521210b", "request_tax_invoice": "1", "file": image_file } ``` #### Response ##### Response - `Success 200` ##### Response example Example : Success ```json= { "data": { "api_result": true } } ``` --- ### Upload image slip ``` POST /subwebsite/shiftwork/api/shiftwork_api_v100/upload_image_slip/format/json ``` #### Authorization (Header) - สำหรับช่าง ``` Bearer b89b0eb0f39e80730b81dea0ebc3276800cd02094936c59d02922eba40323766 ``` #### Request Example : ```json= { "file": image_file } ``` #### Response ##### Response - `Success 200` ##### Response example Example : Success ```json= { "data": { "slip_name": "55b07f9a1c0ee963008b456a-1684370669.png", [ชื่อรูปใช้ ส่งตอนกด ส่งข้อมูล slip] "api_result": true } } ```