{"openapi":"3.0.0","servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/Chasec98/86API/1.0.0"},{"url":"https://boh.86repairs.com/api/v2","description":"Production API"},{"url":"https://localhost:8081/api/v2","description":"Local API"}],"info":{"version":"1.0.0","title":"86 Repairs API"},"tags":[{"name":"requests"},{"name":"equipment"},{"name":"locations"},{"name":"people"}],"paths":{"/boh/person":{"get":{"tags":["people"],"summary":"get list of people (paginated)","parameters":[{"in":"query","name":"active","schema":{"type":"boolean"}},{"in":"query","name":"location","schema":{"type":"string"}}],"responses":{"200":{"description":"paginated list of people"},"500":{"description":"server error"}}}},"/boh/equipment":{"get":{"tags":["equipment"],"summary":"get list of requests (paginated)","parameters":[{"in":"query","name":"active","schema":{"type":"boolean"}},{"in":"query","name":"location","schema":{"type":"string"}}],"responses":{"200":{"description":"paginated list of equipment","content":{"application/json":{"schema":{"type":"object","properties":{"totalDocs":{"type":"number"},"limit":{"type":"number"},"hasPrevPage":{"type":"boolean"},"hasNextPage":{"type":"boolean"},"page":{"type":"number"},"totalPages":{"type":"number"},"offset":{"type":"number"},"prevPage":{"type":"number"},"nextPage":{"type":"number"},"pagingCounter":{"type":"number"},"docs":{"type":"array","items":{"$ref":"#/components/schemas/EquipmentResponse"}}}}}}}}},"post":{"tags":["equipment"],"summary":"create a new request","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentRequest"}}}},"responses":{"200":{"description":"request created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquipmentResponse"}}}},"500":{"description":"server error"},"400":{"description":"bad request"}}}},"/boh/request":{"get":{"tags":["requests"],"summary":"get list of requests (paginated)","responses":{"500":{"description":"server error"},"200":{"description":"paginated list of equipment","content":{"application/json":{"schema":{"type":"object","properties":{"totalDocs":{"type":"number"},"limit":{"type":"number"},"hasPrevPage":{"type":"boolean"},"hasNextPage":{"type":"boolean"},"page":{"type":"number"},"totalPages":{"type":"number"},"offset":{"type":"number"},"prevPage":{"type":"number"},"nextPage":{"type":"number"},"pagingCounter":{"type":"number"},"docs":{"type":"array","items":{"$ref":"#/components/schemas/RequestResponse"}}}}}}}}},"post":{"tags":["requests"],"summary":"create a new request","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestRequest"}}}},"responses":{"200":{"description":"request created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestResponse"}}}},"500":{"description":"server error"},"400":{"description":"bad request"}}}}},"components":{"schemas":{"PersonResponse":{"properties":{"name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"title":{"type":"string"},"active":{"type":"boolean"},"spending_limit":{"type":"string"},"rc_id":{"type":"string"},"location":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object"}]}},"customer":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object"}]}},"tags":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"object"}]}},"can_approve_overtime":{"type":"boolean"},"has_logged_in_before":{"type":"boolean"},"count_of_devices":{"type":"number"},"preferences":{"type":"array","items":{"type":"object"}}}},"EquipmentRequest":{"required":["location","description","equipment_type"],"properties":{"location":{"type":"string"},"description":{"type":"string"},"manufacturer_ref":{"type":"string"},"model_number":{"type":"string"},"serial_number":{"type":"string"},"equipment_type":{"type":"string"}}},"EquipmentResponse":{"properties":{"_id":{"type":"string"},"info":{"type":"string"},"active":{"type":"boolean"},"creation_date":{"type":"string","format":"date-time"},"customer":{"type":"string"},"location":{"type":"string"},"description":{"type":"string"},"relative_location":{"type":"string"},"equipment_type":{"oneOf":[{"type":"string"},{"type":"object"}]},"description_customer":{"type":"string"},"serial_number":{"type":"string"},"model_number":{"type":"string"},"manufacturer_ref":{"oneOf":[{"type":"string"},{"type":"object"}]},"manufacturer_model":{"oneOf":[{"type":"string"},{"type":"object"}]},"purchase_date":{"type":"string","format":"date-time"},"purchase_price":{"type":"number"},"install_date":{"type":"string","format":"date-time"},"not_under_warranty":{"type":"boolean"},"warranty_statuses":{"type":"array","items":{"type":"object","properties":{"covered":{"type":"boolean"},"last_checked":{"type":"string","format":"date-time"},"expiration_date":{"type":"string","format":"date-time"},"warranty_policy":{"oneOf":[{"type":"string"},{"type":"object"}]}}}},"warranty_check_completion":{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["does_not_exist","not_provided","missing_info","expired","successful"]}}},"is_infrastructure":{"type":"boolean"},"equipment_photos":{"type":"array","items":{"type":"object"}},"requests":{"type":"array","items":{"type":"object"}}}},"RequestRequest":{"properties":{"contacts":{"type":"array","items":{"type":"string"}},"priority":{"type":"string","enum":["Emergency","High","Low","Medium"]},"contact_method":{"type":"integer"},"equipment":{"type":"string"},"location":{"type":"string"}}},"RequestResponse":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"info":{"type":"string"},"request_type":{"type":"string","enum":["Incident","Preventative"]},"active":{"type":"boolean"},"location":{"type":"string"},"service_provider":{"type":"string"},"contacts":{"type":"array","items":{"type":"string"}},"requested_by":{"type":"string"},"priority":{"type":"string","enum":["Emergency","High","Low","Medium"]},"contact_method":{"type":"integer"},"ticket_number":{"type":"string"},"status":{"type":"string","enum":["Draft","Waiting on Customer","Waiting on Service Provider","Waiting on 86","Work Order Review","Completed","Standby"]},"stage":{"type":"string","enum":["Intake","Troubleshooting","Warranty Check","Quote","Dispatch","Reconcile Work","Resolution","Work Order Review"]},"status_last_changed":{"type":"string","format":"date-time"},"stage_last_changed":{"type":"string","format":"date-time"},"creation_date":{"type":"string","format":"date-time"},"is_project":{"type":"boolean"},"equipment":{"type":"string"},"infrastructure":{"type":"string"},"equipment_symptoms":{"type":"array","items":{"type":"string"}},"equipment_problems":{"type":"array","items":{"type":"string"}},"equipment_resolution":{"type":"array","items":{"type":"string"}},"customer_statement":{"type":"string"},"incident_description":{"type":"string"},"resolution_date":{"type":"string","format":"date-time"},"resolved_by":{"type":"string"},"was_first_time_fix":{"type":"boolean"},"completion":{"type":"string","format":"date-time"},"assignee":{"type":"string"},"warranty_check_performed":{"type":"boolean"},"is_under_warranty":{"type":"boolean"},"troubleshooting_performed":{"type":"boolean"},"attachments":{"type":"array","items":{"type":"string"}},"pm_schedule":{"type":"string"},"pm_schedules":{"type":"array","items":{"type":"string"}},"pm_notes":{"type":"string"},"service_window":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}}}}}}}