MENU navbar-image

Introduction

Dokumentasi ini bertujuan untuk memberikan semua informasi yang Anda butuhkan untuk bekerja dengan API kami.

Base URL

https://apidev.erunix.id

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

Anda bisa mendapatkan token Anda dengan cara Login.

Authentication

API endpoints for managing authentication

Fetch user.

requires authentication

Example request:
curl --request POST \
    "https://apidev.erunix.id/api/fetch" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json"
const url = new URL(
    "https://apidev.erunix.id/api/fetch"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://apidev.erunix.id/api/fetch',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/fetch

Logout

requires authentication

Example request:
curl --request DELETE \
    "https://apidev.erunix.id/api/logout" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json"
const url = new URL(
    "https://apidev.erunix.id/api/logout"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    'https://apidev.erunix.id/api/logout',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
 "message": "Token dihapus!",
}
 

Request      

DELETE api/logout

Driver Notification

Mendapatkan list data Notifikasi Saya.

requires authentication

Dibagian ini Anda bisa mendapatkan list data Notifikasi Saya.

Example request:
curl --request GET \
    --get "https://apidev.erunix.id/api/driver-notifications?search=...&page[number]=1&page[size]=2&sort=created_at" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json"
const url = new URL(
    "https://apidev.erunix.id/api/driver-notifications"
);

const params = {
    "search": "...",
    "page[number]": "1",
    "page[size]": "2",
    "sort": "created_at",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://apidev.erunix.id/api/driver-notifications',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search'=> '...',
            'page[number]'=> '1',
            'page[size]'=> '2',
            'sort'=> 'created_at',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/driver-notifications

Query Parameters

search  string optional  

Mencari data Notifikasi Saya.

page[number]  string optional  

Menyesuaikan URI paginator.

page[size]  string optional  

Menyesuaikan jumlah data yang ditampilkan.

sort  string optional  

Menyortir data ( key_name / -key_name ), default -created_at.

Firebase

Memperbaharui device token.

requires authentication

Example request:
curl --request POST \
    "https://apidev.erunix.id/api/firebase/device-token" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data "{
    \"device_token\": \"cSN1fH...\"
}"
const url = new URL(
    "https://apidev.erunix.id/api/firebase/device-token"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "Content-Type": "application/json",
};

let body = {
    "device_token": "cSN1fH..."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://apidev.erunix.id/api/firebase/device-token',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'device_token' => 'cSN1fH...',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
 "message": "Berhasil memperbaharui device token.",
}
 

Request      

POST api/firebase/device-token

Body Parameters

device_token  string  

device token.

GeoFance

Aktif Geo Fence.

requires authentication

Example request:
curl --request GET \
    --get "https://apidev.erunix.id/api/geofence/active" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json"
const url = new URL(
    "https://apidev.erunix.id/api/geofence/active"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://apidev.erunix.id/api/geofence/active',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/geofence/active

Store current Coordinate.

requires authentication

Example request:
curl --request POST \
    "https://apidev.erunix.id/api/geofence/cordinate" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data "{
    \"manifest_id\": 1,
    \"latitude\": \"3123\",
    \"longitude\": \"1231\"
}"
const url = new URL(
    "https://apidev.erunix.id/api/geofence/cordinate"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "Content-Type": "application/json",
};

let body = {
    "manifest_id": 1,
    "latitude": "3123",
    "longitude": "1231"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://apidev.erunix.id/api/geofence/cordinate',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'manifest_id' => 1,
            'latitude' => '3123',
            'longitude' => '1231',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/geofence/cordinate

Body Parameters

manifest_id  integer  

catatan.

latitude  string  

catatan.

longitude  string  

catatan.

Update Status Geofance to 1.

requires authentication

Example request:
curl --request POST \
    "https://apidev.erunix.id/api/geofence/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data "{
    \"manifest_id\": 1,
    \"latitude\": \"3123\",
    \"longitude\": \"1231\"
}"
const url = new URL(
    "https://apidev.erunix.id/api/geofence/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "Content-Type": "application/json",
};

let body = {
    "manifest_id": 1,
    "latitude": "3123",
    "longitude": "1231"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://apidev.erunix.id/api/geofence/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'manifest_id' => 1,
            'latitude' => '3123',
            'longitude' => '1231',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/geofence/{traffic_monitoring}

URL Parameters

traffic_monitoring  integer  

valid id traffic_monitoring. Defaults to 'id'.

Body Parameters

manifest_id  integer  

catatan.

latitude  string  

catatan.

longitude  string  

catatan.

Order Saya

Memperbaharui Trafic Monitoring.

requires authentication

Example request:
curl --request POST \
    "https://apidev.erunix.id/api/orders/tm/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --data "{
    \"image\": \"path...\",
    \"note\": \"...\",
    \"location\": \"31.2467601,29.9020376\"
}"
const url = new URL(
    "https://apidev.erunix.id/api/orders/tm/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
    "Content-Type": "application/json",
};

let body = {
    "image": "path...",
    "note": "...",
    "location": "31.2467601,29.9020376"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://apidev.erunix.id/api/orders/tm/1',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
            'Content-Type' => 'application/json',
        ],
        'json' => [
            'image' => 'path...',
            'note' => '...',
            'location' => '31.2467601,29.9020376',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

POST api/orders/tm/{traffic_monitoring}

URL Parameters

traffic_monitoring  integer  

valid id traffic_monitoring. Defaults to 'id'.

Body Parameters

image  string optional  

gambar.

note  string  

catatan.

location  string optional  

lokasi (lat, long).

Mendapatkan list data Order Saya.

requires authentication

Dibagian ini Anda bisa mendapatkan list data Order Saya.

Example request:
curl --request GET \
    --get "https://apidev.erunix.id/api/my-orders?search=...&done=...&page[number]=1&page[size]=2&sort=created_at" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json"
const url = new URL(
    "https://apidev.erunix.id/api/my-orders"
);

const params = {
    "search": "...",
    "done": "...",
    "page[number]": "1",
    "page[size]": "2",
    "sort": "created_at",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://apidev.erunix.id/api/my-orders',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
        'query' => [
            'search'=> '...',
            'done'=> '...',
            'page[number]'=> '1',
            'page[size]'=> '2',
            'sort'=> 'created_at',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/my-orders

Query Parameters

search  string optional  

Mencari data Order Saya.

done  string optional  

filter berdasarkan order selesai (options : true, false).

page[number]  string optional  

Menyesuaikan URI paginator.

page[size]  string optional  

Menyesuaikan jumlah data yang ditampilkan.

sort  string optional  

Menyortir data ( key_name / -key_name ), default -created_at.

Mendapatkan Detail Order.

requires authentication

Example request:
curl --request GET \
    --get "https://apidev.erunix.id/api/my-orders/16" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json"
const url = new URL(
    "https://apidev.erunix.id/api/my-orders/16"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://apidev.erunix.id/api/my-orders/16',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/my-orders/{manifest_id}

URL Parameters

manifest_id  integer  

The ID of the manifest.

manifest  integer  

valid id manifest. Defaults to 'id'.

Mendapatkan timewindows.

requires authentication

Example request:
curl --request GET \
    --get "https://apidev.erunix.id/api/my-orders/timewindows/18" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Accept: application/json"
const url = new URL(
    "https://apidev.erunix.id/api/my-orders/timewindows/18"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://apidev.erunix.id/api/my-orders/timewindows/18',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request      

GET api/my-orders/timewindows/{manifest_id}

URL Parameters

manifest_id  integer  

The ID of the manifest.

manifest  integer  

valid id manifest. Defaults to 'id'.

Server

Ping the server.

Example request:
curl --request GET \
    --get "https://apidev.erunix.id/api/ping" \
    --header "Accept: application/json"
const url = new URL(
    "https://apidev.erunix.id/api/ping"
);

const headers = {
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://apidev.erunix.id/api/ping',
    [
        'headers' => [
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
 

{
    "status": "ok",
    "timestamp": "2025-06-22T10:40:56.910249Z",
    "host": "127.0.0.1"
}
 

Request      

GET api/ping