Skip to main content
POST
/
measurements
Create Measurement
curl --request POST \
  --url https://connect.withvayu.com/measurements \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customerId": "<string>",
  "meterId": "<string>",
  "usageDate": {
    "year": 1,
    "month": 6,
    "day": 16
  },
  "value": 123
}'
{
  "measurement": {
    "customerId": "<string>",
    "meterId": "<string>",
    "usageDate": {
      "year": 1,
      "month": 6,
      "day": 16
    },
    "value": 123,
    "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
customerId
string
required

The customer for whom usage will be attributed

meterId
string
required

The meter/product that is being measured

usageDate
object
required

The day the usage took place

value
number
required

The updated value of product units consumed by the customer, for the product for given day

Response

RequestSuccess

measurement
object
required