{"openapi":"3.0.0","info":{"description":"This is a simple API","version":"1.0.0-oas3","title":"API","contact":{"email":"m626556@gmail.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"paths":{"/trackers":{"get":{"tags":["Trackers"],"summary":"searches (filter) trailer or get all trackers","operationId":"searchTrackers","description":"By passing the trailer id or get all trackers for login account\n","parameters":[{"name":"trackerId[$like]","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"search results matching criteria","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Sensor_trackers_response"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authroized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trackers/activation":{"post":{"tags":["Trackers"],"summary":"adds an inventory item","operationId":"addtrailers","description":"Add trailers to DB if has valid trailer number.","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Sensor_trackers_active"}}}}},"responses":{"201":{"description":"created successful","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Sensor_trackers"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authroized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trackers/{trackerId}":{"patch":{"security":[{"bearerAuth":[]}],"tags":["Trackers"],"summary":"Edit trailer name","operationId":"editTrailer","description":"Edit trailer name","parameters":[{"name":"trackerId","in":"path","description":"trackerId","required":true,"schema":{"type":"integer"}},{"name":"version","in":"path","description":"version","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"trailerName":{"type":"string"}}}}}},"responses":{"200":{"description":"trailer name updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response_info"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authroized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trackers/tracking-updates":{"post":{"security":[{"bearerAuth":[]}],"tags":["Trackers"],"description":"this endpoint will be used for batch which is going to request many times","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/response_info"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not Authroized Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"servers":[{"url":"https://virtserver.swaggerhub.com/AboSaleem/Sonsor/1.0.0"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Error":{"type":"object","properties":{"errorCode":{"type":"string"},"message":{"type":"string"},"extraData":{"type":"object","properties":{"customFields":{"type":"string"}},"example":{}}}},"Sensor_trackers_active":{"type":"object","required":["trackerId"],"properties":{"trackerId":{"type":"number"},"trailerName":{"type":"string"}}},"Sensor_trackers":{"type":"object","required":["trackerId"],"properties":{"trackerId":{"type":"number"},"trailerName":{"type":"string"},"version":{"type":"string"},"response_info":{"$ref":"#/components/schemas/response_info"}}},"response_info":{"type":"object","properties":{"message":{"type":"string"},"message_type":{"type":"string"},"extra_data":{"type":"object"},"message_code":{"type":"string"}}},"Sensor_trackers_response":{"type":"object","required":["trackerId"],"properties":{"tracker_id":{"type":"number"},"id":{"type":"number"},"trailer_name":{"type":"string"},"speed":{"type":"number"},"status":{"type":"string"},"movement_alarm":{"type":"string"},"vibration_alarm":{"type":"string"},"speeding_alarm":{"type":"string"},"vehicle_milage":{"type":"string"},"country":{"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"postCode":{"type":"string"},"street_one":{"type":"string"},"street_two":{"type":"string"},"lat":{"type":"string"},"long":{"type":"string"},"last_updated":{"type":"string"},"response_info":{"$ref":"#/components/schemas/response_info"}}}}},"security":[{"bearerAuth":[]}]}