{"openapi":"3.0.3","info":{"title":"API 3rd Party - EV Charging","description":"API di integrazione esposte da Entervo","version":"1.0.0"},"tags":[{"name":"RemoteStartTransaction","description":"Start a Transaticion"},{"name":"RemoteStopTransaction","description":"Stop a Transaction"},{"name":"Availability","description":"check availability of charger"},{"name":"StoreTransaction","description":"Store Transaction in entervo reporting"}],"paths":{"/RemoteStartTransaction":{"post":{"security":[{"basicAuthorization":[]}],"tags":["RemoteStartTransaction"],"description":"Remote Start Transaction Request","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteStartTransactionRequest"},"examples":{"Request Body":{"value":{"chargerId":1}}}}}},"responses":{"401":{"description":"Username | password not correct","headers":{"WWW_Authenticate":{"schema":{"type":"string"}}}},"404":{"description":"Device not recognized or Busy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteStartTransactionResponse"},"examples":{"Device not recognized or Busy":{"value":{"errorCode":"KO","errorMessage":"Device not recognized or Busy","idTransction":null}}}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteStartTransactionResponse"},"examples":{"Internal Error":{"value":{"errorCode":"KO","errorMessage":"Internal Error","idTransction":null}}}}}},"200":{"description":"The Charging is starting correctly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteStartTransactionResponse"},"examples":{"Success":{"value":{"errorCode":"OK","errorMessage":"Success","idTransction":123456789}}}}}}}}},"/RemoteStopTransaction":{"post":{"security":[{"basicAuthorization":[]}],"tags":["RemoteStopTransaction"],"description":"Remote Stop Transaction Request","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteStopTransactionRequest"},"examples":{"Request Body":{"value":{"chargerId":1,"idTransction":123456789}}}}}},"responses":{"401":{"description":"Username | password not correct","headers":{"WWW_Authenticate":{"schema":{"type":"string"}}}},"400":{"description":"Device not recognized or Busy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteStopTransactionResponse"},"examples":{"Device not recognized or Busy":{"value":{"errorCode":"KO","errorMessage":"Device not recognized or Busy","idTransction":null,"PowerConsumption":null,"ChargingDuration":null}}}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteStopTransactionResponse"},"examples":{"Internal error":{"value":{"errorCode":"KO","errorMessage":"Internal error","idTransction":null,"PowerConsumption":null,"ChargingDuration":null}}}}}},"200":{"description":"The Charging is starting correctly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteStopTransactionResponse"},"examples":{"Success":{"value":{"errorCode":"OK","errorMessage":"Success","idTransction":123456789,"PowerConsumption":"100","ChargingDuration":"02:50:05"}}}}}}}}},"/Availability":{"get":{"security":[{"basicAuthorization":[]}],"tags":["Availability"],"parameters":[{"in":"query","name":"locationId","required":true,"schema":{"$ref":"#/components/schemas/AvailabilityRequest"},"description":"it can be \"FCO\" or \"CIA\"\n"}],"responses":{"200":{"description":"list of device status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityResponse"},"examples":{"Success":{"value":{"errorCode":"OK","errorMessage":"Success","devices":{"chargerId":"1","locationId":"FCO","status":"true"}}}}}}},"401":{"description":"Username | password not correct","headers":{"WWW_Authenticate":{"schema":{"type":"string"}}}},"400":{"description":"Device not recognized or Busy","content":{"application/json":{"schema":{"type":"object","properties":{"errorCode":{"type":"string"},"errorMessage":{"type":"string"}},"required":["errorCode","errorMessage"]},"examples":{"Location not found":{"value":{"errorCode":"KO","errorMessage":"Location not found"}}}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"type":"object","properties":{"errorCode":{"type":"string"},"errorMessage":{"type":"string"}},"required":["errorCode","errorMessage"]},"examples":{"Internal Error":{"value":{"errorCode":"KO","errorMessage":"An internal error has occurred"}}}}}}}}},"/StoreTransaction":{"post":{"security":[{"basicAuthorization":[]}],"tags":["StoreTransaction"],"description":"Store Transaction Request in entervo","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreTransactionRequest"},"examples":{"Store Transaction":{"value":{"idTransction":123456789,"Name":"Flo","Surname":"Derv","LicensePlate":"SBMG4711","Price":"1550"}}}}}},"responses":{"401":{"description":"Username | password not correct","headers":{"WWW_Authenticate":{"schema":{"type":"string"}}}},"400":{"description":"Device not recognized or Busy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreTransactionResponse"},"examples":{"Transaction not found":{"value":{"errorCode":"KO","errorMessage":"Transaction not found"}}}}}},"500":{"description":"Internal Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreTransactionResponse"},"examples":{"Internal Error":{"value":{"errorCode":"KO","errorMessage":"An internal error has occurred"}}}}}},"200":{"description":"The Charging is starting correctly","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreTransactionResponse"},"examples":{"Remote StartT ransaction":{"value":{"errorCode":"OK","errorMessage":""}}}}}}}}}},"components":{"securitySchemes":{"basicAuthorization":{"type":"http","scheme":"basic"}},"responses":{"AuthError":{"description":"Username | password not correct","headers":{"WWW_Authenticate":{"schema":{"type":"string"}}}}},"schemas":{"RemoteStartTransactionRequest":{"type":"object","properties":{"chargerId":{"type":"integer","format":"int32"}},"required":["chargerId"]},"RemoteStartTransactionResponse":{"type":"object","properties":{"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"idTransction":{"type":"integer"}},"required":["errorCode"]},"RemoteStopTransactionRequest":{"type":"object","properties":{"chargerId":{"type":"integer","format":"int32"},"idTransction":{"type":"integer","format":"int32"}},"required":["chargerId","idTransction"]},"RemoteStopTransactionResponse":{"type":"object","properties":{"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"idTransction":{"type":"integer"},"PowerConsumption":{"type":"string"},"ChargingDuration":{"type":"string","format":"date-time  hh:mm:ss"}},"required":["errorCode","idTransction","PowerConsumption","ChargingDuration"]},"AvailabilityRequest":{"type":"string","properties":{"locationId":{"type":"string"}},"required":["locationId"]},"AvailabilityResponse":{"properties":{"errorCode":{"type":"string"},"errorMessage":{"type":"string"},"devices":{"$ref":"#/components/schemas/Device"}},"required":["errorCode","devices"]},"Device":{"type":"array","items":{"type":"object","properties":{"chargerId":{"type":"integer"},"locationId":{"type":"string"},"status":{"type":"string"}},"required":["chargerId","locationId","status"]}},"StoreTransactionRequest":{"type":"object","properties":{"idTransction":{"type":"integer"},"Name":{"type":"string"},"Surname":{"type":"string"},"LicensePlate":{"type":"string"},"Price":{"type":"string"}},"required":["idTransction","Price"]},"StoreTransactionResponse":{"properties":{"errorCode":{"type":"string"},"errorMessage":{"type":"string"}},"required":["errorCode"]}}},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/HEDFIRAMI/3rdpartyOCPPApi/1.0.0"}]}