openapi: 3.2.0 info: title: Gridx Ai Customer 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 Customer 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: Customer x-displayName: Customer paths: /customers: get: operationId: listCustomers summary: List all Customers tags: - Customer security: - HeaderAuth: - CustomersRead parameters: - name: page description: 'Requested page, to be used in combination with the `per_page` parameter. ' in: query schema: type: integer format: int32 default: 1 minimum: 1 example: 1 - name: per_page description: 'Requested number of items per page. ' in: query schema: type: integer format: int32 default: 20 minimum: 20 maximum: 500 example: 10 - name: sort description: Sort results based on a key. in: query schema: type: string example: created_at - name: order description: Order direction of the results, to be used in combination with `sort` parameter. in: query schema: type: string example: desc - name: include description: 'This query param allows requesting optional pagination metadata. If `totalCount` is included, the response will contain an `X-Total-Count` header with the total number of elements matching the query, regardless of pagination. ' in: query example: - totalCount schema: type: array items: type: string enum: - totalCount responses: '200': description: Customers returned headers: Link: description: 'Pagination links following RFC 5988. Contains `rel="first"`, `rel="next"`, and `rel="prev"` relations as applicable based on the current page. Example: `; rel="first", ; rel="next"` ' schema: type: string X-Total-Count: description: 'Total number of elements matching the query, regardless of pagination. Only present when `totalCount` is included in the `include` query parameter. ' schema: type: integer content: application/vnd.gridx.v2+json: schema: type: array items: title: Customer Account description: Represents an end-customer account. type: object properties: name: type: string example: John Doe description: Name of the account, can be chosen freely but should be kept terse and descriptive. minLength: 1 maxLength: 256 email: type: string format: email example: john@doe.com description: The email field of the account can optionally be chosen e.g. for contact purposes (in order to reach the responsible person for the account). maxLength: 256 solution: type: string description: "Represents the supported solutions within the account:\n- HOME if the account contains household-like systems. \n- CHARGE if the account is used solely for charging station fleet management.\n- GENERAL if unsure what the account should contain or if it's a mix of multiple solutions.\n- SMART_DISTRICT if the account is used solely for smart district management.\nIf not set, the parent account's solution will be assumed.\n" enum: - HOME - CHARGE - GENERAL - SMART_DISTRICT - MICROGRID - HOME_VIRTUAL_METERING - COMMERCIAL - CUSTOM_P2P x-readme-ref-name: AccountSolution id: type: string format: uuid example: 49a4f165-8233-426b-a1a4-e569665a25dd description: Uniquely identifies the account. parentID: type: string format: uuid example: 19a4f165-8233-426b-a1a4-e569665a25dd description: Parent of the account for a tree-like account structure. Only the root account does not have a parent ID. createdAt: type: string format: date-time description: Specifies when the account was created. readOnly: true updatedAt: type: string format: date-time description: Specifies when the account was updated. readOnly: true systemsCount: type: integer description: SystemCount is the number of systems assigned to this account example: 1 kind: type: string readOnly: true enum: - b2b - end-user description: If b2b, the account is a regular account. If end-user, the account is a customer account which contains just one user. x-readme-ref-name: AccountKind example: end-user mainAddress: title: Address description: Represents a physical address of a customer. allOf: - type: object properties: city: description: The city of the location. type: string example: Aachen country: description: The country of the location. type: string example: Germany addressLine1: description: "First line of the location's address, typically containing the \nmain information such as the street name and house number.\n" type: string example: Oppenhoffallee 143 addressLine2: description: "Second line of the location's address, typically containing additional \ninformation such as apartment numbers, suite numbers, or other details \nthat can help in identifying the exact location of the address.\n" type: string addressLine3: description: "Third line of the location's address, typically containing any other \ndetails that can help in identifying the exact location of the address.\n" type: string addressLine4: description: "Fourth line of the location's address, typically containing any other \ndetails that can help in identifying the exact location of the address.\n" type: string timeZone: description: The TZ Identifier of the location's timezone. type: string example: Europe/Berlin readOnly: true x-readme-ref-name: AbstractLocation - type: object properties: postalcode: description: The postal code of the location. type: string example: '52062' region: description: The region of the address. type: string telephone: description: The telephone number of the customer. type: string x-readme-ref-name: Address customization: description: Customization can be used to store arbitrary data. required: - id - createdAt - updatedAt x-readme-ref-name: CustomerAccount '401': description: Unauthorized. 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 - Unauthorized description: The client isn't authorized to access the requested resource. example: message: Unauthorized x-readme-ref-name: UnauthorizedException '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 '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/customers" headers = {"accept": "application/vnd.gridx.v2+json"} response = requests.get(url, headers=headers) print(response.text)' - lang: shell label: Shell source: "curl --request GET \\\n --url https://api.gridx.de/customers \\\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/customers\"\n\n\treq, _ := http.NewRequest(\"GET\", 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: 'GET', headers: {accept: 'application/vnd.gridx.v2+json'}};\n\nfetch('https://api.gridx.de/customers', 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/customers\")\n .get()\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/customers\")\n .get()\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/customers")! var request = URLRequest(url: url) request.httpMethod = "GET" 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/customers"); var client = new RestClient(options); var request = new RestRequest(""); request.AddHeader("accept", "application/vnd.gridx.v2+json"); var response = await client.GetAsync(request); Console.WriteLine("{0}", response.Content); ' servers: - url: https://api.gridx.de description: Production /customers/{customerID}: get: operationId: getCustomer summary: Get Customer description: Get a single customer given its account ID. tags: - Customer security: - HeaderAuth: - CustomersRead parameters: - name: customerID description: 'Unique identifier used to access a customer account. ' in: path required: true schema: type: string format: uuid example: 17874c1b-d073-4b06-bf01-a1497fbe1142 responses: '200': description: Customer returned content: application/vnd.gridx.v2+json: schema: title: Customer Account description: Represents an end-customer account. type: object properties: name: type: string example: John Doe description: Name of the account, can be chosen freely but should be kept terse and descriptive. minLength: 1 maxLength: 256 email: type: string format: email example: john@doe.com description: The email field of the account can optionally be chosen e.g. for contact purposes (in order to reach the responsible person for the account). maxLength: 256 solution: type: string description: "Represents the supported solutions within the account:\n- HOME if the account contains household-like systems. \n- CHARGE if the account is used solely for charging station fleet management.\n- GENERAL if unsure what the account should contain or if it's a mix of multiple solutions.\n- SMART_DISTRICT if the account is used solely for smart district management.\nIf not set, the parent account's solution will be assumed.\n" enum: - HOME - CHARGE - GENERAL - SMART_DISTRICT - MICROGRID - HOME_VIRTUAL_METERING - COMMERCIAL - CUSTOM_P2P x-readme-ref-name: AccountSolution id: type: string format: uuid example: 49a4f165-8233-426b-a1a4-e569665a25dd description: Uniquely identifies the account. parentID: type: string format: uuid example: 19a4f165-8233-426b-a1a4-e569665a25dd description: Parent of the account for a tree-like account structure. Only the root account does not have a parent ID. createdAt: type: string format: date-time description: Specifies when the account was created. readOnly: true updatedAt: type: string format: date-time description: Specifies when the account was updated. readOnly: true systemsCount: type: integer description: SystemCount is the number of systems assigned to this account example: 1 kind: type: string readOnly: true enum: - b2b - end-user description: If b2b, the account is a regular account. If end-user, the account is a customer account which contains just one user. x-readme-ref-name: AccountKind example: end-user mainAddress: title: Address description: Represents a physical address of a customer. allOf: - type: object properties: city: description: The city of the location. type: string example: Aachen country: description: The country of the location. type: string example: Germany addressLine1: description: "First line of the location's address, typically containing the \nmain information such as the street name and house number.\n" type: string example: Oppenhoffallee 143 addressLine2: description: "Second line of the location's address, typically containing additional \ninformation such as apartment numbers, suite numbers, or other details \nthat can help in identifying the exact location of the address.\n" type: string addressLine3: description: "Third line of the location's address, typically containing any other \ndetails that can help in identifying the exact location of the address.\n" type: string addressLine4: description: "Fourth line of the location's address, typically containing any other \ndetails that can help in identifying the exact location of the address.\n" type: string timeZone: description: The TZ Identifier of the location's timezone. type: string example: Europe/Berlin readOnly: true x-readme-ref-name: AbstractLocation - type: object properties: postalcode: description: The postal code of the location. type: string example: '52062' region: description: The region of the address. type: string telephone: description: The telephone number of the customer. type: string x-readme-ref-name: Address customization: description: Customization can be used to store arbitrary data. required: - id - createdAt - updatedAt x-readme-ref-name: CustomerAccount '400': description: Validation failed. 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 - Validation description: 'Validation indicates that the request body contains fields which does not pass the validation. ' type: object required: - message - details example: message: Validation failed details: - email is not valid x-readme-ref-name: InvalidException '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/customers/customerID" headers = {"accept": "application/vnd.gridx.v2+json"} response = requests.get(url, headers=headers) print(response.text)' - lang: shell label: Shell source: "curl --request GET \\\n --url https://api.gridx.de/customers/customerID \\\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/customers/customerID\"\n\n\treq, _ := http.NewRequest(\"GET\", 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: 'GET', headers: {accept: 'application/vnd.gridx.v2+json'}};\n\nfetch('https://api.gridx.de/customers/customerID', 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/customers/customerID\")\n .get()\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/customers/customerID\")\n .get()\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/customers/customerID")! var request = URLRequest(url: url) request.httpMethod = "GET" 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/customers/customerID"); var client = new RestClient(options); var request = new RestRequest(""); request.AddHeader("accept", "application/vnd.gridx.v2+json"); var response = await client.GetAsync(request); Console.WriteLine("{0}", response.Content); ' patch: operationId: updateCustomer summary: Edit a single customer tags: - Customer security: - HeaderAuth: - CustomersWrite parameters: - name: customerID description: 'Unique identifier used to access a customer account. ' in: path required: true schema: type: string format: uuid example: 17874c1b-d073-4b06-bf01-a1497fbe1142 requestBody: description: Updates an end-customer account. required: true content: application/json: schema: allOf: - type: object properties: name: type: string example: John Doe description: Name of the account, can be chosen freely but should be kept terse and descriptive. minLength: 1 maxLength: 256 email: type: string format: email example: john@doe.com description: The email field of the account can optionally be chosen e.g. for contact purposes (in order to reach the responsible person for the account). maxLength: 256 solution: type: string description: "Represents the supported solutions within the account:\n- HOME if the account contains household-like systems. \n- CHARGE if the account is used solely for charging station fleet management.\n- GENERAL if unsure what the account should contain or if it's a mix of multiple solutions.\n- SMART_DISTRICT if the account is used solely for smart district management.\nIf not set, the parent account's solution will be assumed.\n" enum: - HOME - CHARGE - GENERAL - SMART_DISTRICT - MICROGRID - HOME_VIRTUAL_METERING - COMMERCIAL - CUSTOM_P2P x-readme-ref-name: AccountSolution customization: description: Customization can be used to store arbitrary data. mainAddress: title: Address description: Represents a physical address of a customer. allOf: - type: object properties: city: description: The city of the location. type: string example: Aachen country: description: The country of the location. type: string example: Germany addressLine1: description: "First line of the location's address, typically containing the \nmain information such as the street name and house number.\n" type: string example: Oppenhoffallee 143 addressLine2: description: "Second line of the location's address, typically containing additional \ninformation such as apartment numbers, suite numbers, or other details \nthat can help in identifying the exact location of the address.\n" type: string addressLine3: description: "Third line of the location's address, typically containing any other \ndetails that can help in identifying the exact location of the address.\n" type: string addressLine4: description: "Fourth line of the location's address, typically containing any other \ndetails that can help in identifying the exact location of the address.\n" type: string timeZone: description: The TZ Identifier of the location's timezone. type: string example: Europe/Berlin readOnly: true x-readme-ref-name: AbstractLocation - type: object properties: postalcode: description: The postal code of the location. type: string example: '52062' region: description: The region of the address. type: string telephone: description: The telephone number of the customer. type: string x-readme-ref-name: Address x-readme-ref-name: CustomerAccountUpdate - additionalProperties: false x-readme-ref-name: CustomerAccountUpdateStrict responses: '200': description: Customers updated content: application/vnd.gridx.v2+json: schema: title: Customer Account description: Represents an end-customer account. type: object properties: name: type: string example: John Doe description: Name of the account, can be chosen freely but should be kept terse and descriptive. minLength: 1 maxLength: 256 email: type: string format: email example: john@doe.com description: The email field of the account can optionally be chosen e.g. for contact purposes (in order to reach the responsible person for the account). maxLength: 256 solution: type: string description: "Represents the supported solutions within the account:\n- HOME if the account contains household-like systems. \n- CHARGE if the account is used solely for charging station fleet management.\n- GENERAL if unsure what the account should contain or if it's a mix of multiple solutions.\n- SMART_DISTRICT if the account is used solely for smart district management.\nIf not set, the parent account's solution will be assumed.\n" enum: - HOME - CHARGE - GENERAL - SMART_DISTRICT - MICROGRID - HOME_VIRTUAL_METERING - COMMERCIAL - CUSTOM_P2P x-readme-ref-name: AccountSolution id: type: string format: uuid example: 49a4f165-8233-426b-a1a4-e569665a25dd description: Uniquely identifies the account. parentID: type: string format: uuid example: 19a4f165-8233-426b-a1a4-e569665a25dd description: Parent of the account for a tree-like account structure. Only the root account does not have a parent ID. createdAt: type: string format: date-time description: Specifies when the account was created. readOnly: true updatedAt: type: string format: date-time description: Specifies when the account was updated. readOnly: true systemsCount: type: integer description: SystemCount is the number of systems assigned to this account example: 1 kind: type: string readOnly: true enum: - b2b - end-user description: If b2b, the account is a regular account. If end-user, the account is a customer account which contains just one user. x-readme-ref-name: AccountKind example: end-user mainAddress: title: Address description: Represents a physical address of a customer. allOf: - type: object properties: city: description: The city of the location. type: string example: Aachen country: description: The country of the location. type: string example: Germany addressLine1: description: "First line of the location's address, typically containing the \nmain information such as the street name and house number.\n" type: string example: Oppenhoffallee 143 addressLine2: description: "Second line of the location's address, typically containing additional \ninformation such as apartment numbers, suite numbers, or other details \nthat can help in identifying the exact location of the address.\n" type: string addressLine3: description: "Third line of the location's address, typically containing any other \ndetails that can help in identifying the exact location of the address.\n" type: string addressLine4: description: "Fourth line of the location's address, typically containing any other \ndetails that can help in identifying the exact location of the address.\n" type: string timeZone: description: The TZ Identifier of the location's timezone. type: string example: Europe/Berlin readOnly: true x-readme-ref-name: AbstractLocation - type: object properties: postalcode: description: The postal code of the location. type: string example: '52062' region: description: The region of the address. type: string telephone: description: The telephone number of the customer. type: string x-readme-ref-name: Address customization: description: Customization can be used to store arbitrary data. required: - id - createdAt - updatedAt x-readme-ref-name: CustomerAccount '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 '422': description: Validation failed. 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 - Validation description: 'Validation indicates that the request body contains fields which does not pass the validation. ' type: object required: - message - details example: message: Validation failed details: - email is not valid x-readme-ref-name: InvalidException '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/customers/customerID\"\n\nheaders = {\n \"accept\": \"application/vnd.gridx.v2+json\",\n \"content-type\": \"application/json\"\n}\n\nresponse = requests.patch(url, headers=headers)\n\nprint(response.text)" - lang: shell label: Shell source: "curl --request PATCH \\\n --url https://api.gridx.de/customers/customerID \\\n --header 'accept: application/vnd.gridx.v2+json' \\\n --header 'content-type: 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/customers/customerID\"\n\n\treq, _ := http.NewRequest(\"PATCH\", url, nil)\n\n\treq.Header.Add(\"accept\", \"application/vnd.gridx.v2+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/vnd.gridx.v2+json', 'content-type': 'application/json'}\n};\n\nfetch('https://api.gridx.de/customers/customerID', 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/customers/customerID\")\n .patch(null)\n .addHeader(\"accept\", \"application/vnd.gridx.v2+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 request = Request.Builder()\n .url(\"https://api.gridx.de/customers/customerID\")\n .patch(null)\n .addHeader(\"accept\", \"application/vnd.gridx.v2+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 url = URL(string: \"https://api.gridx.de/customers/customerID\")!\nvar request = URLRequest(url: url)\nrequest.httpMethod = \"PATCH\"\nrequest.timeoutInterval = 10\nrequest.allHTTPHeaderFields = [\n \"accept\": \"application/vnd.gridx.v2+json\",\n \"content-type\": \"application/json\"\n]\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/customers/customerID"); var client = new RestClient(options); var request = new RestRequest(""); request.AddHeader("accept", "application/vnd.gridx.v2+json"); request.AddHeader("content-type", "application/json"); var response = await client.PatchAsync(request); Console.WriteLine("{0}", response.Content); ' delete: operationId: deleteCustomer summary: Delete Customer description: Delete a customer given its ID. tags: - Customer security: - HeaderAuth: - CustomersWrite parameters: - name: customerID description: 'Unique identifier used to access a customer account. ' in: path required: true schema: type: string format: uuid example: 17874c1b-d073-4b06-bf01-a1497fbe1142 - name: delete-auth0 description: 'If set to `false`, it does not delete the user from Auth0. ' in: query required: false schema: type: boolean default: true example: false responses: '204': description: Customer deleted. '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 '422': description: Validation failed. 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 - Validation description: 'Validation indicates that the request body contains fields which does not pass the validation. ' type: object required: - message - details example: message: Validation failed details: - email is not valid x-readme-ref-name: InvalidException '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/customers/customerID" 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/customers/customerID \\\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/customers/customerID\"\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/customers/customerID', 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/customers/customerID\")\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/customers/customerID\")\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/customers/customerID")! 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/customers/customerID"); 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 /customers/{customerID}/users: get: summary: List Customer's users operationId: listUsersOfCustomer description: Get a list of all users that belong to this customer. tags: - Customer security: - HeaderAuth: - CustomersUsersRead parameters: - name: customerID description: 'Unique identifier used to access a customer account. ' in: path required: true schema: type: string format: uuid example: 17874c1b-d073-4b06-bf01-a1497fbe1142 - name: page description: 'Requested page, to be used in combination with the `per_page` parameter. ' in: query schema: type: integer format: int32 default: 1 minimum: 1 example: 1 - name: per_page description: 'Requested number of items per page. ' in: query schema: type: integer format: int32 default: 20 minimum: 20 maximum: 500 example: 10 - name: sort description: Sort results based on a key. in: query schema: type: string example: created_at - name: order description: Order direction of the results, to be used in combination with `sort` parameter. in: query schema: type: string example: desc - name: include description: 'This query param allows requesting optional pagination metadata. If `totalCount` is included, the response will contain an `X-Total-Count` header with the total number of elements matching the query, regardless of pagination. ' in: query example: - totalCount schema: type: array items: type: string enum: - totalCount responses: '200': description: Users returned headers: Link: description: 'Pagination links following RFC 5988. Contains `rel="first"`, `rel="next"`, and `rel="prev"` relations as applicable based on the current page. Example: `; rel="first", ; rel="next"` ' schema: type: string X-Total-Count: description: 'Total number of elements matching the query, regardless of pagination. Only present when `totalCount` is included in the `include` query parameter. ' schema: type: integer content: application/vnd.gridx.v2+json: schema: type: array items: title: User description: Represents a user of the Xenon platform. type: object properties: id: description: Unique identifier of the user. type: string format: uuid example: 43a4f165-8233-426b-a1a4-e569665a25dd readOnly: true accountID: description: Unique identifier of the account that the user belongs to. type: string format: uuid example: 6dd0a658-5828-4d30-bc65-a03c6d6e425f readOnly: true newPassword: description: Used to set a new password for the user. type: string writeOnly: true loginsCount: description: Number of user logins. type: integer readOnly: true mfaEnabled: description: Indicates whether MFA (Multi-Factor Authentication) is enabled. type: boolean readOnly: true mfaReset: description: Can be set to true if MFA (Multi-Factor Authentication) needs to to be reset. This will remove the MFA. type: boolean writeOnly: true createdAt: description: Time at which the user was created in UTC using the RFC3339 format. type: string format: date-time example: '2009-11-10T23:20:50Z' readOnly: true updatedAt: description: Time at which the user was last updated in UTC using the RFC3339 format. type: string format: date-time example: '2009-11-10T23:20:50Z' readOnly: true fullName: description: Full name of the user typically consisting of first name and last name. type: string example: John Doe email: description: The email address of the user that is used for login. type: string format: email example: john@doe.com groups: description: Policy groups attached to this user which determine the effective permissions through policies. type: array items: title: Policy Group type: object allOf: - title: Policy Group description: 'A policy group describes the permissions of a group. This is the base type for the more concrete usages and not used directly within operations. ' type: object properties: name: type: string description: Name of the policy group. example: group name description: type: string description: Description of the group, omitted if empty example: Group provides read-access to accounts x-readme-ref-name: AbstractPolicyGroup - properties: id: type: string format: uuid description: Unique identifier of the policy group. example: 97874c1b-d073-4b06-bf01-a1497fbe1146 readOnly: true accountID: type: string format: uuid description: Unique identifier of the creator account. example: 97874c1b-d073-4b06-bf01-a1497fbe1146 readOnly: true createdAt: description: Time at which the policy group was created in UTC (RFC 3339 format). type: string format: date-time example: '2019-11-06T15:33:00Z' readOnly: true updatedAt: description: Time at which the policy group was last updated in UTC (RFC 3339 format). type: string format: date-time example: '2019-11-08T23:20:50Z' readOnly: true userCount: type: integer description: Amount of users that are in this group. example: 10 readOnly: true required: - id - name - accountID - createdAt - updatedAt x-readme-ref-name: PolicyGroup mainAddress: title: Address description: Represents a physical address of a customer. allOf: - type: object properties: city: description: The city of the location. type: string example: Aachen country: description: The country of the location. type: string example: Germany addressLine1: description: "First line of the location's address, typically containing the \nmain information such as the street name and house number.\n" type: string example: Oppenhoffallee 143 addressLine2: description: "Second line of the location's address, typically containing additional \ninformation such as apartment numbers, suite numbers, or other details \nthat can help in identifying the exact location of the address.\n" type: string addressLine3: description: "Third line of the location's address, typically containing any other \ndetails that can help in identifying the exact location of the address.\n" type: string addressLine4: description: "Fourth line of the location's address, typically containing any other \ndetails that can help in identifying the exact location of the address.\n" type: string timeZone: description: The TZ Identifier of the location's timezone. type: string example: Europe/Berlin readOnly: true x-readme-ref-name: AbstractLocation - type: object properties: postalcode: description: The postal code of the location. type: string example: '52062' region: description: The region of the address. type: string telephone: description: The telephone number of the customer. type: string x-readme-ref-name: Address language: title: Language description: The language information of the user. type: object required: - tag - name - nameNative properties: tag: type: string description: 'Tag is the IETF language tag''s primary identifier for this language. See [here](https://tools.ietf.org/rfc/bcp/bcp47.txt) and the example below for more information. ' example: de_DE name: type: string description: The name of the language in English. example: German readOnly: true nameNative: type: string description: The name of the language in the language itself. example: Deutsch readOnly: true x-readme-ref-name: Language required: - auth - id - email - createdAt - updatedAt x-readme-ref-name: User '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 '422': description: Validation failed. 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 - Validation description: 'Validation indicates that the request body contains fields which does not pass the validation. ' type: object required: - message - details example: message: Validation failed details: - email is not valid x-readme-ref-name: InvalidException '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/customers/customerID/users" headers = {"accept": "application/vnd.gridx.v2+json"} response = requests.get(url, headers=headers) print(response.text)' - lang: shell label: Shell source: "curl --request GET \\\n --url https://api.gridx.de/customers/customerID/users \\\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/customers/customerID/users\"\n\n\treq, _ := http.NewRequest(\"GET\", 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: 'GET', headers: {accept: 'application/vnd.gridx.v2+json'}};\n\nfetch('https://api.gridx.de/customers/customerID/users', 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/customers/customerID/users\")\n .get()\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/customers/customerID/users\")\n .get()\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/customers/customerID/users")! var request = URLRequest(url: url) request.httpMethod = "GET" 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/customers/customerID/users"); var client = new RestClient(options); var request = new RestRequest(""); request.AddHeader("accept", "application/vnd.gridx.v2+json"); var response = await client.GetAsync(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