openapi: 3.2.0 info: title: Gridx Ai Emobility Time Of Use API version: 2.0.0 contact: name: gridX url: https://www.gridx.ai/module/api email: developer-community@gridx.de license: name: All rights reserved. url: https://www.gridx.ai/ x-api-id: ba9d6a25-ae1a-4ac8-af7a-70b76db17021 x-audience: public-external description: 'Operations tagged emobility-time-of-use across 2 of this provider''s published API definitions: gridx-api.json, gridx-ai-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.gridx.de description: Production tags: - name: emobility-time-of-use description: Manages the Time of Use implementation for eMobility. x-displayName: emobility-time-of-use paths: /systems/{systemID}/emobility/timeofuse: get: operationId: getEmobilityTimeOfUseSettings summary: Return the eMobility time-of-use settings for the specified system description: Returns the settings. parameters: - name: systemID description: 'Unique identifier used to access a system. ' in: path required: true schema: type: string format: uuid example: aa3e5a93-bb38-4b15-b7f2-af40daf3a1dc x-badges: - label: draft color: red tags: - emobility-time-of-use responses: '200': description: 'Response body for the time-of-use settings for a system. ' content: application/json: schema: description: 'All options available to set the eMobility ToU settings. ' type: object properties: enabled: type: boolean example: true energy: description: 'Minimum amount of energy that should be transferred per charging session and the minimum duration the EV will remain connected, allowing for flexibility in the use of energy. ' type: object properties: minEnergy: type: integer minimum: 0 description: 'Minimum energy required to charge in Wh during the minimum duration. ' minDuration: type: string format: duration description: 'Minimum duration vehicles are expected to be parked to charge the minimum energy, e.g. ''4h30m'' or just ''30m''. Note that this must be compatible to the Golang duration format, not RFC3339. ' required: - minEnergy - minDuration x-readme-ref-name: EnergyGuarantee tariff: description: 'Describes the time-window during the day to consider for tariff optimization as well as the percentile to consider low prices for. `parkedUntil` must be strictly after `parkedFrom`; overnight parking periods spanning midnight are not supported and are rejected with an HTTP 400. ' type: object properties: parkedFrom: description: A 24-hour wall-clock time of the day, with leading zeros. type: string pattern: ^\d{2}:\d{2}$ example: '16:15' x-readme-ref-name: TimeOfDay parkedUntil: description: A 24-hour wall-clock time of the day, with leading zeros. type: string pattern: ^\d{2}:\d{2}$ example: '16:15' x-readme-ref-name: TimeOfDay percentile: type: number minimum: 0 maximum: 100 description: 'Percentile for the price threshold between 0 and 100 in percent. E.g. for 30 all vehicles will charge in the cheapest 30% of the considered hours. ' example: 30 required: - parkedFrom - parkedUntil - percentile x-readme-ref-name: OptimizationParameters required: - enabled - energy - tariff x-readme-ref-name: EMobilityTimeOfUseSettings '400': description: Malformed request. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ClientError - Bad Request description: 'Bad Request indicates that the request body is not a valid JSON or it contains a invalid json type. ' example: message: Problems parsing JSON x-readme-ref-name: BadRequestException '403': description: Forbidden. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: UnauthorizedError - Forbidden Error description: Forbidden Error example: message: Bad credentials x-readme-ref-name: ForbiddenException '404': description: Requested entity not found. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ClientError - Not Found description: Not Found indicates that the entity was not found. example: message: Not Found x-readme-ref-name: NotFoundException '500': description: There has been an internal error on our side. We're looking into it. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ServerSideError - Internal Server Error description: Internal Server Error example: message: Internal Server Error x-readme-ref-name: InternalException x-code-samples: - lang: python label: Python source: 'import requests url = "https://api.gridx.de/systems/systemID/emobility/timeofuse" headers = {"accept": "application/json"} response = requests.get(url, headers=headers) print(response.text)' - lang: shell label: Shell source: "curl --request GET \\\n --url https://api.gridx.de/systems/systemID/emobility/timeofuse \\\n --header 'accept: application/json'" - lang: go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.gridx.de/systems/systemID/emobility/timeofuse\"\n\n\treq, _ := http.NewRequest(\"GET\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}" - lang: javascript label: Javascript source: "const options = {method: 'GET', headers: {accept: 'application/json'}};\n\nfetch('https://api.gridx.de/systems/systemID/emobility/timeofuse', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));" - lang: java label: Java source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.gridx.de/systems/systemID/emobility/timeofuse\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();" - lang: java label: Kotlin source: "val client = OkHttpClient()\n\nval request = Request.Builder()\n .url(\"https://api.gridx.de/systems/systemID/emobility/timeofuse\")\n .get()\n .addHeader(\"accept\", \"application/json\")\n .build()\n\nval response = client.newCall(request).execute()" - lang: javascript label: Swift source: 'import Foundation let url = URL(string: "https://api.gridx.de/systems/systemID/emobility/timeofuse")! var request = URLRequest(url: url) request.httpMethod = "GET" request.timeoutInterval = 10 request.allHTTPHeaderFields = ["accept": "application/json"] let (data, _) = try await URLSession.shared.data(for: request) print(String(decoding: data, as: UTF8.self))' - lang: csharp label: C# source: 'using RestSharp; var options = new RestClientOptions("https://api.gridx.de/systems/systemID/emobility/timeofuse"); var client = new RestClient(options); var request = new RestRequest(""); request.AddHeader("accept", "application/json"); var response = await client.GetAsync(request); Console.WriteLine("{0}", response.Content); ' post: operationId: postEmobilityTimeOfUseSettings summary: Create eMobility time-of-use settings for the specified system description: Set or update the time-of-use settings for this system. parameters: - name: systemID description: 'Unique identifier used to access a system. ' in: path required: true schema: type: string format: uuid example: aa3e5a93-bb38-4b15-b7f2-af40daf3a1dc requestBody: required: true description: 'A request to configure the time-of-use settings for a system. Note that the minimum duration must be compatible to the Golang duration format, e.g. ''4h30m'' or just ''30m''. ' content: application/json: schema: description: 'All options available to set the eMobility ToU settings. ' type: object properties: enabled: type: boolean example: true energy: description: 'Minimum amount of energy that should be transferred per charging session and the minimum duration the EV will remain connected, allowing for flexibility in the use of energy. ' type: object properties: minEnergy: type: integer minimum: 0 description: 'Minimum energy required to charge in Wh during the minimum duration. ' minDuration: type: string format: duration description: 'Minimum duration vehicles are expected to be parked to charge the minimum energy, e.g. ''4h30m'' or just ''30m''. Note that this must be compatible to the Golang duration format, not RFC3339. ' required: - minEnergy - minDuration x-readme-ref-name: EnergyGuarantee tariff: description: 'Describes the time-window during the day to consider for tariff optimization as well as the percentile to consider low prices for. `parkedUntil` must be strictly after `parkedFrom`; overnight parking periods spanning midnight are not supported and are rejected with an HTTP 400. ' type: object properties: parkedFrom: description: A 24-hour wall-clock time of the day, with leading zeros. type: string pattern: ^\d{2}:\d{2}$ example: '16:15' x-readme-ref-name: TimeOfDay parkedUntil: description: A 24-hour wall-clock time of the day, with leading zeros. type: string pattern: ^\d{2}:\d{2}$ example: '16:15' x-readme-ref-name: TimeOfDay percentile: type: number minimum: 0 maximum: 100 description: 'Percentile for the price threshold between 0 and 100 in percent. E.g. for 30 all vehicles will charge in the cheapest 30% of the considered hours. ' example: 30 required: - parkedFrom - parkedUntil - percentile x-readme-ref-name: OptimizationParameters required: - enabled - energy - tariff x-readme-ref-name: EMobilityTimeOfUseSettings example: enabled: true energy: minEnergy: 12000 minDuration: P9Y9M9DT9H9M9S tariff: parkedFrom: 08:00 parkedUntil: '16:00' percentile: 30 x-badges: - label: draft color: red tags: - emobility-time-of-use responses: '200': description: 'Response body for the time-of-use settings for a system. ' content: application/json: schema: description: 'All options available to set the eMobility ToU settings. ' type: object properties: enabled: type: boolean example: true energy: description: 'Minimum amount of energy that should be transferred per charging session and the minimum duration the EV will remain connected, allowing for flexibility in the use of energy. ' type: object properties: minEnergy: type: integer minimum: 0 description: 'Minimum energy required to charge in Wh during the minimum duration. ' minDuration: type: string format: duration description: 'Minimum duration vehicles are expected to be parked to charge the minimum energy, e.g. ''4h30m'' or just ''30m''. Note that this must be compatible to the Golang duration format, not RFC3339. ' required: - minEnergy - minDuration x-readme-ref-name: EnergyGuarantee tariff: description: 'Describes the time-window during the day to consider for tariff optimization as well as the percentile to consider low prices for. `parkedUntil` must be strictly after `parkedFrom`; overnight parking periods spanning midnight are not supported and are rejected with an HTTP 400. ' type: object properties: parkedFrom: description: A 24-hour wall-clock time of the day, with leading zeros. type: string pattern: ^\d{2}:\d{2}$ example: '16:15' x-readme-ref-name: TimeOfDay parkedUntil: description: A 24-hour wall-clock time of the day, with leading zeros. type: string pattern: ^\d{2}:\d{2}$ example: '16:15' x-readme-ref-name: TimeOfDay percentile: type: number minimum: 0 maximum: 100 description: 'Percentile for the price threshold between 0 and 100 in percent. E.g. for 30 all vehicles will charge in the cheapest 30% of the considered hours. ' example: 30 required: - parkedFrom - parkedUntil - percentile x-readme-ref-name: OptimizationParameters required: - enabled - energy - tariff x-readme-ref-name: EMobilityTimeOfUseSettings '400': description: Malformed request. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ClientError - Bad Request description: 'Bad Request indicates that the request body is not a valid JSON or it contains a invalid json type. ' example: message: Problems parsing JSON x-readme-ref-name: BadRequestException '403': description: Forbidden. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: UnauthorizedError - Forbidden Error description: Forbidden Error example: message: Bad credentials x-readme-ref-name: ForbiddenException '404': description: Requested entity not found. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ClientError - Not Found description: Not Found indicates that the entity was not found. example: message: Not Found x-readme-ref-name: NotFoundException '500': description: There has been an internal error on our side. We're looking into it. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ServerSideError - Internal Server Error description: Internal Server Error example: message: Internal Server Error x-readme-ref-name: InternalException x-code-samples: - lang: python label: Python source: "import requests\n\nurl = \"https://api.gridx.de/systems/systemID/emobility/timeofuse\"\n\npayload = {\n \"enabled\": True,\n \"energy\": {\n \"minEnergy\": 12000,\n \"minDuration\": \"P9Y9M9DT9H9M9S\"\n },\n \"tariff\": {\n \"parkedFrom\": \"08:00\",\n \"parkedUntil\": \"16:00\",\n \"percentile\": 30\n }\n}\nheaders = {\n \"accept\": \"application/json\",\n \"content-type\": \"application/json\"\n}\n\nresponse = requests.post(url, json=payload, headers=headers)\n\nprint(response.text)" - lang: shell label: Shell source: "curl --request POST \\\n --url https://api.gridx.de/systems/systemID/emobility/timeofuse \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --data '\n{\n \"enabled\": true,\n \"energy\": {\n \"minEnergy\": 12000,\n \"minDuration\": \"P9Y9M9DT9H9M9S\"\n },\n \"tariff\": {\n \"parkedFrom\": \"08:00\",\n \"parkedUntil\": \"16:00\",\n \"percentile\": 30\n }\n}\n'" - lang: go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.gridx.de/systems/systemID/emobility/timeofuse\"\n\n\tpayload := strings.NewReader(\"{\\\"enabled\\\":true,\\\"energy\\\":{\\\"minEnergy\\\":12000,\\\"minDuration\\\":\\\"P9Y9M9DT9H9M9S\\\"},\\\"tariff\\\":{\\\"parkedFrom\\\":\\\"08:00\\\",\\\"parkedUntil\\\":\\\"16:00\\\",\\\"percentile\\\":30}}\")\n\n\treq, _ := http.NewRequest(\"POST\", url, payload)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}" - lang: javascript label: Javascript source: "const options = {\n method: 'POST',\n headers: {accept: 'application/json', 'content-type': 'application/json'},\n body: JSON.stringify({\n enabled: true,\n energy: {minEnergy: 12000, minDuration: 'P9Y9M9DT9H9M9S'},\n tariff: {parkedFrom: '08:00', parkedUntil: '16:00', percentile: 30}\n })\n};\n\nfetch('https://api.gridx.de/systems/systemID/emobility/timeofuse', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));" - lang: java label: Java source: "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"enabled\\\":true,\\\"energy\\\":{\\\"minEnergy\\\":12000,\\\"minDuration\\\":\\\"P9Y9M9DT9H9M9S\\\"},\\\"tariff\\\":{\\\"parkedFrom\\\":\\\"08:00\\\",\\\"parkedUntil\\\":\\\"16:00\\\",\\\"percentile\\\":30}}\");\nRequest request = new Request.Builder()\n .url(\"https://api.gridx.de/systems/systemID/emobility/timeofuse\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();" - lang: java label: Kotlin source: "val client = OkHttpClient()\n\nval mediaType = MediaType.parse(\"application/json\")\nval body = RequestBody.create(mediaType, \"{\\\"enabled\\\":true,\\\"energy\\\":{\\\"minEnergy\\\":12000,\\\"minDuration\\\":\\\"P9Y9M9DT9H9M9S\\\"},\\\"tariff\\\":{\\\"parkedFrom\\\":\\\"08:00\\\",\\\"parkedUntil\\\":\\\"16:00\\\",\\\"percentile\\\":30}}\")\nval request = Request.Builder()\n .url(\"https://api.gridx.de/systems/systemID/emobility/timeofuse\")\n .post(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .build()\n\nval response = client.newCall(request).execute()" - lang: javascript label: Swift source: "import Foundation\n\nlet parameters = [\n \"enabled\": true,\n \"energy\": [\n \"minEnergy\": 12000,\n \"minDuration\": \"P9Y9M9DT9H9M9S\"\n ],\n \"tariff\": [\n \"parkedFrom\": \"08:00\",\n \"parkedUntil\": \"16:00\",\n \"percentile\": 30\n ]\n] as [String : Any?]\n\nlet postData = try JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet url = URL(string: \"https://api.gridx.de/systems/systemID/emobility/timeofuse\")!\nvar request = URLRequest(url: url)\nrequest.httpMethod = \"POST\"\nrequest.timeoutInterval = 10\nrequest.allHTTPHeaderFields = [\n \"accept\": \"application/json\",\n \"content-type\": \"application/json\"\n]\nrequest.httpBody = postData\n\nlet (data, _) = try await URLSession.shared.data(for: request)\nprint(String(decoding: data, as: UTF8.self))" - lang: csharp label: C# source: 'using RestSharp; var options = new RestClientOptions("https://api.gridx.de/systems/systemID/emobility/timeofuse"); var client = new RestClient(options); var request = new RestRequest(""); request.AddHeader("accept", "application/json"); request.AddJsonBody("{\"enabled\":true,\"energy\":{\"minEnergy\":12000,\"minDuration\":\"P9Y9M9DT9H9M9S\"},\"tariff\":{\"parkedFrom\":\"08:00\",\"parkedUntil\":\"16:00\",\"percentile\":30}}", false); var response = await client.PostAsync(request); Console.WriteLine("{0}", response.Content); ' patch: operationId: patchEmobilityTimeOfUseSettings summary: Update eMobility time-of-use settings for the specified system description: Apply partial updates to the time-of-use settings for this system. parameters: - name: systemID description: 'Unique identifier used to access a system. ' in: path required: true schema: type: string format: uuid example: aa3e5a93-bb38-4b15-b7f2-af40daf3a1dc requestBody: required: true description: 'A request to configure the time-of-use settings for a system. Note that the minimum duration must be compatible to the Golang duration format, e.g. ''4h30m'' or just ''30m''. ' content: application/json: schema: description: 'Update options for the eMobility ToU settings. ' type: object properties: enabled: type: boolean example: true energy: description: 'Minimum amount of energy that should be transferred per charging session and the minimum duration the EV will remain connected, allowing for flexibility in the use of energy. ' type: object properties: minEnergy: type: integer minimum: 0 description: 'Minimum energy required to charge in Wh during the minimum duration. ' minDuration: type: string format: duration description: 'Minimum duration vehicles are expected to be parked to charge the minimum energy, e.g. ''4h30m'' or just ''30m''. Note that this must be compatible to the Golang duration format, not RFC3339. ' required: - minEnergy - minDuration x-readme-ref-name: EnergyGuarantee tariff: description: 'Describes the time-window during the day to consider for tariff optimization as well as the percentile to consider low prices for. `parkedUntil` must be strictly after `parkedFrom`; overnight parking periods spanning midnight are not supported and are rejected with an HTTP 400. ' type: object properties: parkedFrom: description: A 24-hour wall-clock time of the day, with leading zeros. type: string pattern: ^\d{2}:\d{2}$ example: '16:15' x-readme-ref-name: TimeOfDay parkedUntil: description: A 24-hour wall-clock time of the day, with leading zeros. type: string pattern: ^\d{2}:\d{2}$ example: '16:15' x-readme-ref-name: TimeOfDay percentile: type: number minimum: 0 maximum: 100 description: 'Percentile for the price threshold between 0 and 100 in percent. E.g. for 30 all vehicles will charge in the cheapest 30% of the considered hours. ' example: 30 required: - parkedFrom - parkedUntil - percentile x-readme-ref-name: OptimizationParameters x-readme-ref-name: EMobilityTimeOfUseSettingsUpdate example: enabled: false x-badges: - label: draft color: red tags: - emobility-time-of-use responses: '200': description: 'Response body for the time-of-use settings for a system. ' content: application/json: schema: description: 'All options available to set the eMobility ToU settings. ' type: object properties: enabled: type: boolean example: true energy: description: 'Minimum amount of energy that should be transferred per charging session and the minimum duration the EV will remain connected, allowing for flexibility in the use of energy. ' type: object properties: minEnergy: type: integer minimum: 0 description: 'Minimum energy required to charge in Wh during the minimum duration. ' minDuration: type: string format: duration description: 'Minimum duration vehicles are expected to be parked to charge the minimum energy, e.g. ''4h30m'' or just ''30m''. Note that this must be compatible to the Golang duration format, not RFC3339. ' required: - minEnergy - minDuration x-readme-ref-name: EnergyGuarantee tariff: description: 'Describes the time-window during the day to consider for tariff optimization as well as the percentile to consider low prices for. `parkedUntil` must be strictly after `parkedFrom`; overnight parking periods spanning midnight are not supported and are rejected with an HTTP 400. ' type: object properties: parkedFrom: description: A 24-hour wall-clock time of the day, with leading zeros. type: string pattern: ^\d{2}:\d{2}$ example: '16:15' x-readme-ref-name: TimeOfDay parkedUntil: description: A 24-hour wall-clock time of the day, with leading zeros. type: string pattern: ^\d{2}:\d{2}$ example: '16:15' x-readme-ref-name: TimeOfDay percentile: type: number minimum: 0 maximum: 100 description: 'Percentile for the price threshold between 0 and 100 in percent. E.g. for 30 all vehicles will charge in the cheapest 30% of the considered hours. ' example: 30 required: - parkedFrom - parkedUntil - percentile x-readme-ref-name: OptimizationParameters required: - enabled - energy - tariff x-readme-ref-name: EMobilityTimeOfUseSettings '400': description: Malformed request. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ClientError - Bad Request description: 'Bad Request indicates that the request body is not a valid JSON or it contains a invalid json type. ' example: message: Problems parsing JSON x-readme-ref-name: BadRequestException '403': description: Forbidden. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: UnauthorizedError - Forbidden Error description: Forbidden Error example: message: Bad credentials x-readme-ref-name: ForbiddenException '404': description: Requested entity not found. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ClientError - Not Found description: Not Found indicates that the entity was not found. example: message: Not Found x-readme-ref-name: NotFoundException '500': description: There has been an internal error on our side. We're looking into it. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ServerSideError - Internal Server Error description: Internal Server Error example: message: Internal Server Error x-readme-ref-name: InternalException x-code-samples: - lang: python label: Python source: "import requests\n\nurl = \"https://api.gridx.de/systems/systemID/emobility/timeofuse\"\n\npayload = { \"enabled\": False }\nheaders = {\n \"accept\": \"application/json\",\n \"content-type\": \"application/json\"\n}\n\nresponse = requests.patch(url, json=payload, headers=headers)\n\nprint(response.text)" - lang: shell label: Shell source: "curl --request PATCH \\\n --url https://api.gridx.de/systems/systemID/emobility/timeofuse \\\n --header 'accept: application/json' \\\n --header 'content-type: application/json' \\\n --data '{\"enabled\":false}'" - lang: go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.gridx.de/systems/systemID/emobility/timeofuse\"\n\n\tpayload := strings.NewReader(\"{\\\"enabled\\\":false}\")\n\n\treq, _ := http.NewRequest(\"PATCH\", url, payload)\n\n\treq.Header.Add(\"accept\", \"application/json\")\n\treq.Header.Add(\"content-type\", \"application/json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}" - lang: javascript label: Javascript source: "const options = {\n method: 'PATCH',\n headers: {accept: 'application/json', 'content-type': 'application/json'},\n body: JSON.stringify({enabled: false})\n};\n\nfetch('https://api.gridx.de/systems/systemID/emobility/timeofuse', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));" - lang: java label: Java source: "OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\\"enabled\\\":false}\");\nRequest request = new Request.Builder()\n .url(\"https://api.gridx.de/systems/systemID/emobility/timeofuse\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .build();\n\nResponse response = client.newCall(request).execute();" - lang: java label: Kotlin source: "val client = OkHttpClient()\n\nval mediaType = MediaType.parse(\"application/json\")\nval body = RequestBody.create(mediaType, \"{\\\"enabled\\\":false}\")\nval request = Request.Builder()\n .url(\"https://api.gridx.de/systems/systemID/emobility/timeofuse\")\n .patch(body)\n .addHeader(\"accept\", \"application/json\")\n .addHeader(\"content-type\", \"application/json\")\n .build()\n\nval response = client.newCall(request).execute()" - lang: javascript label: Swift source: "import Foundation\n\nlet parameters = [\"enabled\": false] as [String : Any?]\n\nlet postData = try JSONSerialization.data(withJSONObject: parameters, options: [])\n\nlet url = URL(string: \"https://api.gridx.de/systems/systemID/emobility/timeofuse\")!\nvar request = URLRequest(url: url)\nrequest.httpMethod = \"PATCH\"\nrequest.timeoutInterval = 10\nrequest.allHTTPHeaderFields = [\n \"accept\": \"application/json\",\n \"content-type\": \"application/json\"\n]\nrequest.httpBody = postData\n\nlet (data, _) = try await URLSession.shared.data(for: request)\nprint(String(decoding: data, as: UTF8.self))" - lang: csharp label: C# source: 'using RestSharp; var options = new RestClientOptions("https://api.gridx.de/systems/systemID/emobility/timeofuse"); var client = new RestClient(options); var request = new RestRequest(""); request.AddHeader("accept", "application/json"); request.AddJsonBody("{\"enabled\":false}", false); var response = await client.PatchAsync(request); Console.WriteLine("{0}", response.Content); ' delete: operationId: deleteEmobilityTimeOfUseSettings summary: Delete time-of-use settings for this system description: Delete the configuration for this system. x-badges: - label: draft color: red tags: - emobility-time-of-use parameters: - name: systemID description: 'Unique identifier used to access a system. ' in: path required: true schema: type: string format: uuid example: aa3e5a93-bb38-4b15-b7f2-af40daf3a1dc responses: '204': description: No Content (settings deleted for system) '400': description: Malformed request. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ClientError - Bad Request description: 'Bad Request indicates that the request body is not a valid JSON or it contains a invalid json type. ' example: message: Problems parsing JSON x-readme-ref-name: BadRequestException '403': description: Forbidden. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: UnauthorizedError - Forbidden Error description: Forbidden Error example: message: Bad credentials x-readme-ref-name: ForbiddenException '404': description: Requested entity not found. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ClientError - Not Found description: Not Found indicates that the entity was not found. example: message: Not Found x-readme-ref-name: NotFoundException '500': description: There has been an internal error on our side. We're looking into it. content: application/vnd.gridx.v2+json: schema: readOnly: true allOf: - title: General Exception description: Represents a general error structure returned by our REST API. type: object properties: message: type: string description: Message represents the message reported to the user. details: type: array description: 'Details represents detail information for the user to fix this problem ' items: type: string required: - message x-readme-ref-name: GeneralException - title: ServerSideError - Internal Server Error description: Internal Server Error example: message: Internal Server Error x-readme-ref-name: InternalException x-code-samples: - lang: python label: Python source: 'import requests url = "https://api.gridx.de/systems/systemID/emobility/timeofuse" headers = {"accept": "application/vnd.gridx.v2+json"} response = requests.delete(url, headers=headers) print(response.text)' - lang: shell label: Shell source: "curl --request DELETE \\\n --url https://api.gridx.de/systems/systemID/emobility/timeofuse \\\n --header 'accept: application/vnd.gridx.v2+json'" - lang: go label: Go source: "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io\"\n)\n\nfunc main() {\n\n\turl := \"https://api.gridx.de/systems/systemID/emobility/timeofuse\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/vnd.gridx.v2+json\")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := io.ReadAll(res.Body)\n\n\tfmt.Println(string(body))\n\n}" - lang: javascript label: Javascript source: "const options = {method: 'DELETE', headers: {accept: 'application/vnd.gridx.v2+json'}};\n\nfetch('https://api.gridx.de/systems/systemID/emobility/timeofuse', options)\n .then(res => res.json())\n .then(res => console.log(res))\n .catch(err => console.error(err));" - lang: java label: Java source: "OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n .url(\"https://api.gridx.de/systems/systemID/emobility/timeofuse\")\n .delete(null)\n .addHeader(\"accept\", \"application/vnd.gridx.v2+json\")\n .build();\n\nResponse response = client.newCall(request).execute();" - lang: java label: Kotlin source: "val client = OkHttpClient()\n\nval request = Request.Builder()\n .url(\"https://api.gridx.de/systems/systemID/emobility/timeofuse\")\n .delete(null)\n .addHeader(\"accept\", \"application/vnd.gridx.v2+json\")\n .build()\n\nval response = client.newCall(request).execute()" - lang: javascript label: Swift source: 'import Foundation let url = URL(string: "https://api.gridx.de/systems/systemID/emobility/timeofuse")! var request = URLRequest(url: url) request.httpMethod = "DELETE" request.timeoutInterval = 10 request.allHTTPHeaderFields = ["accept": "application/vnd.gridx.v2+json"] let (data, _) = try await URLSession.shared.data(for: request) print(String(decoding: data, as: UTF8.self))' - lang: csharp label: C# source: 'using RestSharp; var options = new RestClientOptions("https://api.gridx.de/systems/systemID/emobility/timeofuse"); var client = new RestClient(options); var request = new RestRequest(""); request.AddHeader("accept", "application/vnd.gridx.v2+json"); var response = await client.DeleteAsync(request); Console.WriteLine("{0}", response.Content); ' servers: - url: https://api.gridx.de description: Production components: securitySchemes: HeaderAuth: type: apiKey name: Authorization in: header description: Enter either the JWT token with the prefix `Bearer ` or an API token with the prefix `Token ` x-refined-from: - gridx-api.json - gridx-ai-openapi.yml