API EndpointsMeasurements
Create Measurement
Create a new Measurement.
Authorization
BearerAuthorizer AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
customerId*string
The customer for whom usage will be attributed
meterId*string
The meter/product that is being measured
usageDate*
The day the usage took place
value*number
The updated value of product units consumed by the customer, for the product for given day
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/measurements" \ -H "Content-Type: application/json" \ -d '{ "customerId": "string", "meterId": "string", "usageDate": { "year": 0, "month": 0, "day": 1 }, "value": 0 }'{ "measurement": { "customerId": "string", "meterId": "string", "usageDate": { "year": 0, "month": 0, "day": 1 }, "value": 0, "id": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}{ "type": "invalid_request_error", "code": "string", "message": "string", "param": "string", "params": [ { "param": "string", "message": "string" } ]}{ "type": "authentication_error", "code": "authentication_failed", "message": "string"}{ "type": "rate_limit_error", "code": "rate_limit_exceeded", "message": "string"}{ "type": "api_error", "code": "internal_error", "message": "string"}
