Cloud API v1
Referência completa da API Cloud HiTekNova — autenticação, consultas de registros de dispositivos, busca individual e em lote por IMEI, mapeamento de SKU.
Conteúdo
Visão geral URL base e autenticação Autenticação — RegisteredToken Busca individual — getByImei Busca em lote — getByImeiBulk Listar dispositivos — getAllDevices Consultar por usuário — getByUser Consultar por máquina — getByMachine Mapeamento de SKU — getSku Campos do registro de dispositivo Tratamento de erros SuporteVisão geral
A API Cloud disponibiliza os dados de processamento de dispositivos da HiTekNova via HTTPS em JSON. Cada endpoint recebe uma requisição POST com corpo JSON e retorna uma resposta JSON. Todos os endpoints de consulta exigem um JWT Bearer obtido via RegisteredToken.
URL base e autenticação
Todos os endpoints compartilham a mesma URL base. Envie seu JWT no cabeçalho Authorization.
Authorization header
Authorization: Bearer <JWT> Content-Type: application/json
Autenticação — RegisteredToken
Troque seu nome de usuário e senha do painel por um JWT. O token contém seu customer_id, de modo que toda chamada subsequente fica automaticamente restrita à sua conta. Os tokens são de longa duração — armazene-os em cache.
Parâmetros obrigatórios
| Parâmetro | Tipo | Descrição |
|---|---|---|
username obrigatório | string | Dashboard username |
password obrigatório | string | Dashboard password |
Exemplo — Requisição
curl -X POST https://cloudapi.hiteknova.com/ClientDataAPI/RegisteredToken \ -H "Content-Type: application/json" \ -d '{"username":"yourlogin","password":"yourpassword"}'
Resposta
Em caso de sucesso, o JWT é retornado como string bruta no corpo (sem envelope JSON). Use-o como Authorization: Bearer <token> nas demais chamadas.
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6...
Busca individual — getByImei
Consulte o histórico de um único IMEI ou número de série. Corresponde a imei_esn ou serial_number. Retorna até 100 registros por chamada, paginados via fromid.
Parâmetros obrigatórios
| Parâmetro | Tipo | Descrição |
|---|---|---|
imei obrigatório | string (min 4) | Matches imei_esn OR serial_number |
Parâmetros opcionais
| Parâmetro | Tipo | Descrição |
|---|---|---|
fromdate | string (YYYY-MM-DD) | Default: 1 year ago |
todate | string (YYYY-MM-DD) | Default: today (UTC) |
fromid | integer | Cursor — records with id > fromid |
limit | integer | Default and max: 100 |
latest | boolean | Default false. When true, returns only the newest record (LIMIT 1, ORDER BY id DESC). |
test_result | string | passed, failed |
erase_result | string | passed, failed |
report_type | string | all, erase, triage |
os_type | string | iOS, Android |
model_name | string | Partial match (LIKE) |
Exemplo
curl -X POST https://cloudapi.hiteknova.com/ClientDataAPI/getByImei \ -H "Authorization: Bearer <JWT>" \ -H "Content-Type: application/json" \ -d '{"imei":"356360390499091"}'
Resposta
{
"status": 1,
"msg": "",
"total": 2,
"has_more": false,
"last_id": 60185,
"data": [ { /* device record */ }, ... ]
}
Todos os endpoints de consulta (getByImei, getByImeiBulk, getAllDevices, getByUser, getByMachine) retornam registros com a mesma estrutura. Veja Campos do registro de dispositivo para a referência completa.
Busca em lote — getByImeiBulk NEW
Consulte o histórico de até 100 IMEIs ou números de série em uma única chamada. A flag latest (padrão true) retorna um registro (o mais recente) por entrada correspondente, na ordem da solicitação — o caminho mais rápido para verificar "tenho esses dispositivos?". Use latest: false para histórico completo com paginação por id ASC via from_id / last_id.
Parâmetros obrigatórios
| Parâmetro | Tipo | Descrição |
|---|---|---|
imeis obrigatório | string[] (max 100) | Array of IMEIs or serial numbers (length 4–50) |
Parâmetros opcionais
| Parâmetro | Tipo | Descrição |
|---|---|---|
latest | boolean | Default true. One newest record per matched IMEI, in request order. |
fromdate | string (YYYY-MM-DD) | Default: 30 days ago |
todate | string (YYYY-MM-DD) | Default: today (UTC) |
from_id | integer | Cursor for pagination (use with latest: false) |
limit | integer | Default and max: 100 |
test_result | string | passed, failed |
erase_result | string | passed, failed |
report_type | string | all, erase, triage |
os_type | string | iOS, Android |
model_name | string | Partial match (LIKE) |
latest é true (padrão), os registros retornam na ordem do array de entrada. Quando latest é false, os registros retornam por id ASC e a paginação via from_id/last_id fica ativa.RAM é preenchido a partir de process.specs.ram quando disponível (tipicamente para dispositivos Android com especificações coletadas durante o teste).Exemplo — latest (default)
curl -X POST https://cloudapi.hiteknova.com/ClientDataAPI/getByImeiBulk \ -H "Authorization: Bearer <JWT>" \ -H "Content-Type: application/json" \ -d '{ "imeis": ["356360390499091","356360393577562","358991131387944"] }'
Exemplo — full history, paged
{
"imeis": ["356360390499091"],
"latest": false,
"fromdate": "2026-01-01",
"limit": 100
}
// next page
{
"imeis": ["356360390499091"],
"latest": false,
"from_id": 60190,
"limit": 100
}
Exemplo — filters
{
"imeis": ["356360390499091","356360393577562"],
"latest": false,
"erase_result": "passed",
"os_type": "Android",
"model_name": "Galaxy S24",
"fromdate": "2026-01-01",
"todate": "2026-04-15"
}
Resposta
{
"status": 1,
"msg": "",
"total": 3,
"has_more": false,
"last_id": 60185,
"data": [
{
"id": 60184,
"IMEI": "356360393577562",
"IMEI2": "357332263577567",
"SerialNumber": "R5CXB08H4PJ",
"ModelName": "Galaxy S24 FE",
"Capacity": "256GB",
"RAM": "8GB",
"BatteryMaxCapacity": "98%",
"ErasureStatus": "Passed",
// ... see Device Record Fields below
}
]
}
Listar dispositivos — getAllDevices
Lista os registros de dispositivos do cliente autenticado, filtrados por data e tipo de relatório. Retorna até 100 registros, paginados por fromid.
Parâmetros opcionais
| Parâmetro | Tipo | Descrição |
|---|---|---|
fromdate | string | Default: 1 year ago |
todate | string | Default: today (UTC) |
fromid | integer | Cursor — records with id >= fromid |
limit | integer | Default and max: 100 |
report_type | string | all, erase, triage |
latest | boolean | Default false. When true, returns only the newest record (LIMIT 1, ORDER BY id DESC). |
test_result | string | passed, failed |
erase_result | string | passed, failed |
os_type | string | iOS, Android |
model_name | string | Partial match (LIKE) |
Exemplo
curl -X POST https://cloudapi.hiteknova.com/ClientDataAPI/getAllDevices \ -H "Authorization: Bearer <JWT>" \ -H "Content-Type: application/json" \ -d '{"fromdate":"2026-03-01","todate":"2026-04-15","report_type":"erase"}'
Resposta
{
"status": 1,
"msg": "",
"total": 100,
"has_more": true,
"last_id": 60110,
"data": [ { /* device record */ }, ... ]
}
Todos os endpoints de consulta (getByImei, getByImeiBulk, getAllDevices, getByUser, getByMachine) retornam registros com a mesma estrutura. Veja Campos do registro de dispositivo para a referência completa.
Consultar por usuário — getByUser
Lista os registros criados por um operador específico (username). Use para relatórios por técnico.
Parâmetros obrigatórios
| Parâmetro | Tipo | Descrição |
|---|---|---|
username obrigatório | string | Operator username |
fromdate obrigatório | string | YYYY-MM-DD |
todate obrigatório | string | YYYY-MM-DD |
fromid obrigatório | integer | Cursor (use 0 to start) |
report_type obrigatório | string | all, erase, triage |
Parâmetros opcionais
| Parâmetro | Tipo | Descrição |
|---|---|---|
data_format | integer | 1 = run records through formatData() (same shape as other endpoints). Otherwise raw DB columns are returned. |
limit | integer | Inner per-table limit (default 10000). |
test_result | string | passed, failed |
erase_result | string | passed, failed |
os_type | string | iOS, Android |
model_name | string | Partial match (LIKE) |
UNION, so has_more in the response is always false and latest is not supported. Use fromid for cursor paging.Exemplo
curl -X POST https://cloudapi.hiteknova.com/ClientDataAPI/getByUser \ -H "Authorization: Bearer <JWT>" \ -H "Content-Type: application/json" \ -d '{ "username":"operator01", "fromdate":"2026-03-01", "todate":"2026-04-15", "fromid":0, "report_type":"all", "data_format":1 }'
Consultar por máquina — getByMachine
Lista os registros processados em uma máquina TestPod específica (machine_sn).
Parâmetros obrigatórios
| Parâmetro | Tipo | Descrição |
|---|---|---|
machine_sn obrigatório | string | TestPod machine serial |
fromdate obrigatório | string | YYYY-MM-DD |
todate obrigatório | string | YYYY-MM-DD |
fromid obrigatório | integer | Cursor |
report_type obrigatório | string | all, erase, triage |
Parâmetros opcionais
| Parâmetro | Tipo | Descrição |
|---|---|---|
limit | integer | Inner per-table limit (default 10000). |
test_result | string | passed, failed |
erase_result | string | passed, failed |
os_type | string | iOS, Android |
model_name | string | Partial match (LIKE) |
UNION, so has_more in the response is always false and latest is not supported. Use fromid for cursor paging.Exemplo
curl -X POST https://cloudapi.hiteknova.com/ClientDataAPI/getByMachine \ -H "Authorization: Bearer <JWT>" \ -H "Content-Type: application/json" \ -d '{ "machine_sn":"TP-001234", "fromdate":"2026-03-01", "todate":"2026-04-15", "fromid":0, "report_type":"all" }'
Mapeamento de SKU — getSku
Busca a tabela de mapeamento de SKU da sua conta. Retorna linhas sku, sku_1, sku_2 usadas para enriquecer as respostas de getBy*.
Exemplo
curl -X POST https://cloudapi.hiteknova.com/ClientDataAPI/getSku \ -H "Authorization: Bearer <JWT>" \ -H "Content-Type: application/json" \ -d '{}'
Resposta
{
"status": 1,
"data": [
{ "sku": "SKU001", "sku_1": "Alias A", "sku_2": "Alias B" }
]
}
Campos do registro de dispositivo
Cada registro retornado pelos endpoints de consulta possui a seguinte estrutura. Campos podem vir vazios quando o valor não está disponível.
| Campo | Tipo | Descrição |
|---|---|---|
id | integer | Record id (use for cursor pagination) |
IMEI | string | Primary IMEI |
IMEI2 | string | Secondary IMEI (dual-SIM) |
MEID | string | CDMA MEID |
SerialNumber | string | Device serial |
ECID | string | Apple ECID |
Manufacturer | string | Manufacturer name |
ModelNumber | string | Model number (SKU code) |
ModelName | string | Human-readable model name |
RegulatoryModel | string | FCC / regulatory model |
Region | string | Regional code |
ProductType | string | Product type |
Capacity | string | Storage capacity |
RAM | string | Device RAM (from process.specs.ram) |
Color | string | Device color |
BatteryMaxCapacity | string | Battery max capacity (percent) |
CycleCount | string | Battery cycle count |
OSType | string | iOS or Android |
OSVersion | string | Operating system version |
BluetoothAddress | string | Bluetooth MAC |
WifiAddress | string | Wi-Fi MAC |
FMIStatus | string | Find My iPhone / activation lock status |
FRPStatus | string | Factory Reset Protection status |
MDMStatus | string | MDM status |
Jailbreak | string | Jailbreak / root status |
GSMABlacklisted | string | GSMA blacklist status |
SimLock | string | SIM lock state |
Carrier | string | Carrier name |
SKU | string | Customer SKU |
MachineSN | string | TestPod machine serial that processed the device |
PortIndex | string | TestPod port index |
Username | string | Operator username |
LocalTimeCreated | string | Local time the record was created |
UTCTimeCreated | string | UTC creation timestamp |
DiagnosticsResult | string | Diagnostics app result |
ManualGrading | string | Manual grading result |
ErasureStatus | string | Passed / Failed |
ErasureID | string | Erasure certificate ID (sha3-224 hash) |
ErasureCertificateURL | string | Full URL to the erasure certificate PDF |
Comments | string | Free-text comments |
CustomField | string | Custom field |
Customer | string | Customer label |
PurchaseOrder | string | PO number |
BoxNumber | string | Box number |
Tratamento de erros
Em caso de falha, os endpoints retornam status: 0 e um msg legível. Em caso de sucesso, status: 1.
{
"status": 0,
"msg": "Data format incorrect"
}
msg | Descrição |
|---|---|
Data format incorrect | O corpo da requisição não é JSON válido ou falta um parâmetro obrigatório. |
Username or password incorrect | RegisteredToken — invalid credentials |
Authorization failed | O JWT está ausente, inválido ou expirou — chame RegisteredToken novamente. |
Missing or invalid 'imeis' | Nenhum IMEI válido enviado ao getByImeiBulk após a filtragem (comprimento mínimo 4). |
Too many imeis: max 100 per request | Mais de 100 IMEIs enviados ao getByImeiBulk em uma única chamada. |
No valid imeis provided (min length 4) | Nenhum IMEI válido enviado ao getByImeiBulk após a filtragem (comprimento mínimo 4). |
Suporte
Precisa de uma conta, um novo token ou ajuda com a integração? Entre em contato.
E-mail: support@hiteknova.com