ERM Rest API: new CodeGen Endpoints¶
The Omnivoltaic API provides a comprehensive set of endpoints for interacting with the Omnivoltaic platform. This API allows distributors, agents, and administrators to manage devices, generate codes, and perform various operations related to the Omnivoltaic ecosystem.
Base URL¶
All API requests should be made to the following base URL:
https://api.omnovoltaic.com
Authentication¶
Most endpoints require authentication using an access token. To obtain an access token, use the login endpoint:
POST /user/login
After successful authentication, include the access token in the HTTP headers of subsequent requests:
{
"accessToken": "your-access-token-here",
"user_role": "DISTRIBUTOR"
}
Key Endpoints¶
User Management¶
/user/login- Authenticate and obtain an access token
Code Generation¶
/otp/daysCode/v2- Generate days activation codes for devices/code/code/freecodeotp/v2- Generate free codes for permanent device unlocking/code/code/resetcode/v2- Generate reset codes to return devices to locked state
Generate Days Code¶
Inital Endpoint : https://api.omnivoltaic.com/otp/daysCode
This API is used to generate an OTP for the given product ID.
ProductId is the device's productItemID that is available from assignedItemlist GET API.
The “days” parameter must be a value between 1 and 1095.
ERMID
{
"productId": "64ba2e1eaa6c7f107d7a8918",
"days": 5
}
- The new included endpoint gives you a chance to use the OEMItemID for token generation
Endpoint : https://api.omnivoltaic.com/otp/daysCode/v2
- Example usage
OEMItem ID or SellerItemID
{
"productId" : "TEST2503000017",
"days" : 5
}
- Response expected:
{
"message": "Succeed",
"otpCount": 0,
"code": "*024 413 975 593 119 504 641#",
"otpHash": "9184C537B9EFDD01"
}
Generate Free Code:¶
Initial Endpoint:https://api.omnivoltaic.com/code/code/freecodeotp
A "free code" is a special code that will cause an Omnivoltaic device to unlock permanently, that is free to use.
This API is used to generate "free code", and commit a state change to the code-genetator , for the given product ID.
ProductId is the device's productItemID that is available from
1. ERMID
{
"productId": "64ba2e1eaa6c7f107d7a8918",
}
- The new included endpoint gives you a chance to use the OEMItemID for token generation
Endpoint : https://api.omnivoltaic.com/code/code/freecodeotp/v2
- Example usage
2. OEMItem ID or SellerItemID
{
"productId" : "TEST2503000017"
}
Reponse expected
{
"message": "succeed",
"code": "*030 594 885 382 337 041 426#"
}
- The productID can be either OEMItemId, SellerItemID, or ERMID
Generate Reset Code¶
Initial EndPoint: https://api.omnivoltaic.com/code/code/resetcode
A "reset code" is a special code that will cause an Omnivoltaic device to go to a "0-day locked" state.
This API is used to generate "reset code", and commit a state change to the code-genetator , for the given product ID.
ProductId is the device's productItemID that is available from
ERM ID
{
"productId": "64ba2e1eaa6c7f107d7a8918",
}
- The new included endpoint gives you a chance to use the OEMItemID for token generation
Endpoint : https://api.omnivoltaic.com/code/code/resetcode/v2
- Example usage
OEMItem ID or SellerItemID
{
"productId" : "TEST2503000017"
}
Response Expected
{
"message": "succeed",
"code": "*030 594 885 382 337 041 426#"
}
Product Identification¶
Products can be identified using any of the following IDs:
- OEMItemID
- SellerItemId/PPID/Account Number
- ERMId
Rate Limits and Constraints¶
- Frequency Limit: Minimum 6 seconds between code generation requests
- Code Limit Count: Products cannot exceed 1096 days (unlocked after this limit)
- Daily Code Count Limit: Maximum 10 codes per day
- Credit Stacking Limit: Set according to distributor preferences