openapi: 3.2.0 info: title: Eliq Data Management User API description: '# API Reference The Eliq data management API is organized around REST.' contact: name: Support email: support_b2b@eliq.com version: 1.5.2 tags: - name: User paths: /users/{id}: put: tags: - User summary: Creates or updates user operationId: put-users-userId parameters: - name: id in: path description: Unique identifier of user required: true schema: type: string requestBody: description: User object to create or update content: application/json: schema: $ref: '#/components/schemas/User' examples: User request example: value: id: 210ba397-6320-4ebb-b41b-679d00085efb name: Forename Surname email: mail@mail.com phone: 555-55555 language_code: en-GB responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/User' examples: Full user example: value: id: 210ba397-6320-4ebb-b41b-679d00085efb eliq_id: 1234567 name: Forename Surname email: mail@mail.com phone: 555-55555 language_code: en-GB '201': description: Created content: application/json: schema: $ref: '#/components/schemas/User' examples: Full user example: value: id: 210ba397-6320-4ebb-b41b-679d00085efb eliq_id: 1234567 name: Forename Surname email: mail@mail.com phone: 555-55555 language_code: en-GB '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Request input is missing. This may be caused by incorrect format of input.: value: code: INPUT_MISSING description: Request input is missing. This may be caused by incorrect format of input. request_id: 65e2ea86-470f-4363-9295-35d6b473981a Parameter 'id' must not be null or empty: value: code: USER_ID_MISSING description: Parameter 'id' must not be null or empty request_id: 65e2ea86-470f-4363-9295-35d6b473981a Email is invalid: value: code: USER_EMAIL_INVALID description: Email is invalid request_id: 65e2ea86-470f-4363-9295-35d6b473981a Phone number is invalid: value: code: USER_PHONE_INVALID description: Phone number is invalid request_id: 65e2ea86-470f-4363-9295-35d6b473981a A user with the provided email already exist: value: code: USER_EMAIL_DUPLICATE description: A user with the provided email already exist request_id: 65e2ea86-470f-4363-9295-35d6b473981a Language code is invalid: value: code: USER_LANGUAGE_CODE_INVALID description: Language code is invalid request_id: 65e2ea86-470f-4363-9295-35d6b473981a Language code is missing: value: code: USER_LANGUAGE_CODE_MISSING description: Language code is missing request_id: 65e2ea86-470f-4363-9295-35d6b473981a Time zone is missing: value: code: USER_TIME_ZONE_MISSING description: Time zone is missing request_id: 65e2ea86-470f-4363-9295-35d6b473981a Time zone is invalid: value: code: USER_TIME_ZONE_INVALID description: Time zone is invalid request_id: 65e2ea86-470f-4363-9295-35d6b473981a The provided custom properties are not supported: value: code: USER_CUSTOM_NOT_SUPPORTED description: The provided custom properties are not supported request_id: 65e2ea86-470f-4363-9295-35d6b473981a Too many requests to add the same User were created, please try again later.: value: code: EXCESSIVE_REQUESTS_FOR_THE_SAME_USER description: Too many requests to add the same User were created, please try again later. request_id: 65e2ea86-470f-4363-9295-35d6b473981a '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Internal server error. If problem remains, please contact support: value: code: INTERNAL_ERROR description: Internal server error. If problem remains, please contact support request_id: 65e2ea86-470f-4363-9295-35d6b473981a delete: tags: - User summary: Deletes user operationId: delete-users-userId parameters: - name: id in: path description: Unique identifier of user required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/NoContentResult' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Parameter 'id' must not be null or empty: value: code: USER_ID_MISSING description: Parameter 'id' must not be null or empty request_id: 65e2ea86-470f-4363-9295-35d6b473981a User with given id could not be found: value: code: USER_NOT_FOUND description: User with given id could not be found request_id: 65e2ea86-470f-4363-9295-35d6b473981a '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Internal server error. If problem remains, please contact support: value: code: INTERNAL_ERROR description: Internal server error. If problem remains, please contact support request_id: 65e2ea86-470f-4363-9295-35d6b473981a get: tags: - User summary: Gets user operationId: get-users-userId parameters: - name: id in: path description: Unique identifier of user required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/User' examples: Full user example: value: id: 210ba397-6320-4ebb-b41b-679d00085efb eliq_id: 1234567 name: Forename Surname email: mail@mail.com phone: 555-55555 language_code: en-GB '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Parameter 'id' must not be null or empty: value: code: USER_ID_MISSING description: Parameter 'id' must not be null or empty request_id: 65e2ea86-470f-4363-9295-35d6b473981a User with given id could not be found: value: code: USER_NOT_FOUND description: User with given id could not be found request_id: 65e2ea86-470f-4363-9295-35d6b473981a '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Internal server error. If problem remains, please contact support: value: code: INTERNAL_ERROR description: Internal server error. If problem remains, please contact support request_id: 65e2ea86-470f-4363-9295-35d6b473981a /users: get: tags: - User summary: Gets multiple users description: 'Users are fetched in batches of maximum 1000 users, and returned in created date order. Using parameters after_id and limit can be used to iterate over the full user base. Parameter created_after can also be used to fetch users after a certain date.' operationId: get-users parameters: - name: after_id in: query description: Unique identifier of user, fetch users created after user with given id schema: type: string - name: limit in: query description: Number of users to get schema: type: integer format: int32 default: 100 - name: created_after in: query description: Users created after the provided date schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/User' examples: Get users example: value: - id: 210ba397-6320-4ebb-b41b-679d00085efb eliq_id: 1234567 name: Forename Surname email: mail@mail.com phone: 555-55555 language_code: en-GB custom: {} - id: 1a3b96fd-8734-4a66-bf83-a01baceffc56 eliq_id: 2345678 name: Forename Surname email: mail@mail.com phone: 555-55555 language_code: en-GB custom: {} '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: User with given id could not be found: value: code: USER_NOT_FOUND description: User with given id could not be found request_id: 65e2ea86-470f-4363-9295-35d6b473981a '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Internal server error. If problem remains, please contact support: value: code: INTERNAL_ERROR description: Internal server error. If problem remains, please contact support request_id: 65e2ea86-470f-4363-9295-35d6b473981a /users/{id}/notification: post: tags: - User summary: Sends notifications to user operationId: post-users-userId-notification parameters: - name: id in: path description: Unique identifier of user required: true schema: type: string requestBody: description: Notification object to send to user content: application/json: schema: $ref: '#/components/schemas/NotificationDto' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AcceptedResult' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Parameter 'id' must not be null or empty: value: code: USER_ID_MISSING description: Parameter 'id' must not be null or empty request_id: 65e2ea86-470f-4363-9295-35d6b473981a User with given id could not be found: value: code: USER_NOT_FOUND description: User with given id could not be found request_id: 65e2ea86-470f-4363-9295-35d6b473981a '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Internal server error. If problem remains, please contact support: value: code: INTERNAL_ERROR description: Internal server error. If problem remains, please contact support request_id: 65e2ea86-470f-4363-9295-35d6b473981a /users/{id}/locations: get: tags: - User summary: Gets user locations operationId: get-users-userId-locations parameters: - name: id in: path description: Unique identifier of user required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/Location' examples: Get locations example: value: - id: 27f4a08a-8672-4efe-84a1-9d16abc7c474 eliq_id: 7654321 name: Location name 1 user_id: df530bba-da48-44c6-8f53-8dcb1909a65e spot_price_region_id: nordpool_se1 address: street_address: Stora Badhusgatan 18 postal_code: 411 21 city: Göteborg country_code: SE geo: latitude: 57.70413 longitude: 11.95716 - id: 27f4a08a-8672-4efe-84a1-9d16abc7c475 eliq_id: 7654321 name: Location name 2 user_id: df530bba-da48-44c6-8f53-8dcb1909a65f spot_price_region_id: nordpool_se1 address: street_address: Stora Badhusgatan 19 postal_code: 411 21 city: Göteborg country_code: SE geo: latitude: 57.70413 longitude: 11.95716 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Parameter 'id' must not be null or empty: value: code: USER_ID_MISSING description: Parameter 'id' must not be null or empty request_id: 65e2ea86-470f-4363-9295-35d6b473981a User with given id could not be found: value: code: USER_NOT_FOUND description: User with given id could not be found request_id: 65e2ea86-470f-4363-9295-35d6b473981a '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorDetails' examples: Internal server error. If problem remains, please contact support: value: code: INTERNAL_ERROR description: Internal server error. If problem remains, please contact support request_id: 65e2ea86-470f-4363-9295-35d6b473981a components: schemas: LocationGeo: type: object properties: latitude: type: - number - 'null' format: double longitude: type: - number - 'null' format: double DtoLinkTarget: enum: - webview - browser type: string IOutputFormatter: type: object User: type: object properties: id: type: - string - 'null' eliq_id: type: - integer - 'null' format: int32 readOnly: true name: type: - string - 'null' email: type: - string - 'null' phone: type: - string - 'null' language_code: type: - string - 'null' locations: type: - array - 'null' items: $ref: '#/components/schemas/Location' created_at_timestamp: type: - string - 'null' AcceptedResult: type: object properties: location: type: - string - 'null' value: {} formatters: type: - array - 'null' items: $ref: '#/components/schemas/IOutputFormatter' contentTypes: type: - array - 'null' items: type: string declaredType: type: - string - 'null' statusCode: type: - integer - 'null' format: int32 DtoLink: type: object properties: url: type: - string - 'null' label: type: - string - 'null' target: $ref: '#/components/schemas/DtoLinkTarget' ErrorDetails: required: - code - description type: object properties: code: minLength: 1 type: string description: minLength: 1 type: string request_id: type: - string - 'null' Meter: type: object properties: id: type: - string - 'null' eliq_id: type: - string - 'null' readOnly: true location_id: type: - string - 'null' name: type: - string - 'null' model: type: - string - 'null' fuel: type: - string - 'null' type: type: - string - 'null' is_sub_meter: type: - boolean - 'null' category: type: - string - 'null' category_percentage: type: - integer - 'null' format: int32 supply_start_date: type: - string - 'null' supply_end_date: type: - string - 'null' created_at_timestamp: type: - string - 'null' sync_status: type: - string - 'null' NotificationDto: type: object properties: type: $ref: '#/components/schemas/NotificationType' header: type: - string - 'null' content: type: - string - 'null' link: $ref: '#/components/schemas/DtoLink' NoContentResult: type: object properties: statusCode: type: integer format: int32 LocationAddress: type: object properties: street_address: type: - string - 'null' postal_code: type: - string - 'null' city: type: - string - 'null' country_code: type: - string - 'null' Location: type: object properties: id: type: - string - 'null' eliq_id: type: - integer - 'null' format: int32 readOnly: true name: type: - string - 'null' user_id: type: - string - 'null' spot_price_region_id: type: - string - 'null' address: $ref: '#/components/schemas/LocationAddress' geo: $ref: '#/components/schemas/LocationGeo' meters: type: - array - 'null' items: $ref: '#/components/schemas/Meter' created_at_timestamp: type: - string - 'null' location_profile_type: $ref: '#/components/schemas/ProfileType' NotificationType: enum: - unknown - custom type: string ProfileType: enum: - residential - business - undefined type: string x-tagGroups: - name: Users tags: - User - name: Locations tags: - Location - Location profile - Location home profile - Location price formulas - name: Meters tags: - Meter - Meter Energy Day - Meter Energy High Resolution - Meter Energy Reads - Meter Energy Period - Meter Max Demand - Meter Price Formulas - name: Jobs tags: - Jobs - name: Portfolio tags: - Portfolio Accounts - Portfolio Groups - Portfolio Locations - Portfolio Users - name: Client details tags: - Client details