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]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
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]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.