POST
/
measurements
curl --request POST \
  --url https://connect.withvayu.com/measurements \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "accountId": "<string>",
  "period": {
    "startTime": "2023-11-07T05:31:56Z",
    "endTime": "2023-11-07T05:31:56Z"
  },
  "meterId": "<string>",
  "customerId": "<string>",
  "value": 1,
  "price": 123,
  "measurementPriceId": "<string>"
}'
{
  "measurement": {
    "accountId": "<string>",
    "period": {
      "startTime": "2023-11-07T05:31:56Z",
      "endTime": "2023-11-07T05:31:56Z"
    },
    "meterId": "<string>",
    "customerId": "<string>",
    "value": 1,
    "price": 123,
    "measurementPriceId": "<string>",
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
accountId
string
required

The id of the account that the measurement is associated with

period
object
required

The period of the measurement

meterId
string
required

The id of the meter that the measurement is associated with

customerId
string
required

The id of the customer that the measurement is associated with

value
number
required

The value of the measurement

Required range: x >= 0
price
number
measurementPriceId
string

Response

200
application/json
RequestSuccess
measurement
object
required