Solvimon meters API
The meters API from Solvimon — 3 operation(s) for meters.
The meters API from Solvimon — 3 operation(s) for meters.
openapi: 3.1.0
info:
title: Configuration alertRules meters API
version: 1.0.0
servers:
- url: https://test.api.solvimon.com
description: The TEST environment for our API
- url: https://api.solvimon.com
description: The live environment for our API
tags:
- name: meters
paths:
/v{version}/meters:
get:
operationId: getMeters
summary: Get a list of meters
description: Requires the METER.VIEW permission.
tags:
- meters
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: statuses[]
in: query
description: Filter meters based on meter status(es)
required: false
schema:
type: array
items:
type: string
- name: expand[]
in: query
description: The id fields of the resources that are going to be expanded.
required: false
schema:
type: array
items:
type: string
- name: order_by
in: query
description: The parameter by which the response is ordered.
required: false
schema:
type: string
- name: order_direction
in: query
description: The order direction by which the response is ordered.
required: false
schema:
type: string
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MeterResponseWrapper'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
post:
operationId: postMeters
summary: Create a meter
description: Requires the METER.CREATE permission.
tags:
- meters
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/Meter'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MeterCreateRequest'
/v{version}/meters/{resourceIdOrReference}:
get:
operationId: getMetersByResourceIdOrReference
summary: Get a meter
description: Requires the METER.VIEW permission.
tags:
- meters
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceIdOrReference
in: path
description: The ID or reference of the resource.
required: true
schema:
type: string
default: ''
- name: expand[]
in: query
description: The id fields of the resources that are going to be expanded.
required: false
schema:
type: array
items:
type: string
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Meter'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
delete:
operationId: deleteMetersByResourceIdOrReference
summary: Delete a meter
description: Requires the METER.DELETE permission.
tags:
- meters
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceIdOrReference
in: path
description: The ID or reference of the resource.
required: true
schema:
type: string
default: ''
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Meter'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
patch:
operationId: patchMetersByResourceIdOrReference
summary: Update a meter
description: Requires the METER.UPDATE permission.
tags:
- meters
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceIdOrReference
in: path
description: The ID or reference of the resource.
required: true
schema:
type: string
default: ''
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Meter'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MeterUpdateRequest'
/v{version}/meters/{resourceIdOrReference}/meter-data-file:
get:
operationId: getMetersByResourceIdOrReferenceMeterDataFile
summary: Get a file with the headers for ingesting meter events for a meter
description: Requires the METER.VIEW permission.
tags:
- meters
parameters:
- name: version
in: path
description: version
required: true
schema:
type: string
default: '1'
- name: resourceIdOrReference
in: path
description: The ID or reference of the resource.
required: true
schema:
type: string
default: ''
- name: X-API-KEY
in: header
required: true
schema:
type: string
- name: x-platform-id
in: header
description: Platform ID.
required: false
schema:
type: string
responses:
'200':
description: OK
content:
application/octet-stream:
schema:
type: string
format: binary
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
components:
schemas:
MeterCreateRequest:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
reference:
type: string
name:
type:
- string
- 'null'
description:
type:
- string
- 'null'
status:
oneOf:
- $ref: '#/components/schemas/MeterCreateRequestStatus'
- type: 'null'
description: The status of the meter indicating the activity of the meter and the ability to update properties.
meter_values:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/MeterMeterValueCreateRequest'
description: The values used as input to calculate billable units, used in the meter.
meter_properties:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/MeterMeterPropertyCreateRequest'
description: The properties that provide information to give context to an event, used in the meter.
required:
- reference
title: MeterCreateRequest
MeterPropertyType:
type: string
enum:
- NUMBER
- ENUM
- STRING
description: The type of the meter property.
title: MeterPropertyType
MeterValueType:
type: string
enum:
- NUMBER
- AMOUNT
description: The type of the meter value.
title: MeterValueType
MeterPropertyStatus:
type: string
enum:
- DRAFT
- ACTIVE
- ARCHIVED
- DEPRECATED
description: The status of the meter property indicating the activity and the ability to update properties.
title: MeterPropertyStatus
MeterStatus:
type: string
enum:
- DRAFT
- ACTIVE
- ARCHIVED
- DEPRECATED
description: The status of the meter indicating the activity of the meter and the ability to update properties.
title: MeterStatus
MeterMeterValueCreateRequest:
type: object
properties:
id:
type:
- string
- 'null'
description: Resource ID of type METER_VALUE
object:
oneOf:
- $ref: '#/components/schemas/MeterValue'
- type: 'null'
reference:
type:
- string
- 'null'
required:
type:
- boolean
- 'null'
title: MeterMeterValueCreateRequest
MeterMeterPropertyUpdateRequest:
type: object
properties:
id:
type:
- string
- 'null'
description: Resource ID of type METER_PROPERTY
object:
oneOf:
- $ref: '#/components/schemas/MeterProperty'
- type: 'null'
reference:
type:
- string
- 'null'
required:
type:
- boolean
- 'null'
title: MeterMeterPropertyUpdateRequest
MeterProperty:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
reference:
type: string
name:
type:
- string
- 'null'
description:
type:
- string
- 'null'
status:
$ref: '#/components/schemas/MeterPropertyStatus'
description: The status of the meter property indicating the activity and the ability to update properties.
type:
oneOf:
- $ref: '#/components/schemas/MeterPropertyType'
- type: 'null'
description: The type of the meter property.
enum_values:
type:
- array
- 'null'
items:
type: string
description: The list of available ENUM values.
title: MeterProperty
Meter:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
reference:
type: string
name:
type:
- string
- 'null'
description:
type:
- string
- 'null'
status:
oneOf:
- $ref: '#/components/schemas/MeterStatus'
- type: 'null'
description: The status of the meter indicating the activity of the meter and the ability to update properties.
meter_values:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/MeterMeterValue'
description: The values used as input to calculate billable units, used in the meter.
meter_properties:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/MeterMeterProperty'
description: The properties that provide information to give context to an event, used in the meter.
title: Meter
MeterCreateRequestStatus:
type: string
enum:
- DRAFT
- ACTIVE
- ARCHIVED
- DEPRECATED
description: The status of the meter indicating the activity of the meter and the ability to update properties.
title: MeterCreateRequestStatus
MeterResponseWrapper:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Meter'
required:
- data
title: MeterResponseWrapper
ApiErrorType:
type: string
enum:
- API_ERROR
- INVALID_REQUEST
title: ApiErrorType
ApiError:
type: object
properties:
type:
$ref: '#/components/schemas/ApiErrorType'
code:
$ref: '#/components/schemas/ApiErrorCode'
field:
type:
- string
- 'null'
message:
type: string
resource_id:
type:
- string
- 'null'
resource_type:
oneOf:
- $ref: '#/components/schemas/ApiErrorResourceType'
- type: 'null'
required:
- type
- code
- message
title: ApiError
MeterValueStatus:
type: string
enum:
- DRAFT
- ACTIVE
- ARCHIVED
- DEPRECATED
description: The status of the meter value indicating the activity and the ability to update properties.
title: MeterValueStatus
MeterUpdateRequest:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
reference:
type: string
name:
type:
- string
- 'null'
description:
type:
- string
- 'null'
status:
oneOf:
- $ref: '#/components/schemas/MeterUpdateRequestStatus'
- type: 'null'
description: The status of the meter indicating the activity of the meter and the ability to update properties.
meter_values:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/MeterMeterValueUpdateRequest'
description: The values used as input to calculate billable units, used in the meter.
meter_properties:
type:
- array
- 'null'
items:
$ref: '#/components/schemas/MeterMeterPropertyUpdateRequest'
description: The properties that provide information to give context to an event, used in the meter.
title: MeterUpdateRequest
MeterMeterProperty:
type: object
properties:
id:
type:
- string
- 'null'
description: Resource ID of type METER_PROPERTY
object:
oneOf:
- $ref: '#/components/schemas/MeterProperty'
- type: 'null'
reference:
type:
- string
- 'null'
required:
type:
- boolean
- 'null'
title: MeterMeterProperty
ApiErrorResourceType:
type: string
enum:
- CUSTOMER
- CUSTOM_FIELD
- PLATFORM
- PLATFORM_UPTODATE
- METER
- METER_VALUE
- METER_PROPERTY
- METER_VALUE_CALCULATION
- INGEST_DATA
- METER_DATA
- CHARGE_DATA
- PERSIST_DATA
- ADJUSTMENT_DATA
- PRODUCT_CATEGORY
- PRODUCT
- PRODUCT_ITEM
- PRICING
- PRICING_GROUP
- PRICING_ITEM
- PRICING_ITEM_CONFIG
- PRICING_PLAN_SUBSCRIPTION
- PRICING_PLAN_SUBSCRIPTION_GROUP
- PRICING_PLAN_SCHEDULE
- PRICING_PLAN
- PRICING_PLAN_VERSION
- QUOTE
- QUOTE_VERSION
- QUOTE_TEMPLATE
- API_KEY
- USER
- ROLE
- PROXY_USER
- EXTERNAL_CREDENTIALS
- TOKEN
- INVOICE
- E_INVOICE
- PDF
- BILLING_ENTITY
- FEATURE
- MEMBERSHIP
- PAYMENT
- PAYMENT_ACCEPTOR
- PAYMENT_METHOD
- PAYMENT_METHOD_OPTIONS
- PAYMENT_SCHEDULE
- PAYMENT_REQUEST
- INTEGRATION
- WEBHOOK
- FILE
- FILE_PROCESSING_SETTINGS
- TEAM
- DOWNLOAD_URL
- CSV_REPORT
- REPORT
- REPORT_GENERATE_REQUEST
- REPORT_CONFIGURATION
- REPORT_SUBSCRIPTION
- REPORT_DEFINITION
- ACCOUNT_GROUP
- ENTITY
- EVENT_TRACE
- EVENT_TRACE_LINK
- PRICING_CATEGORY
- CONTACT
- ALERT_RULE
- ALERT
- AUDIT_RECORD
- PORTAL_URL
- AUTHENTICATION_PROVIDER
- REPROCESS
- APPROVAL_POLICY
- APPROVAL_REQUEST
- BULK_ACTION
- COUPON
- PROMOTION_CODE
- WALLET
- WALLET_TYPE
- WALLET_GRANT
- WORKFLOW
- WORKFLOW_TRIGGER
- WORKFLOW_ACTION
- CREDIT_TYPE
- SIGNATURE_REQUEST
- ATTACHMENT
- DOCUMENT
title: ApiErrorResourceType
MeterMeterValue:
type: object
properties:
id:
type:
- string
- 'null'
description: Resource ID of type METER_VALUE
object:
oneOf:
- $ref: '#/components/schemas/MeterValue'
- type: 'null'
reference:
type:
- string
- 'null'
required:
type:
- boolean
- 'null'
title: MeterMeterValue
MeterMeterPropertyCreateRequest:
type: object
properties:
id:
type:
- string
- 'null'
description: Resource ID of type METER_PROPERTY
object:
oneOf:
- $ref: '#/components/schemas/MeterProperty'
- type: 'null'
reference:
type:
- string
- 'null'
required:
type:
- boolean
- 'null'
title: MeterMeterPropertyCreateRequest
ApiErrorCode:
type: string
enum:
- RESOURCE_NOT_FOUND
- RESOURCES_NOT_FOUND
- UNABLE_TO_PROCESS_INSTRUCTIONS
- BAD_REQUEST
- UNSUPPORTED_MEDIA_TYPE
- RESOURCE_ALREADY_EXISTS
- CUSTOM_FIELD_VALUE_ALREADY_EXISTS
- COULD_NOT_CREATE_RESOURCE
- COULD_NOT_UPDATE_RESOURCE
- COULD_NOT_DELETE_RESOURCE
- MISSING_VERSION
- UNSUPPORTED_VERSION
- UNAUTHORISED
- CUSTOMER_NOT_FOUND
- PLATFORM_NOT_FOUND
- PRICING_PLAN_NOT_FOUND
- PRODUCT_NOT_FOUND
- PRODUCT_ITEM_NOT_FOUND
- PRICING_NOT_FOUND
- PRICING_ITEM_NOT_FOUND
- USER_NOT_FOUND
- METER_NOT_FOUND
- METER_VALUE_NOT_FOUND
- METER_PROPERTY_NOT_FOUND
- PRICING_ITEM_SUMMARIES_NOT_FOUND
- MISSING_ID
- INVALID_ID
- MISSING_REFERENCE
- MISSING_FIELD
- INVALID_FIELD
- INVALID_OPERATION
- INTERNAL_ERROR
- USER_NOT_ALLOWED
- IDEMPOTENCY_CHECK_FAILED
- INVALID_REQUEST
title: ApiErrorCode
MeterMeterValueUpdateRequest:
type: object
properties:
id:
type:
- string
- 'null'
description: Resource ID of type METER_VALUE
object:
oneOf:
- $ref: '#/components/schemas/MeterValue'
- type: 'null'
reference:
type:
- string
- 'null'
required:
type:
- boolean
- 'null'
title: MeterMeterValueUpdateRequest
MeterValue:
type: object
properties:
object_type:
type:
- string
- 'null'
id:
type:
- string
- 'null'
reference:
type: string
name:
type:
- string
- 'null'
description:
type:
- string
- 'null'
status:
oneOf:
- $ref: '#/components/schemas/MeterValueStatus'
- type: 'null'
description: The status of the meter value indicating the activity and the ability to update properties.
type:
oneOf:
- $ref: '#/components/schemas/MeterValueType'
- type: 'null'
description: The type of the meter value.
title: MeterValue
MeterUpdateRequestStatus:
type: string
enum:
- DRAFT
- ACTIVE
- ARCHIVED
- DEPRECATED
description: The status of the meter indicating the activity of the meter and the ability to update properties.
title: MeterUpdateRequestStatus
securitySchemes:
API-Key:
type: apiKey
in: header
name: X-API-KEY
JWT-Authentication:
type: http
scheme: bearer