API Documentation
Integrasi mudah dengan sistem Cek CEIR
Overview
API Cek CEIR memungkinkan Anda untuk mengintegrasikan layanan pengecekan IMEI secara otomatis ke dalam sistem Anda. API ini mendukung pengecekan status CEIR real-time dan riwayat IMEI dengan akurasi tinggi.
Real-time
Data langsung dari database CEIR resmi
Secure
API key authentication & HTTPS
JSON
Format response yang mudah digunakan
Authentication
API Key Required
Semua request harus menyertakan API key melalui header. API key dapat diperoleh dari administrator.
X-Api-Key: your_api_key_here
Important
Tanpa API key yang valid, semua request akan ditolak dengan status 401 Unauthorized.
Endpoints
Endpoint utama untuk melakukan pengecekan status atau riwayat IMEI.
Headers
Content-Type: application/json
X-Api-Key: your_api_key
Parameters
Field | Type | Required | Description |
---|---|---|---|
imei | string | Required | IMEI yang ingin dicek (15 digit) |
package | string | Required |
status untuk pengecekan status CEIR saat ini,
history untuk riwayat lengkap aktivitas IMEI
|
Request Body Examples
Status Package:
{
"imei": "123456789012345",
"package": "status"
}
History Package:
{
"imei": "123456789012345",
"package": "history"
}
Examples
cURL Request Examples
Status Package
curl -X POST https://cekceir.com/api/order \
-H "X-Api-Key: TqSE2yDV7aqd2Jm7masdde59OymQHPXmQGx6jR8o" \
-H "Content-Type: application/json" \
-d '{
"imei": "123456789012345",
"package": "status"
}'
History Package
curl -X POST https://cekceir.com/api/order \
-H "X-Api-Key: TqSE2yDV7aqd2Jm7masdde59OymQHPXmQGx6jR8o" \
-H "Content-Type: application/json" \
-d '{
"imei": "123456789012345",
"package": "history"
}'
JavaScript (Fetch API)
Status Package
const checkStatus = async (imei) => {
try {
const response = await fetch('https://cekceir.com/api/order', {
method: 'POST',
headers: {
'X-Api-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
imei: imei,
package: 'status'
})
});
const data = await response.json();
if (data.success) {
console.log('Status Result:', data.result);
} else {
console.error('Error:', data.message);
}
} catch (error) {
console.error('Network Error:', error);
}
};
History Package
const checkHistory = async (imei) => {
try {
const response = await fetch('https://cekceir.com/api/order', {
method: 'POST',
headers: {
'X-Api-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
imei: imei,
package: 'history'
})
});
const data = await response.json();
if (data.success) {
console.log('History Count:', data.result.history_count);
console.log('History Data:', data.result.result[0].history);
} else {
console.error('Error:', data.message);
}
} catch (error) {
console.error('Network Error:', error);
}
};
PHP (cURL)
Status Package
function checkIMEIStatus($imei, $apiKey) {
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://cekceir.com/api/order',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: ' . $apiKey,
'Content-Type: application/json'
),
CURLOPT_POSTFIELDS => json_encode([
'imei' => $imei,
'package' => 'status'
])
));
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($httpCode === 200) {
$data = json_decode($response, true);
return $data;
} else {
return ['success' => false, 'message' => 'HTTP Error: ' . $httpCode];
}
}
$result = checkIMEIStatus('123456789012345', 'your_api_key_here');
if ($result['success']) {
echo "Status: " . json_encode($result['result']);
} else {
echo "Error: " . $result['message'];
}
History Package
function checkIMEIHistory($imei, $apiKey) {
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://cekceir.com/api/order',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: ' . $apiKey,
'Content-Type: application/json'
),
CURLOPT_POSTFIELDS => json_encode([
'imei' => $imei,
'package' => 'history'
])
));
$response = curl_exec($curl);
$httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);
if ($httpCode === 200) {
$data = json_decode($response, true);
return $data;
} else {
return ['success' => false, 'message' => 'HTTP Error: ' . $httpCode];
}
}
$result = checkIMEIHistory('123456789012345', 'your_api_key_here');
if ($result['success']) {
echo "History Count: " . $result['result']['history_count'] . "\n";
foreach ($result['result']['result'][0]['history'] as $history) {
echo "Date: " . $history['date'] . " - Status: " . $history['status'] . "\n";
}
} else {
echo "Error: " . $result['message'];
}
Responses
Success Response - Status Package
{
"success": true,
"message": "Order berhasil diproses",
"order_id": 123,
"order_ref": "API-STATUS-ABCD123",
"result": {
"status": true,
"processed": 1,
"total": 1,
"result": {
"REGISTERED": [
"123456789012345"
]
}
}
}
Status Package Fields
- order_ref: Referensi order unik untuk tracking
- REGISTERED: IMEI terdaftar dan legal di sistem CEIR
- UNKNOWN: IMEI tidak terdaftar atau bermasalah
- Roamer: IMEI dalam mode turis
- processed: Jumlah IMEI yang berhasil diproses
Success Response - History Package
{
"success": true,
"message": "Riwayat IMEI berhasil ditemukan",
"order_id": 124,
"order_ref": "API-HISTORY-EFGH456",
"result": {
"status": true,
"processed": 1,
"total": 1,
"history_count": 2,
"result": [
{
"imei": "123456789012345",
"history": [
{
"no": 1,
"date": "2024-01-15 10:30:00",
"imei": "123456789012345",
"imsi": "510113545354520",
"action": "----",
},
{
"no": 2,
"date": "2023-12-01 14:20:00",
"imei": "123456789012345",
"imsi": "510101913813011",
"action": "----",
}
]
}
]
}
}
History Package Fields
- history_count: Jumlah total riwayat yang ditemukan
- date: Tanggal dan waktu aktivitas tercatat
- imsi: IMSI yang terkait dengan IMEI pada waktu tersebut
- action: Jenis aktivitas (REGISTERED, UNKNOWN, Roamer.)
- status: Status IMEI pada waktu tersebut
Error Response
{
"success": false,
"message": "Saldo tidak cukup untuk melakukan pengecekan"
}
Common Error Messages
Error Handling
HTTP Status Codes
- 200: Success
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 500: Internal Server Error
Best Practices
- • Selalu cek field
success
pada response - • Implementasikan retry logic untuk error 5xx
- • Simpan
transaction_id
untuk tracking - • Monitor saldo secara berkala
Contact & Support
Butuh Bantuan?
Hubungi tim support kami untuk mendapatkan API key atau bantuan teknis lainnya.