MENU navbar-image

Introduction


Dokumentasi lengkap API Smart - Solusi API untuk aplikasi Sales dan Smart

Pastikan saat melakukan request menambahkan bearer token di header and, token di dapatkan dari return api login "api_token"

Authenticating requests

This API is not authenticated.

Auth

"token": ""

Login

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"api@pmpsmart.com\",
    \"password\": \"*****\"
}"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/auth/login"
);

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

let body = {
    "email": "api@pmpsmart.com",
    "password": "*****"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Submit Login berhasil",
"data": [data]
}
 

Request      

POST api/v1/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   email   

email pengguna. Example: api@pmpsmart.com

password   string   

Password pengguna. Example: *****

Logout

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/auth/logout" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/auth/logout"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Logout berhasil",
"data": [data]
}
 

Request      

POST api/v1/auth/logout

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Json Data

Insert JSON Order

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/json/order" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"kode_order\": \"PMP-3903001\",
    \"json_data\": \"{\\\"key\\\": \\\"value\\\"}\",
    \"status\": \"completed\"
}"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/json/order"
);

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

let body = {
    "kode_order": "PMP-3903001",
    "json_data": "{\"key\": \"value\"}",
    "status": "completed"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Kode outlet berhasil diperbarui",
"data": {
"id": 1,
"kode_outlet": "OUT-001",
"nama_outlet": "Outlet A",
"alamat": "Jl. Contoh No.1",
"created_at": "2024-01-01T00:00:00",
"updated_at": "2024-01-01T00:00:00"
}
 

Request      

POST api/v1/json/order

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

kode_order   string   

ID order. Example: PMP-3903001

json_data   string   

JSON data. Example: {"key": "value"}

status   string   

Status order. Example: completed

Update JSON Order

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/json/order/update" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"kode_order\": \"PMP-3903001\",
    \"json_data\": \"{\\\"key\\\": \\\"value\\\"}\",
    \"status\": \"completed\"
}"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/json/order/update"
);

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

let body = {
    "kode_order": "PMP-3903001",
    "json_data": "{\"key\": \"value\"}",
    "status": "completed"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Kode outlet berhasil diperbarui",
"data": {
"id": 1,
"kode_outlet": "OUT-001",
"nama_outlet": "Outlet A",
"alamat": "Jl. Contoh No.1",
"created_at": "2024-01-01T00:00:00",
"updated_at": "2024-01-01T00:00:00"
}
 

Request      

POST api/v1/json/order/update

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

kode_order   string   

ID order. Example: PMP-3903001

json_data   string   

JSON data. Example: {"key": "value"}

status   string   

Status order. Example: completed

Filter JSON Order

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/json/order/get/filter" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"search\": \"PMP-3903001\",
    \"kode_order\": \"veniam\",
    \"status\": \"completed\",
    \"status_order\": \"soluta\",
    \"start_date\": \"2026-05-01\",
    \"end_date\": \"2026-05-31\"
}"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/json/order/get/filter"
);

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

let body = {
    "search": "PMP-3903001",
    "kode_order": "veniam",
    "status": "completed",
    "status_order": "soluta",
    "start_date": "2026-05-01",
    "end_date": "2026-05-31"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Data JSON order berhasil diambil",
"data": [data]
}
 

Request      

POST api/v1/json/order/get/filter

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

search   string  optional  

Filter by kode order. Example: PMP-3903001

kode_order   string  optional  

Example: veniam

status   string  optional  

Filter status order. Example: completed

status_order   string  optional  

Example: soluta

start_date   date  optional  

Filter tanggal order mulai (Y-m-d). Example: 2026-05-01

end_date   date  optional  

Filter tanggal order akhir (Y-m-d). Example: 2026-05-31

Master Data

List Outlet

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/master/outlet" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/master/outlet"
);

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

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Logout berhasil",
"data": [data]
}
 

Request      

POST api/v1/master/outlet

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Update Kode Outlet

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/master/outlet/update" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id_outlet\": \"88\",
    \"kode_outlet\": \"OUT-001\"
}"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/master/outlet/update"
);

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

let body = {
    "id_outlet": "88",
    "kode_outlet": "OUT-001"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Kode outlet berhasil diperbarui",
"data": {
"id": 1,
"kode_outlet": "OUT-001",
"nama_outlet": "Outlet A",
"alamat": "Jl. Contoh No.1",
"created_at": "2024-01-01T00:00:00",
"updated_at": "2024-01-01T00:00:00"
}
 

Request      

POST api/v1/master/outlet/update

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

id_outlet   string   

ID outlet. Example: 88

kode_outlet   string   

Kode outlet baru. Example: OUT-001

Order

List Order

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/order" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"pending\",
    \"date_order\": \"2026-02-02\",
    \"user_id\": 1,
    \"outlet_id\": 1
}"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/order"
);

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

let body = {
    "status": "pending",
    "date_order": "2026-02-02",
    "user_id": 1,
    "outlet_id": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Data order berhasil diambil",
"data": [data]
}
 

Request      

POST api/v1/order

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

status   string  optional  

Filter by status order. Example: pending

date_order   date  optional  

Filter by order date (Y-m-d). Example: 2026-02-02

user_id   integer  optional  

Filter by user ID. Example: 1

outlet_id   integer  optional  

Filter by outlet ID. Example: 1

Update Status

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/order/update" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": 198,
    \"status\": \"open,pending,complete,cancel\"
}"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/order/update"
);

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

let body = {
    "order_id": 198,
    "status": "open,pending,complete,cancel"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Data order berhasil diupdate",
"data": [data]
}
 

Request      

POST api/v1/order/update

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

order_id   integer  optional  

Order ID. Example: 198

status   string  optional  

Status order. Example: open,pending,complete,cancel

Detail Order

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/order/detail" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"order_id\": 198
}"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/order/detail"
);

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

let body = {
    "order_id": 198
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Data order berhasil diambil",
"data": [data]
}
 

Request      

POST api/v1/order/detail

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

order_id   integer  optional  

Filter by order ID. Example: 198

User

List User Sales

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/user/sales" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Ferryanto\"
}"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/user/sales"
);

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

let body = {
    "name": "Ferryanto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Data order berhasil diambil",
"data": [data]
}
 

Request      

POST api/v1/user/sales

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string  optional  

Filter by nama sales. Example: Ferryanto

Visit

List Visit

Example request:
curl --request POST \
    "https://api.pmpsmart.com/api/v1/visit" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Ferryanto\"
}"
const url = new URL(
    "https://api.pmpsmart.com/api/v1/visit"
);

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

let body = {
    "name": "Ferryanto"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
"status": success,
"message": "Data order berhasil diambil",
"data": [data]
}
 

Request      

POST api/v1/visit

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string  optional  

Filter by nama sales. Example: Ferryanto