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.

Visã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.

Produção POST  https://cloudapi.hiteknova.com/ClientDataAPI/<method>
Teste POST  https://testcloudapi.hiteknova.com/ClientDataAPI/<method>

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.

POST  /ClientDataAPI/RegisteredToken

Parâmetros obrigatórios

ParâmetroTipoDescrição
username obrigatóriostringDashboard username
password obrigatóriostringDashboard 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.

POST  /ClientDataAPI/getByImei

Parâmetros obrigatórios

ParâmetroTipoDescrição
imei obrigatóriostring (min 4)Matches imei_esn OR serial_number

Parâmetros opcionais

ParâmetroTipoDescrição
fromdatestring (YYYY-MM-DD)Default: 1 year ago
todatestring (YYYY-MM-DD)Default: today (UTC)
fromidintegerCursor — records with id > fromid
limitintegerDefault and max: 100
latestbooleanDefault false. When true, returns only the newest record (LIMIT 1, ORDER BY id DESC).
test_resultstringpassed, failed
erase_resultstringpassed, failed
report_typestringall, erase, triage
os_typestringiOS, Android
model_namestringPartial 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.

POST  /ClientDataAPI/getByImeiBulk

Parâmetros obrigatórios

ParâmetroTipoDescrição
imeis obrigatóriostring[] (max 100)Array of IMEIs or serial numbers (length 4–50)

Parâmetros opcionais

ParâmetroTipoDescrição
latestbooleanDefault true. One newest record per matched IMEI, in request order.
fromdatestring (YYYY-MM-DD)Default: 30 days ago
todatestring (YYYY-MM-DD)Default: today (UTC)
from_idintegerCursor for pagination (use with latest: false)
limitintegerDefault and max: 100
test_resultstringpassed, failed
erase_resultstringpassed, failed
report_typestringall, erase, triage
os_typestringiOS, Android
model_namestringPartial match (LIKE)
Máximo de 100 IMEIs por requisição. Duplicatas são removidas automaticamente. IMEIs devem ter entre 4 e 50 caracteres. Quando 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.
O campo 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.

POST  /ClientDataAPI/getAllDevices

Parâmetros opcionais

ParâmetroTipoDescrição
fromdatestringDefault: 1 year ago
todatestringDefault: today (UTC)
fromidintegerCursor — records with id >= fromid
limitintegerDefault and max: 100
report_typestringall, erase, triage
latestbooleanDefault false. When true, returns only the newest record (LIMIT 1, ORDER BY id DESC).
test_resultstringpassed, failed
erase_resultstringpassed, failed
os_typestringiOS, Android
model_namestringPartial 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.

POST  /ClientDataAPI/getByUser

Parâmetros obrigatórios

ParâmetroTipoDescrição
username obrigatóriostringOperator username
fromdate obrigatóriostringYYYY-MM-DD
todate obrigatóriostringYYYY-MM-DD
fromid obrigatóriointegerCursor (use 0 to start)
report_type obrigatóriostringall, erase, triage

Parâmetros opcionais

ParâmetroTipoDescrição
data_formatinteger1 = run records through formatData() (same shape as other endpoints). Otherwise raw DB columns are returned.
limitintegerInner per-table limit (default 10000).
test_resultstringpassed, failed
erase_resultstringpassed, failed
os_typestringiOS, Android
model_namestringPartial match (LIKE)
This endpoint queries monthly-partitioned tables via 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).

POST  /ClientDataAPI/getByMachine

Parâmetros obrigatórios

ParâmetroTipoDescrição
machine_sn obrigatóriostringTestPod machine serial
fromdate obrigatóriostringYYYY-MM-DD
todate obrigatóriostringYYYY-MM-DD
fromid obrigatóriointegerCursor
report_type obrigatóriostringall, erase, triage

Parâmetros opcionais

ParâmetroTipoDescrição
limitintegerInner per-table limit (default 10000).
test_resultstringpassed, failed
erase_resultstringpassed, failed
os_typestringiOS, Android
model_namestringPartial match (LIKE)
This endpoint queries monthly-partitioned tables via 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*.

POST  /ClientDataAPI/getSku

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.

CampoTipoDescrição
idintegerRecord id (use for cursor pagination)
IMEIstringPrimary IMEI
IMEI2stringSecondary IMEI (dual-SIM)
MEIDstringCDMA MEID
SerialNumberstringDevice serial
ECIDstringApple ECID
ManufacturerstringManufacturer name
ModelNumberstringModel number (SKU code)
ModelNamestringHuman-readable model name
RegulatoryModelstringFCC / regulatory model
RegionstringRegional code
ProductTypestringProduct type
CapacitystringStorage capacity
RAMstringDevice RAM (from process.specs.ram)
ColorstringDevice color
BatteryMaxCapacitystringBattery max capacity (percent)
CycleCountstringBattery cycle count
OSTypestringiOS or Android
OSVersionstringOperating system version
BluetoothAddressstringBluetooth MAC
WifiAddressstringWi-Fi MAC
FMIStatusstringFind My iPhone / activation lock status
FRPStatusstringFactory Reset Protection status
MDMStatusstringMDM status
JailbreakstringJailbreak / root status
GSMABlacklistedstringGSMA blacklist status
SimLockstringSIM lock state
CarrierstringCarrier name
SKUstringCustomer SKU
MachineSNstringTestPod machine serial that processed the device
PortIndexstringTestPod port index
UsernamestringOperator username
LocalTimeCreatedstringLocal time the record was created
UTCTimeCreatedstringUTC creation timestamp
DiagnosticsResultstringDiagnostics app result
ManualGradingstringManual grading result
ErasureStatusstringPassed / Failed
ErasureIDstringErasure certificate ID (sha3-224 hash)
ErasureCertificateURLstringFull URL to the erasure certificate PDF
CommentsstringFree-text comments
CustomFieldstringCustom field
CustomerstringCustomer label
PurchaseOrderstringPO number
BoxNumberstringBox 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"
}
msgDescrição
Data format incorrectO corpo da requisição não é JSON válido ou falta um parâmetro obrigatório.
Username or password incorrectRegisteredToken — invalid credentials
Authorization failedO 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 requestMais 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

Facebook Whats app Configurações de cookies