Run in Apidog
This API endpoint allows you to send meter usage data for individual customers to the Stykite platform. The provided data will be used to generate invoices based on the recorded usage. This process ensures accurate billing and helps manage customer consumption effectively. Request Parameters# company_id
(string, required): The unique identifier of the company.
country_id
(string, required): The unique identifier of the country.
customer_identifier
(string, required): A unique identifier for the customer.
Authorization
(string, required): The authorization token in the format Bearer
.
Content-Type
(string, required): The content type of the request, should be application/json
.
An array of meter usage data objects. timestamp
(number, required): The timestamp of the meter reading.
meter_id
(string, required): The unique identifier of the meter associated with the usage data.
qty
(number, required): The quantity of usage recorded till timestamp.
Response# Upon successful submission of the meter usage data, the API returns a response with status code 202 Accepted
confirming the receipt of the data Request Provide your bearer token in the Authorization
header when making requests to protected resources. Example: Authorization: Bearer ********************
Example: {{CUSTOMER_IDENTIFIER}}
Example: Bearer {{AUTH_TOKEN}}
Body Params application/json
[
{
"timestamp" : 1697363618832 ,
"meter_id" : "MTR-0DWBEZWHFSBBQ" ,
"qty" : 26
}
]
Request samples curl --location -g --request POST 'https://sandbox.api.stykite.com/v1/company/COM-0FR3TQHKW0YBJ/country/CON-0AZZVPQHM475V/customer/c56164ad-3d54-4eaa-ae3d-46fe3969972b/usage' \
--header 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJvbmthci5rb3JlQHN0eWtpdGUuY29tIiwiaWF0IjoxNzE1NzM2MzY1LCJleHAiOjQ4Mzk3ODc1NjV9.4-0nnrj9SQKmgIFvSnuASttviX1KlOj6YbgSb52ONNTU-emzJlGpQ1mk7ol1qUY1PFMOQmV_alrpKytPwcnGsg' \
--header 'content-type: application/json' \
--data-raw '[
{
"timestamp": 1697363618832,
"meter_id": "MTR-0DWBEZWHFSBBQ",
"qty": 26
}
]'
Responses application/json Generate Code
Modified at 2024-06-08 10:21:08