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.omnivoltaic.com
Authentication¶
Most endpoints require authentication using an access token.
/user/login¶
URL:
https://api.omnivoltaic.com/user/login
Request headers:
| Header | Value |
|---|---|
Content-Type |
application/json |
Request body:
{
"username": "test@example.com",
"password": "test1234"
}
Successful response example:
{
"accessToken": "your-access-token-here",
"user_role": "DISTRIBUTOR"
}
Product Identification¶
Products can be identified using any of the following IDs:
- OEMItemID
- SellerItemId/PPID/Account Number
- ERMId
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/oves/v2/codeHistoryList/{productID}/{offset}/{limit}- History of committed codes
Item Avatar¶
/oves/avatarAttr/{itemId}- Get avatar configuration (cmd) for a specific item
Generate Days Code¶
This API is used to generate an OTP for the given product ID.
productId can be the device's OEMItemID, SellerItemID, or ERM ID, as returned by the assignedItemsList GET API.
The “days” parameter must be a value between 1 and 1095.
Endpoint: https://api.omnivoltaic.com/otp/daysCode/v2
Headers
| Header | Value |
|---|---|
Authorization |
Authorization: {{authorization}} |
Content-Type |
application/json |
Example request
curl --location 'https://api.omnivoltaic.com/otp/daysCode/v2' \
--header 'Authorization: {{authorization}}' \
--header 'Content-Type: application/json' \
--data '{"productId":"TEST2503000017","days":5}'
Example Requests
{
"productId": "64ba2e1eaa6c7f107d7a8918",
"days": 5
}
{
"productId": "TEST2503000017",
"days": 5
}
{
"productId": "SELLER2503000042",
"days": 5
}
- Response expected:
{
"message": "Succeed",
"otpCount": 0,
"code": "*024 413 975 593 119 504 641#",
"otpHash": "9184C537B9EFDD01"
}
Generate Free Code¶
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-generator, for the given product ID.
productId can be the device's OEMItemID, SellerItemID, or ERM ID, as returned by the assignedItemsList GET API.
Endpoint: https://api.omnivoltaic.com/code/code/freecodeotp/v2
Headers
| Header | Value |
|---|---|
Authorization |
Authorization: {{authorization}} |
Content-Type |
application/json |
Example request
curl --location 'https://api.omnivoltaic.com/code/code/freecodeotp/v2' \
--header 'Authorization: {{authorization}}' \
--header 'Content-Type: application/json' \
--data '{"productId":"TEST2503000017"}'
Example Requests
{
"productId": "64ba2e1eaa6c7f107d7a8918"
}
{
"productId": "TEST2503000017"
}
{
"productId": "SELLER2503000042"
}
Response expected
{
"message": "succeed",
"code": "*030 594 885 382 337 041 426#"
}
Generate Reset Code¶
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-generator, for the given product ID.
productId can be the device's OEMItemID, SellerItemID, or ERM ID, as returned by the assignedItemsList GET API.
Endpoint: https://api.omnivoltaic.com/code/code/resetcode/v2
Headers
| Header | Value |
|---|---|
Authorization |
Authorization: {{authorization}} |
Content-Type |
application/json |
Example request
curl --location 'https://api.omnivoltaic.com/code/code/resetcode/v2' \
--header 'Authorization: {{authorization}}' \
--header 'Content-Type: application/json' \
--data '{"productId":"TEST2503000017"}'
Example Requests
{
"productId": "64ba2e1eaa6c7f107d7a8918"
}
{
"productId": "TEST2503000017"
}
{
"productId": "SELLER2503000042"
}
Response Expected
{
"message": "succeed",
"code": "*030 594 885 382 337 041 426#"
}
Token Code History¶
codeHistoryList (GET)¶
Returns the history of committed codes for a product.
Endpoint
https://api.omnivoltaic.com/oves/v2/codeHistoryList/{productID}/{offset}/{limit}
Path parameters:
| Parameter | Description |
|---|---|
productID |
The device’s product identifier from the assignedItemsList GET API (can be ERM ID, OEMItemID, or SellerItemID; same identifiers you use for code generation). |
offset |
Pagination: how many records to skip. |
limit |
Pagination: how many records to return. |
Example Requests
Endpoint
https://api.omnivoltaic.com/oves/v2/codeHistoryList/64ba2e1eaa6c7f107d7a8918/0/10
Example request
curl --location -g 'https://api.omnivoltaic.com/oves/v2/codeHistoryList/64ba2e1eaa6c7f107d7a8918/0/10' \
--header 'Authorization: {{authorization}}' \
--header 'Content-Type: application/x-www-form-urlencoded'
Endpoint
https://api.omnivoltaic.com/oves/v2/codeHistoryList/01AH2307000009/0/10
Example request
curl --location -g 'https://api.omnivoltaic.com/oves/v2/codeHistoryList/01AH2307000009/0/10' \
--header 'Authorization: {{authorization}}' \
--header 'Content-Type: application/x-www-form-urlencoded'
Endpoint
https://api.omnivoltaic.com/oves/v2/codeHistoryList/723128/0/10
Example request
curl --location -g 'https://api.omnivoltaic.com/oves/v2/codeHistoryList/723128/0/10' \
--header 'Authorization: {{authorization}}' \
--header 'Content-Type: application/x-www-form-urlencoded'
Headers
| Header | Value |
|---|---|
Authorization |
Your bearer or session token (e.g. {{authorization}}). |
Content-Type |
application/x-www-form-urlencoded |
Example response (200 OK, for any selected product ID tab)
{
"page": {
"edges": [
{
"cursor": "YXJyYXljb25uZWN0aW9uOjA=",
"node": {
"_id": "69c500938a5dfe4b5d56f5eb",
"codeType": "DAYSCODE",
"codeDays": 60,
"codeHexString": "7F1E998A6EBE89D3",
"codeDecString": "*021 327 118 181 857 980 883#",
"codeNumber": 21,
"createdAt": "2026-03-26T09:46:59.000Z",
"updatedAt": "2026-03-26T09:46:59.000Z",
"__typename": "CodeEvent"
},
"__typename": "CodeEventEdge"
},
{
"cursor": "YXJyYXljb25uZWN0aW9uOjE=",
"node": {
"_id": "69c4ff9d8a5dfe4b5d56f5e1",
"codeType": "DAYSCODE",
"codeDays": 5,
"codeHexString": "4333AEFC41A17EDD",
"codeDecString": "*011 274 606 041 101 102 813#",
"codeNumber": 20,
"createdAt": "2026-03-26T09:42:53.000Z",
"updatedAt": "2026-03-26T09:42:53.000Z",
"__typename": "CodeEvent"
},
"__typename": "CodeEventEdge"
},
{
"cursor": "YXJyYXljb25uZWN0aW9uOjI=",
"node": {
"_id": "69c4ff9265294b928d6ef41a",
"codeType": "DAYSCODE",
"codeDays": 5,
"codeHexString": "0B6319B11D0B5760",
"codeDecString": "*001 910 440 170 487 282 528#",
"codeNumber": 19,
"createdAt": "2026-03-26T09:42:42.000Z",
"updatedAt": "2026-03-26T09:42:42.000Z",
"__typename": "CodeEvent"
},
"__typename": "CodeEventEdge"
},
{
"cursor": "YXJyYXljb25uZWN0aW9uOjM=",
"node": {
"_id": "69c4c7508a5dfe4b5d56f33f",
"codeType": "RESETCODE",
"codeDays": 2192,
"codeHexString": "E578757C4C293D69",
"codeDecString": "*038 498 768 601 277 771 113#",
"codeNumber": 18,
"createdAt": "2026-03-26T05:42:40.000Z",
"updatedAt": "2026-03-26T05:42:40.000Z",
"__typename": "CodeEvent"
},
"__typename": "CodeEventEdge"
},
{
"cursor": "YXJyYXljb25uZWN0aW9uOjQ=",
"node": {
"_id": "69c4c7438a5dfe4b5d56f33e",
"codeType": "FREECODE",
"codeDays": 1096,
"codeHexString": "6C9E95CF4CBD071C",
"codeDecString": "*018 223 323 671 287 456 540#",
"codeNumber": 17,
"createdAt": "2026-03-26T05:42:27.000Z",
"updatedAt": "2026-03-26T05:42:27.000Z",
"__typename": "CodeEvent"
},
"__typename": "CodeEventEdge"
},
{
"cursor": "YXJyYXljb25uZWN0aW9uOjU=",
"node": {
"_id": "695e5b292b7a59f5b9dba9ca",
"codeType": "DAYSCODE",
"codeDays": 0,
"codeHexString": "A038D89C2A98C13D",
"codeDecString": "*026 880 800 280 714 654 013#",
"codeNumber": 16,
"createdAt": "2026-01-07T13:10:01.000Z",
"updatedAt": "2026-01-07T13:10:01.000Z",
"__typename": "CodeEvent"
},
"__typename": "CodeEventEdge"
},
{
"cursor": "YXJyYXljb25uZWN0aW9uOjY=",
"node": {
"_id": "695b3b049ace409404837835",
"codeType": "DAYSCODE",
"codeDays": 60,
"codeHexString": "A038D89C2A98C13D",
"codeDecString": "*026 880 800 280 714 654 013#",
"codeNumber": 15,
"createdAt": "2026-01-05T04:16:04.000Z",
"updatedAt": "2026-01-05T04:16:04.000Z",
"__typename": "CodeEvent"
},
"__typename": "CodeEventEdge"
},
{
"cursor": "YXJyYXljb25uZWN0aW9uOjc=",
"node": {
"_id": "695b3afa4e870342cde5c469",
"codeType": "DAYSCODE",
"codeDays": 60,
"codeHexString": "A3CEB5E56CCE06CD",
"codeDecString": "*027 482 331 891 825 441 485#",
"codeNumber": 14,
"createdAt": "2026-01-05T04:15:54.000Z",
"updatedAt": "2026-01-05T04:15:54.000Z",
"__typename": "CodeEvent"
},
"__typename": "CodeEventEdge"
},
{
"cursor": "YXJyYXljb25uZWN0aW9uOjg=",
"node": {
"_id": "695b3af2a5961f65ed0a6ef1",
"codeType": "DAYSCODE",
"codeDays": 60,
"codeHexString": "BE2A5D9A5436855A",
"codeDecString": "*031 904 475 141 412 859 226#",
"codeNumber": 13,
"createdAt": "2026-01-05T04:15:46.000Z",
"updatedAt": "2026-01-05T04:15:46.000Z",
"__typename": "CodeEvent"
},
"__typename": "CodeEventEdge"
},
{
"cursor": "YXJyYXljb25uZWN0aW9uOjk=",
"node": {
"_id": "6957dbed84fab32d83a48c9e",
"codeType": "DAYSCODE",
"codeDays": 15,
"codeHexString": "30F5630E78F15334",
"codeDecString": "*008 213 880 462 029 081 396#",
"codeNumber": 12,
"createdAt": "2026-01-02T14:53:33.000Z",
"updatedAt": "2026-01-02T14:53:33.000Z",
"__typename": "CodeEvent"
},
"__typename": "CodeEventEdge"
}
],
"pageInfo": {
"hasPreviousPage": false,
"hasNextPage": true,
"__typename": "CodeEventPageInfo"
},
"__typename": "CodeEventConnection"
},
"pageData": {
"count": 27,
"limit": 10,
"offset": 0,
"__typename": "PageData"
}
}
codeHistoryMetadata (GET)¶
This API returns metadata (table/column structure) related to committed codeHistory.
Endpoint
https://api.omnivoltaic.com/oves/codeHistory_Metadata
Headers
| Header | Value |
|---|---|
Authorization |
{{authorization}} |
Content-Type |
application/x-www-form-urlencoded |
Curl example
curl --location 'https://api.omnivoltaic.com/oves/codeHistory_Metadata' \
--header 'Authorization: {{authorization}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data ''
Response
{
"tableName": "codeHistory",
"tableDescription": "",
"totalColumns": 5,
"columns": [
{
"Field": "codeHistoryID",
"Type": "int(11)"
},
{
"Field": "otpGeneratorID",
"Type": "int(11)"
},
{
"Field": "codeIndex",
"Type": "tinyint(4)"
},
{
"Field": "codeValue",
"Type": "varchar(45)"
},
{
"Field": "codeDate",
"Type": "datetime"
}
]
}
avatarAttr (GET)¶
Returns the avatar configuration (cmd section) for a specific item. The cmd array contains key-value attribute pairs that represent device configuration properties.
Endpoint
https://api.omnivoltaic.com/oves/avatarAttr/{itemId}
Headers
| Header | Value |
|---|---|
Authorization |
{{authorization}} |
Content-Type |
application/json |
URL parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
itemId |
String |
Yes | The ID of the item to fetch the avatar attributes for. |
Example Requests
Endpoint
https://api.omnivoltaic.com/oves/avatarAttr/670e0efe7be26d4c803cac68
Example request
curl --location 'https://api.omnivoltaic.com/oves/avatarAttr/670e0efe7be26d4c803cac68' \
--header 'Authorization: {{authorization}}' \
--header 'Content-Type: application/json'
Example response (200 OK)
{
"_id": "68342ef3a9cf5f467b1c8b14",
"cmd": [
{ "prop": "pubk", "value": "*032 614 486 581 414 051 958#", "meta": "" },
{ "prop": "gstw", "value": "60", "meta": "" },
{ "prop": "gctw", "value": "5", "meta": "" },
{ "prop": "napn", "value": "orange.m2m.spec", "meta": "" },
{ "prop": "swch", "value": "0", "meta": "" },
{ "prop": "read", "value": "0", "meta": "" },
{ "prop": "rptm", "value": "0", "meta": "" },
{ "prop": "raml", "value": "", "meta": "" },
{ "prop": "rtmd", "value": "0", "meta": "" },
{ "prop": "hbfq", "value": "1", "meta": "" }
]
}
Response fields:
| Field | Type | Description |
|---|---|---|
_id |
String |
The avatar document ID. |
cmd |
Array |
List of device configuration attributes. |
cmd[].prop |
String |
Attribute key/property name. |
cmd[].value |
String |
Attribute value. |
cmd[].meta |
String |
Additional metadata (can be empty). |
Error responses:
| Status | Description |
|---|---|
400 |
Bad request - invalid itemId or GraphQL validation error. Body: { "error": "<message>" } |
401 |
Token is present but is not a valid ERM-format token. |
500 |
Internal server error. Body: { "error": "<message>" } |
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