Verify Meter number Endpoint

Endpoint

URL: /api/verify-electric

Methods: POST

Description

This API endpoint allows users to verify meter number.

Authentication

To access this endpoint, users must include their API key and secret key in the request headers.

Request Headers

  • api-key (string, required): The API key of the user.
  • secret-key (string, required): The secret key of the user.

Request Body (POST)

  • number (string, required): The meter number to subscribe on.
  • firstLevel (string, required): The name of the disco.
  • secondLevel (string, required): The meter type.

Usage Example

See usage example in the code snippets below:

Example: Verify meter number

POST request to verify meter number:


Content-Type: application/json
api-key: your-api-key
secret-key: your-secret-key

{
"number": "0000000000",
"firstLevel": "IKEDC",
"secondLevel": "prepaid",
}
      

Response:


- Status Code: 200

{
    "message": {
        "Customer_Name": "IAB CODES LTD",
        "MeterNumber": "0000000000"
        "Address": "iabcodesltd registered address"
    }
}
      

Failed Response Format



{
    "error": "Please check the number and try again"
}
    

Other Error Responses

  • 401 Unauthorized: Invalid API key or secret key.
  • 404 Not Found: User not found or data not available.
  • 500 Internal Server Error: Internal server error occurred.