MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

Absensi

Create

Example request:
curl --request POST \
    "https://api.salesync.id/api/absensi/create" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "latitude=architecto"\
    --form "longitude=architecto"\
    --form "note=architecto"\
    --form "image_path=@/tmp/phpZx0DEC" 
const url = new URL(
    "https://api.salesync.id/api/absensi/create"
);

const headers = {
    "Authorization": "Bearer {access_token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('latitude', 'architecto');
body.append('longitude', 'architecto');
body.append('note', 'architecto');
body.append('image_path', document.querySelector('input[name="image_path"]').files[0]);

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

Example response (200):


{
    "status": true,
    "message": "Check in berhasil",
    "data": {}
}
 

Request      

POST api/absensi/create

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

latitude   string   

Latitude Example: architecto

longitude   string   

Longitude Example: architecto

note   string   

Note Example: architecto

image_path   file   

Bukti foto (max: 2MB, mimes: jpeg,png,jpg) Example: /tmp/phpZx0DEC

Riwayat Absensi

Example request:
curl --request POST \
    "https://api.salesync.id/api/absensi/history" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/absensi/history"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data riwayat absensi berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/absensi/history

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Auth User

Register

Example request:
curl --request POST \
    "https://api.salesync.id/api/auth/signup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Ferryanto\",
    \"password\": \"12345678\",
    \"phone\": \"081**********\",
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "https://api.salesync.id/api/auth/signup"
);

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

let body = {
    "name": "Ferryanto",
    "password": "12345678",
    "phone": "081**********",
    "email": "[email protected]"
};

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

Example response (200):


{
"status": true,
"message": "Register berhasil, silahkan cek email untuk aktivasi akun!",
"data": {
"name": "Ferryanto",
"email": "[email protected]",
"updated_at": "2025-05-13T07:03:27.000000Z",
"created_at": "2025-05-13T07:03:27.000000Z",
}
}
 

Request      

POST api/auth/signup

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Name Lengkap pengguna. Example: Ferryanto

password   string   

Password pengguna. Example: 12345678

phone   phone   

Phone pengguna. Example: 081**********

email   string   

Email yang digunakan untuk login. Example: [email protected]

Login

Example request:
curl --request POST \
    "https://api.salesync.id/api/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"12345678\",
    \"user_type\": \"sales\",
    \"fcm_id\": \"architecto\"
}"
const url = new URL(
    "https://api.salesync.id/api/auth/login"
);

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

let body = {
    "email": "[email protected]",
    "password": "12345678",
    "user_type": "sales",
    "fcm_id": "architecto"
};

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

Example response (200):


{
    "status": true,
    "message": "Login berhasil",
    "data": {
        "access_token": "3|TRPogkc1j9nkIAq84wglKFIzPnfX7zRmQgzCoRjB27862b47",
        "token_type": "Bearer",
        "user": {
            "uuid": "b619b640-d77d-46e3-a67a-f6ab06afe4ae",
            "name": "Ferryanto",
            "email": "[email protected]",
            "phone": null,
            "active": true,
            "email_verified_at": "2025-05-13T07:03:27.000000Z",
            "bearer_token": null,
            "created_at": "2025-05-13T07:03:27.000000Z",
            "updated_at": "2025-05-13T07:03:27.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

POST api/auth/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Email User. Example: [email protected]

password   string   

Password User. Example: 12345678

user_type   string  optional  

optional Tipe user: sales atau customer. Example: sales

fcm_id   string  optional  

optional FCM ID untuk user sales. Example: architecto

Validasi OTP Login

Example request:
curl --request POST \
    "https://api.salesync.id/api/auth/validasiotp" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"otp\": \"1234\"
}"
const url = new URL(
    "https://api.salesync.id/api/auth/validasiotp"
);

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

let body = {
    "otp": "1234"
};

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

Example response (200):


{
    "status": true,
    "message": "Terima kasih, validasi berhasil",
    "data": {
        "uuid": "b619b640-d77d-46e3-a67a-f6ab06afe4ae",
        "name": "Ferryanto",
        "email": "[email protected]",
        "phone": null,
        "active": false,
        "email_verified_at": null,
        "bearer_token": null,
        "created_at": "2025-05-13T07:03:27.000000Z",
        "updated_at": "2025-05-13T07:03:27.000000Z",
        "deleted_at": null
    }
}
 

Request      

POST api/auth/validasiotp

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

otp   numeric   

Kode Validasi (4 Digit). Example: 1234

Resent OTP Login

Example request:
curl --request POST \
    "https://api.salesync.id/api/auth/resend/otp" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/auth/resend/otp"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Terima kasih, kode validasi berhasil terikirim",
    "data": 1234
}
 

Request      

POST api/auth/resend/otp

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Request Reset Password OTP

Example request:
curl --request POST \
    "https://api.salesync.id/api/auth/forgot" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "https://api.salesync.id/api/auth/forgot"
);

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

let body = {
    "email": "[email protected]"
};

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

Example response (200):


{
    "status": true,
    "message": "Terima kasih, kode OTP berhasil dikirim",
    "data": 1234
}
 

Request      

POST api/auth/forgot

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Email yang digunakan untuk login. Example: [email protected]

Validasi Reset Password OTP

Example request:
curl --request POST \
    "https://api.salesync.id/api/auth/validasiforgot" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"otp\": \"1234\",
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "https://api.salesync.id/api/auth/validasiforgot"
);

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

let body = {
    "otp": "1234",
    "email": "[email protected]"
};

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

Example response (200):


{
    "status": true,
    "message": "Kode OTP Valid. Silahkan login dengan password baru anda",
    "data": {
        "otp": 1234,
        "created_at": "2025-05-13T12:15:56.000000Z"
    }
}
 

Request      

POST api/auth/validasiforgot

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

otp   numeric   

Kode Validasi (4 Digit). Example: 1234

email   string   

Email yang digunakan pengguna. Example: [email protected]

Update Password

Example request:
curl --request POST \
    "https://api.salesync.id/api/auth/newpassword" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"password\": \"*********\",
    \"cpassword\": \"*********\"
}"
const url = new URL(
    "https://api.salesync.id/api/auth/newpassword"
);

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

let body = {
    "password": "*********",
    "cpassword": "*********"
};

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

Example response (200):


{
    "status": true,
    "message": "Terima kasih, password berhasil diganti",
    "data": {
        "otp": 1234,
        "created_at": "2025-05-13T12:15:56.000000Z"
    }
}
 

Request      

POST api/auth/newpassword

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

password   password   

Password baru pengguna. Example: *********

cpassword   password   

Ulangi Password baru pengguna. Example: *********

Logout

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

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

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

Example response (200):


{
  "id": 1,
}
 

Request      

POST api/auth/logout

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Register

Example request:
curl --request POST \
    "https://api.salesync.id/api/auth/web/signup" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Ferryanto\",
    \"password\": \"12345678\",
    \"phone\": \"081**********\",
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "https://api.salesync.id/api/auth/web/signup"
);

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

let body = {
    "name": "Ferryanto",
    "password": "12345678",
    "phone": "081**********",
    "email": "[email protected]"
};

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

Example response (200):


{
"status": true,
"message": "Register berhasil, silahkan cek email untuk aktivasi akun!",
"data": {
"name": "Ferryanto",
"email": "[email protected]",
"updated_at": "2025-05-13T07:03:27.000000Z",
"created_at": "2025-05-13T07:03:27.000000Z",
}
}
 

Request      

POST api/auth/web/signup

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Name Lengkap pengguna. Example: Ferryanto

password   string   

Password pengguna. Example: 12345678

phone   phone   

Phone pengguna. Example: 081**********

email   string   

Email yang digunakan untuk login. Example: [email protected]

Login

Example request:
curl --request POST \
    "https://api.salesync.id/api/auth/web/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"12345678\",
    \"user_type\": \"sales\",
    \"fcm_id\": \"architecto\"
}"
const url = new URL(
    "https://api.salesync.id/api/auth/web/login"
);

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

let body = {
    "email": "[email protected]",
    "password": "12345678",
    "user_type": "sales",
    "fcm_id": "architecto"
};

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

Example response (200):


{
    "status": true,
    "message": "Login berhasil",
    "data": {
        "access_token": "3|TRPogkc1j9nkIAq84wglKFIzPnfX7zRmQgzCoRjB27862b47",
        "token_type": "Bearer",
        "user": {
            "uuid": "b619b640-d77d-46e3-a67a-f6ab06afe4ae",
            "name": "Ferryanto",
            "email": "[email protected]",
            "phone": null,
            "active": true,
            "email_verified_at": "2025-05-13T07:03:27.000000Z",
            "bearer_token": null,
            "created_at": "2025-05-13T07:03:27.000000Z",
            "updated_at": "2025-05-13T07:03:27.000000Z",
            "deleted_at": null
        }
    }
}
 

Request      

POST api/auth/web/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Email User. Example: [email protected]

password   string   

Password User. Example: 12345678

user_type   string  optional  

optional Tipe user: sales atau customer. Example: sales

fcm_id   string  optional  

optional FCM ID untuk user sales. Example: architecto

Request Reset Password OTP

Example request:
curl --request POST \
    "https://api.salesync.id/api/auth/web/forgot" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "https://api.salesync.id/api/auth/web/forgot"
);

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

let body = {
    "email": "[email protected]"
};

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

Example response (200):


{
    "status": true,
    "message": "Terima kasih, kode OTP berhasil dikirim",
    "data": 1234
}
 

Request      

POST api/auth/web/forgot

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Email yang digunakan untuk login. Example: [email protected]

Basic

Berita

Example request:
curl --request POST \
    "https://api.salesync.id/api/basic/berita" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/basic/berita"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/basic/berita

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Kota

Example request:
curl --request POST \
    "https://api.salesync.id/api/basic/kota" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"provinsi_id\": \"architecto\"
}"
const url = new URL(
    "https://api.salesync.id/api/basic/kota"
);

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

let body = {
    "provinsi_id": "architecto"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/basic/kota

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

provinsi_id   string   

Example: architecto

Provinsi

Example request:
curl --request POST \
    "https://api.salesync.id/api/basic/provinsi" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/basic/provinsi"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/basic/provinsi

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Satuan

Example request:
curl --request POST \
    "https://api.salesync.id/api/basic/satuan" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/basic/satuan"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/basic/satuan

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get Token Fcm

Example request:
curl --request POST \
    "https://api.salesync.id/api/basic/fcm/token" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fcm_id\": \"architecto\"
}"
const url = new URL(
    "https://api.salesync.id/api/basic/fcm/token"
);

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

let body = {
    "fcm_id": "architecto"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/basic/fcm/token

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

fcm_id   string   

FCM ID Example: architecto

Category

Example request:
curl --request POST \
    "https://api.salesync.id/api/basic/category" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/basic/category"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/basic/category

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Endpoints

GET api/welcome

Example request:
curl --request GET \
    --get "https://api.salesync.id/api/welcome" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/welcome"
);

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

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

Example response (503):

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

{
    "message": "Service Unavailable"
}
 

Request      

GET api/welcome

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Home

Activity

Example request:
curl --request POST \
    "https://api.salesync.id/api/home/activity" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/home/activity"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/home/activity

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Visit Hari Ini

Example request:
curl --request POST \
    "https://api.salesync.id/api/home/visit/today" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/home/visit/today"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/home/visit/today

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Tugas

Example request:
curl --request POST \
    "https://api.salesync.id/api/home/tasks" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/home/tasks"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/home/tasks

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Konfigurasi

General

Example request:
curl --request POST \
    "https://api.salesync.id/api/account/konfigurasi" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=architecto"\
    --form "alamat=Jl raya sini aja"\
    --form "kota=Surabaya"\
    --form "phone=08123456789"\
    --form "[email protected]"\
    --form "rek_1=1234567890"\
    --form "rek_2=1234567890"\
    --form "logo=@/tmp/phpRVQ31d" \
    --form "qris=@/tmp/php9pzpBX" 
const url = new URL(
    "https://api.salesync.id/api/account/konfigurasi"
);

const headers = {
    "Authorization": "Bearer {access_token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'architecto');
body.append('alamat', 'Jl raya sini aja');
body.append('kota', 'Surabaya');
body.append('phone', '08123456789');
body.append('email', '[email protected]');
body.append('rek_1', '1234567890');
body.append('rek_2', '1234567890');
body.append('logo', document.querySelector('input[name="logo"]').files[0]);
body.append('qris', document.querySelector('input[name="qris"]').files[0]);

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/account/konfigurasi

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

Example: architecto

alamat   string   

alamat anda. Example: Jl raya sini aja

logo   file   

Logo Anda max 2MB anda (png,jpg,jpeg) Example: /tmp/phpRVQ31d

qris   file   

QRIS Anda max 2MB anda (png,jpg,jpeg) Example: /tmp/php9pzpBX

kota   string   

kota anda. Example: Surabaya

phone   string   

phone anda. Example: 08123456789

email   string   

email anda. Example: [email protected]

rek_1   string  optional  

rekening 1 order. Example: 1234567890

rek_2   string  optional  

rekening 2 order. Example: 1234567890

My General

Example request:
curl --request POST \
    "https://api.salesync.id/api/account/konfigurasi/get" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/account/konfigurasi/get"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/account/konfigurasi/get

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Outlet

List Outlet

Example request:
curl --request POST \
    "https://api.salesync.id/api/outlet" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"keyword\": \"Toko\"
}"
const url = new URL(
    "https://api.salesync.id/api/outlet"
);

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

let body = {
    "keyword": "Toko"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/outlet

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

keyword   string  optional  

Keyword outlet. Example: Toko

Add Outlet

Example request:
curl --request POST \
    "https://api.salesync.id/api/outlet/create" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=Toko Zainal"\
    --form "kota=Surabaya"\
    --form "phone=08123456789"\
    --form "latitude=6.12093884"\
    --form "longitude=112.98093884"\
    --form "distributor_id=1"\
    --form "tipe=Toko"\
    --form "address=Jl. Raya No. 1"\
    --form "note=Toko baru buka jam 10"\
    --form "pic=Pak Zainal"\
    --form "path_image=@/tmp/phpkxXhTm" 
const url = new URL(
    "https://api.salesync.id/api/outlet/create"
);

const headers = {
    "Authorization": "Bearer {access_token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'Toko Zainal');
body.append('kota', 'Surabaya');
body.append('phone', '08123456789');
body.append('latitude', '6.12093884');
body.append('longitude', '112.98093884');
body.append('distributor_id', '1');
body.append('tipe', 'Toko');
body.append('address', 'Jl. Raya No. 1');
body.append('note', 'Toko baru buka jam 10');
body.append('pic', 'Pak Zainal');
body.append('path_image', document.querySelector('input[name="path_image"]').files[0]);

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil ditambahkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Example response (403):


{
    "status": false,
    "message": "Akses ini hanya untuk user sales",
    "data": null
}
 

Request      

POST api/outlet/create

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

Nama Outlet. Example: Toko Zainal

kota   string  optional  

ID Kota. Example: Surabaya

path_image   file   

Foto Outlet max 2MB outlet (png,jpg,jpeg) Example: /tmp/phpkxXhTm

phone   string  optional  

No HP outlet. Example: 08123456789

latitude   number   

Latitude. Example: 6.12093884

longitude   number   

Longitude. Example: 112.98093884

distributor_id   integer  optional  

Example: 1

tipe   string   

Tipe Outlet. Example: Toko

address   string  optional  

Alamat outlet. Example: Jl. Raya No. 1

note   string  optional  

Catatan Outlet. Example: Toko baru buka jam 10

pic   string  optional  

Nama PIC. Example: Pak Zainal

Edit Outlet

Example request:
curl --request POST \
    "https://api.salesync.id/api/outlet/edit" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=Toko Zainal"\
    --form "uuid=9023-kwoier-1234-oiqweu"\
    --form "latitude=6.12093884"\
    --form "longitude=112.98093884"\
    --form "distributor_id=1"\
    --form "kota_id=1"\
    --form "tipe_id=1"\
    --form "address=Jl. Raya No. 1"\
    --form "kodepos=60123"\
    --form "phone=08123456789"\
    --form "note=Toko baru buka jam 10"\
    --form "pic=Pak Zainal"\
    --form "path_image=@/tmp/phps2tB1c" 
const url = new URL(
    "https://api.salesync.id/api/outlet/edit"
);

const headers = {
    "Authorization": "Bearer {access_token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'Toko Zainal');
body.append('uuid', '9023-kwoier-1234-oiqweu');
body.append('latitude', '6.12093884');
body.append('longitude', '112.98093884');
body.append('distributor_id', '1');
body.append('kota_id', '1');
body.append('tipe_id', '1');
body.append('address', 'Jl. Raya No. 1');
body.append('kodepos', '60123');
body.append('phone', '08123456789');
body.append('note', 'Toko baru buka jam 10');
body.append('pic', 'Pak Zainal');
body.append('path_image', document.querySelector('input[name="path_image"]').files[0]);

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil ditambahkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/outlet/edit

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

Nama Outlet. Example: Toko Zainal

uuid   string   

UUID Outlet. Example: 9023-kwoier-1234-oiqweu

path_image   file  optional  

Foto Outlet max 2MB outlet (png,jpg,jpeg) Example: /tmp/phps2tB1c

latitude   number   

Latitude. Example: 6.12093884

longitude   number   

Longitude. Example: 112.98093884

distributor_id   integer  optional  

Example: 1

kota_id   integer   

ID Kota. Example: 1

tipe_id   integer   

Tipe Outlet. Example: 1

address   string  optional  

Alamat outlet. Example: Jl. Raya No. 1

kodepos   numeric  optional  

Kode POS Outlet. Example: 60123

phone   string  optional  

No HP outlet. Example: 08123456789

note   string  optional  

Catatan Outlet. Example: Toko baru buka jam 10

pic   string  optional  

Nama PIC. Example: Pak Zainal

Show Outlet

Example request:
curl --request POST \
    "https://api.salesync.id/api/outlet/detail" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"uuid\": \"Toko\"
}"
const url = new URL(
    "https://api.salesync.id/api/outlet/detail"
);

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

let body = {
    "uuid": "Toko"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/outlet/detail

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

uuid   string  optional  

uuid outlet. Example: Toko

Delete Outlet

Example request:
curl --request POST \
    "https://api.salesync.id/api/outlet/delete" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"uuid\": \"9023-kwoier-1234-oiqweu\"
}"
const url = new URL(
    "https://api.salesync.id/api/outlet/delete"
);

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

let body = {
    "uuid": "9023-kwoier-1234-oiqweu"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil ditambahkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/outlet/delete

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

uuid   string   

UUID Outlet. Example: 9023-kwoier-1234-oiqweu

Performance

Dashboard Performance

Example request:
curl --request POST \
    "https://api.salesync.id/api/performa/dashboard?period=today" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"period\": \"month\"
}"
const url = new URL(
    "https://api.salesync.id/api/performa/dashboard"
);

const params = {
    "period": "today",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

let body = {
    "period": "month"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/performa/dashboard

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

period   string   

Period type. Example: today

Body Parameters

period   string   

Example: month

Must be one of:
  • today
  • week
  • month

Pesanan

Create

Example request:
curl --request POST \
    "https://api.salesync.id/api/pesanan/create" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"outlet_id\": \"903988948934\",
    \"items\": 9848948934,
    \"discount\": \"12345678\",
    \"subtotal\": \"12345678\",
    \"note\": \"12345678\"
}"
const url = new URL(
    "https://api.salesync.id/api/pesanan/create"
);

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

let body = {
    "outlet_id": "903988948934",
    "items": 9848948934,
    "discount": "12345678",
    "subtotal": "12345678",
    "note": "12345678"
};

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

Example response (200):


{
"status": true,
"message": "Pesanan berhasil dibuat!",
"data": {
"uuid": "b619b640-d77d-46e3-a67a-f6ab06afe4ae",
"code": "SSOR-12345678",
"updated_at": "2025-05-13T07:03:27.000000Z",
"created_at": "2025-05-13T07:03:27.000000Z",
}
}
 

Request      

POST api/pesanan/create

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

outlet_id   string   

ID Outlet. Example: 903988948934

items   string[]   

Array of items. Example: 9848948934

product_id   string   

The id of an existing record in the products table. Example: architecto

quantity   integer   

validation.min. Example: 22

discount   string   

Diskon. Example: 12345678

subtotal   string   

Subtotal. Example: 12345678

note   string   

Catatan pengguna. Example: 12345678

List Pesanan

Example request:
curl --request POST \
    "https://api.salesync.id/api/pesanan" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/pesanan"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/pesanan

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Show Pesanan

Example request:
curl --request POST \
    "https://api.salesync.id/api/pesanan/detail" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"uuid\": \"12345678\"
}"
const url = new URL(
    "https://api.salesync.id/api/pesanan/detail"
);

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

let body = {
    "uuid": "12345678"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/pesanan/detail

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

uuid   string   

UUID Pesanan. Example: 12345678

Update Status Pesanan Status hanya bisa maju sesuai alur: pending -> diproses -> dikirim -> selesai, atau dibatalkan selama order belum dikirim (pending / diproses).

Example request:
curl --request POST \
    "https://api.salesync.id/api/pesanan/status" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"uuid\": \"b619b640-d77d-46e3-a67a-f6ab06afe4ae\",
    \"status\": \"diproses\",
    \"note\": \"Pesanan sedang disiapkan gudang\"
}"
const url = new URL(
    "https://api.salesync.id/api/pesanan/status"
);

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

let body = {
    "uuid": "b619b640-d77d-46e3-a67a-f6ab06afe4ae",
    "status": "diproses",
    "note": "Pesanan sedang disiapkan gudang"
};

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

Example response (200):


{
    "status": true,
    "message": "Status pesanan berhasil diperbarui",
    "data": {}
}
 

Request      

POST api/pesanan/status

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

uuid   string   

UUID Pesanan. Example: b619b640-d77d-46e3-a67a-f6ab06afe4ae

status   string   

Status baru (diproses, dikirim, selesai, dibatalkan). Example: diproses

note   string   

Catatan update status. Example: Pesanan sedang disiapkan gudang

Plan

List Plan

Example request:
curl --request POST \
    "https://api.salesync.id/api/plan" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/plan"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/plan

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Product

List Product

Example request:
curl --request POST \
    "https://api.salesync.id/api/product" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/product"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/product

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Add Product

Example request:
curl --request POST \
    "https://api.salesync.id/api/product/create" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "name=LED 5 watt"\
    --form "category_id=1333"\
    --form "sku=LED-5-watt"\
    --form "description=LED 5 watt"\
    --form "price=10000"\
    --form "path_image=@/tmp/php2KlX9v" 
const url = new URL(
    "https://api.salesync.id/api/product/create"
);

const headers = {
    "Authorization": "Bearer {access_token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('name', 'LED 5 watt');
body.append('category_id', '1333');
body.append('sku', 'LED-5-watt');
body.append('description', 'LED 5 watt');
body.append('price', '10000');
body.append('path_image', document.querySelector('input[name="path_image"]').files[0]);

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil ditambahkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/product/create

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

name   string   

Nama Product. Example: LED 5 watt

category_id   string   

ID Category. Example: 1333

sku   string   

SKU Product. Example: LED-5-watt

description   string   

Deskripsi Product. Example: LED 5 watt

path_image   file   

Foto Outlet max 2MB outlet (png,jpg,jpeg) Example: /tmp/php2KlX9v

price   integer   

Harga Product. Example: 10000

Edit Product

Example request:
curl --request POST \
    "https://api.salesync.id/api/product/edit" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"LED 5 watt\",
    \"sku\": \"LED-5-watt\",
    \"description\": \"LED 5 watt\",
    \"path_image\": \"n\",
    \"price\": 10000,
    \"uuid\": \"9023-kwoier-1234-oiqweu\",
    \"kota_id\": 1
}"
const url = new URL(
    "https://api.salesync.id/api/product/edit"
);

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

let body = {
    "name": "LED 5 watt",
    "sku": "LED-5-watt",
    "description": "LED 5 watt",
    "path_image": "n",
    "price": 10000,
    "uuid": "9023-kwoier-1234-oiqweu",
    "kota_id": 1
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil ditambahkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/product/edit

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Nama Product. Example: LED 5 watt

sku   string   

SKU Product. Example: LED-5-watt

description   string   

Deskripsi Product. Example: LED 5 watt

path_image   string  optional  

validation.max. Example: n

price   integer   

Harga Product. Example: 10000

uuid   string   

UUID Product. Example: 9023-kwoier-1234-oiqweu

kota_id   integer   

ID Kota. Example: 1

Public

Data umum layout: konfigurasi perusahaan, menu navigasi, artikel terbaru dan info promo

Example request:
curl --request GET \
    --get "https://api.salesync.id/api/public/general" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/public/general"
);

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

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

Example response (503):

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

{
    "message": "Service Unavailable"
}
 

Request      

GET api/public/general

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Data halaman beranda: FAQ, testimoni dan daftar plan

Example request:
curl --request GET \
    --get "https://api.salesync.id/api/public/home" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/public/home"
);

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

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

Example response (503):

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

{
    "message": "Service Unavailable"
}
 

Request      

GET api/public/home

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Daftar plan beserta fitur, untuk halaman harga dan bandingkan plan

Example request:
curl --request GET \
    --get "https://api.salesync.id/api/public/plans" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/public/plans"
);

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

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

Example response (503):

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

{
    "message": "Service Unavailable"
}
 

Request      

GET api/public/plans

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Daftar artikel blog, 12 per halaman

Example request:
curl --request GET \
    --get "https://api.salesync.id/api/public/blogs?page=1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/public/blogs"
);

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

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

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

Example response (503):

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

{
    "message": "Service Unavailable"
}
 

Request      

GET api/public/blogs

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

Halaman. Example: 1

Detail artikel atau halaman statis berdasarkan slug (blog/{slug}, page/{slug}, tentang-kami)

Example request:
curl --request GET \
    --get "https://api.salesync.id/api/public/pages/architecto" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/public/pages/architecto"
);

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

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

Example response (503):

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

{
    "message": "Service Unavailable"
}
 

Request      

GET api/public/pages/{slug}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

slug   string   

The slug of the page. Example: architecto

Kirim form hubungi kami ke email support

Example request:
curl --request POST \
    "https://api.salesync.id/api/public/contact" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"message\": \"n\",
    \"phone\": 4326.41688,
    \"email\": \"[email protected]\",
    \"turnstile_token\": \"architecto\"
}"
const url = new URL(
    "https://api.salesync.id/api/public/contact"
);

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

let body = {
    "name": "b",
    "message": "n",
    "phone": 4326.41688,
    "email": "[email protected]",
    "turnstile_token": "architecto"
};

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

Request      

POST api/public/contact

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

validation.max. Example: b

message   string   

validation.max. Example: n

phone   number   

Example: 4326.41688

email   string   

validation.email validation.max. Example: [email protected]

turnstile_token   string   

Token Cloudflare Turnstile. Example: architecto

Ajukan trial: simpan pengajuan lalu kirim email berisi tautan pendaftaran

Example request:
curl --request POST \
    "https://api.salesync.id/api/public/trial" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"b\",
    \"email\": \"[email protected]\",
    \"turnstile_token\": \"architecto\"
}"
const url = new URL(
    "https://api.salesync.id/api/public/trial"
);

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

let body = {
    "name": "b",
    "email": "[email protected]",
    "turnstile_token": "architecto"
};

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

Request      

POST api/public/trial

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

validation.max. Example: b

email   string   

validation.email validation.max. Example: [email protected]

turnstile_token   string   

Token Cloudflare Turnstile. Example: architecto

Stok

List Stok (masuk & keluar) Ringkasan per produk: on_hand (stok fisik), reserved (dipesan order belum dikirim), available (tersedia untuk order baru).

Example request:
curl --request POST \
    "https://api.salesync.id/api/stok" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"search\": \"LED\",
    \"type\": \"masuk\",
    \"page\": 1
}"
const url = new URL(
    "https://api.salesync.id/api/stok"
);

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

let body = {
    "search": "LED",
    "type": "masuk",
    "page": 1
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/stok

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

search   string  optional  

Cari SKU, nama produk, No. PO, kode order, atau penerima. Example: LED

type   string  optional  

Filter jenis: masuk / keluar. Example: masuk

page   integer  optional  

Halaman. Example: 1

Import Stok dari file Excel File .xls / .xlsx / .csv dengan kolom: SKU, Qty, Tanggal Input, No. PO, Penerima, Tgl Terima.

Semua baris divalidasi lebih dulu; bila ada satu baris salah, tidak ada data yang disimpan.

Example request:
curl --request POST \
    "https://api.salesync.id/api/stok/import" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/php7c60MD" 
const url = new URL(
    "https://api.salesync.id/api/stok/import"
);

const headers = {
    "Authorization": "Bearer {access_token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

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

Example response (200):


{
    "status": true,
    "message": "120 baris stok berhasil diimport",
    "data": {
        "imported": 120,
        "import_batch": "b619b640-d77d-46e3-a67a-f6ab06afe4ae"
    }
}
 

Example response (422):


{
    "status": false,
    "message": "Import gagal: 2 baris tidak valid",
    "data": {
        "errors": [
            {
                "row": 3,
                "sku": "LED-5",
                "messages": [
                    "SKU tidak ditemukan"
                ]
            }
        ]
    }
}
 

Request      

POST api/stok/import

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

file   file   

File Excel stok (max 5MB). Example: /tmp/php7c60MD

Template Import Stok Unduh file .xlsx berisi judul kolom dan satu contoh baris.

Example request:
curl --request POST \
    "https://api.salesync.id/api/stok/template" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/stok/template"
);

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

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

Request      

POST api/stok/template

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Subscription

List Billing Customer

Example request:
curl --request POST \
    "https://api.salesync.id/api/subscription/billing" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/subscription/billing"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data billing berhasil didapatkan",
    "data": {}
}
 

Example response (403):


{
    "status": false,
    "message": "Akses ini hanya untuk user customer",
    "data": null
}
 

Request      

POST api/subscription/billing

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Generate Snap Token

Example request:
curl --request POST \
    "https://api.salesync.id/api/subscription/payment" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"billing_uuid\": \"6ff8f7f6-1eb3-3525-be4a-3932c805afed\"
}"
const url = new URL(
    "https://api.salesync.id/api/subscription/payment"
);

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

let body = {
    "billing_uuid": "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
};

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

Example response (200):


{
    "status": true,
    "message": "Snap token berhasil dibuat",
    "data": {
        "snap_token": "token",
        "redirect_url": "https://app.sandbox.midtrans.com/snap/v2/vtweb/token",
        "snap_js_url": "https://app.sandbox.midtrans.com/snap/snap.js",
        "client_key": "SB-Mid-client-xxx"
    }
}
 

Example response (403):


{
    "status": false,
    "message": "Akses ini hanya untuk user customer",
    "data": null
}
 

Request      

POST api/subscription/payment

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

billing_uuid   string   

UUID billing yang akan dibayar. Example: 6ff8f7f6-1eb3-3525-be4a-3932c805afed

Create Subscription Checkout seat sales untuk 1 bulan. Bila masih ada periode aktif, checkout ini menjadi perpanjangan yang mulai berlaku di akhir periode berjalan.

Example request:
curl --request POST \
    "https://api.salesync.id/api/subscription/create" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"quantity\": 5,
    \"description\": \"Eius et animi quos velit et.\"
}"
const url = new URL(
    "https://api.salesync.id/api/subscription/create"
);

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

let body = {
    "quantity": 5,
    "description": "Eius et animi quos velit et."
};

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

Example response (200):


{
    "status": true,
    "message": "Subscription berhasil dibuat",
    "data": {}
}
 

Example response (403):


{
    "status": false,
    "message": "Akses ini hanya untuk user customer",
    "data": null
}
 

Request      

POST api/subscription/create

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

quantity   integer   

Jumlah sales (seat) yang dibeli. Example: 5

description   string  optional  

Catatan billing. Example: Eius et animi quos velit et.

Status Langganan Periode berjalan, periode berikutnya yang sudah dibayar, kuota seat, dan billing pending.

Example request:
curl --request POST \
    "https://api.salesync.id/api/subscription/status" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/subscription/status"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Status langganan berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/subscription/status

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Permintaan Paket Enterprise Mengirim permintaan penawaran ke tim Salesync untuk perusahaan dengan banyak sales / kebutuhan khusus.

Example request:
curl --request POST \
    "https://api.salesync.id/api/subscription/enterprise" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"estimated_sales\": 120,
    \"phone\": \"081234567890\",
    \"message\": \"architecto\"
}"
const url = new URL(
    "https://api.salesync.id/api/subscription/enterprise"
);

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

let body = {
    "estimated_sales": 120,
    "phone": "081234567890",
    "message": "architecto"
};

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

Example response (200):


{
    "status": true,
    "message": "Permintaan berhasil dikirim, tim kami akan segera menghubungi Anda",
    "data": null
}
 

Request      

POST api/subscription/enterprise

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

estimated_sales   integer   

Perkiraan jumlah sales. Example: 120

phone   string  optional  

Nomor yang bisa dihubungi. Example: 081234567890

message   string  optional  

Kebutuhan khusus. Example: architecto

Tugas

List Tugas

Example request:
curl --request POST \
    "https://api.salesync.id/api/tugas" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/tugas"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/tugas

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

List Sales Customer

Example request:
curl --request POST \
    "https://api.salesync.id/api/tugas/sales" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/tugas/sales"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data sales berhasil didapatkan",
    "data": {}
}
 

Example response (403):


{
    "status": false,
    "message": "Akses ini hanya untuk user customer",
    "data": null
}
 

Request      

POST api/tugas/sales

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Update Target Sales

Example request:
curl --request POST \
    "https://api.salesync.id/api/tugas/sales/target" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sales_id\": \"ebe160d1-52d2-4366-8b55-9b9465878454\",
    \"target_sales\": \"10000000\"
}"
const url = new URL(
    "https://api.salesync.id/api/tugas/sales/target"
);

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

let body = {
    "sales_id": "ebe160d1-52d2-4366-8b55-9b9465878454",
    "target_sales": "10000000"
};

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

Example response (200):


{
    "status": true,
    "message": "Target sales berhasil diperbarui",
    "data": {}
}
 

Example response (403):


{
    "status": false,
    "message": "Akses ini hanya untuk user customer",
    "data": null
}
 

Example response (404):


{
    "status": false,
    "message": "Sales UUID tidak ditemukan",
    "data": null
}
 

Request      

POST api/tugas/sales/target

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

sales_id   string   

UUID sales milik customer. Example: ebe160d1-52d2-4366-8b55-9b9465878454

target_sales   numeric   

Target sales. Example: 10000000

Performa Sales

Example request:
curl --request POST \
    "https://api.salesync.id/api/tugas/sales/performa" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"uuid\": \"ebe160d1-52d2-4366-8b55-9b9465878454\"
}"
const url = new URL(
    "https://api.salesync.id/api/tugas/sales/performa"
);

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

let body = {
    "uuid": "ebe160d1-52d2-4366-8b55-9b9465878454"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Request      

POST api/tugas/sales/performa

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

uuid   string   

UUID sales milik customer. Example: ebe160d1-52d2-4366-8b55-9b9465878454

Add Tugas

Example request:
curl --request POST \
    "https://api.salesync.id/api/tugas/create" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Follow up outlet\",
    \"note\": \"Kunjungi outlet prioritas\",
    \"sales_id\": \"ebe160d1-52d2-4366-8b55-9b9465878454\",
    \"priority\": 1,
    \"due_date\": \"2026-06-04\"
}"
const url = new URL(
    "https://api.salesync.id/api/tugas/create"
);

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

let body = {
    "title": "Follow up outlet",
    "note": "Kunjungi outlet prioritas",
    "sales_id": "ebe160d1-52d2-4366-8b55-9b9465878454",
    "priority": 1,
    "due_date": "2026-06-04"
};

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

Example response (200):


{
    "status": true,
    "message": "Tugas berhasil ditambahkan",
    "data": {}
}
 

Example response (403):


{
    "status": false,
    "message": "Akses ini hanya untuk user customer",
    "data": null
}
 

Request      

POST api/tugas/create

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

title   string   

Judul tugas. Example: Follow up outlet

note   string   

Catatan tugas. Example: Kunjungi outlet prioritas

sales_id   string   

UUID sales milik customer. Example: ebe160d1-52d2-4366-8b55-9b9465878454

priority   integer  optional  

Priority tugas. Example: 1

due_date   date   

Deadline tugas. Example: 2026-06-04

Detail Tugas

Example request:
curl --request POST \
    "https://api.salesync.id/api/tugas/detail" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"uuid\": \"uuid tugas\"
}"
const url = new URL(
    "https://api.salesync.id/api/tugas/detail"
);

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

let body = {
    "uuid": "uuid tugas"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/tugas/detail

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

uuid   string  optional  

uuid tugas. Example: uuid tugas

Update Tugas

Example request:
curl --request POST \
    "https://api.salesync.id/api/tugas/update" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "status=finish"\
    --form "uuid=uuid tugas"\
    --form "path_image=@/tmp/phpZGbeqz" 
const url = new URL(
    "https://api.salesync.id/api/tugas/update"
);

const headers = {
    "Authorization": "Bearer {access_token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('status', 'finish');
body.append('uuid', 'uuid tugas');
body.append('path_image', document.querySelector('input[name="path_image"]').files[0]);

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/tugas/update

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

status   string   

status tugas. Example: finish

path_image   file   

Foto Tugas max 2MB (png,jpg,jpeg) Example: /tmp/phpZGbeqz

uuid   string  optional  

uuid tugas. Example: uuid tugas

User

Create Sales

Example request:
curl --request POST \
    "https://api.salesync.id/api/user/create" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Ferryanto\",
    \"phone\": \"081234567890\",
    \"email\": \"[email protected]\",
    \"password\": \"12345678\"
}"
const url = new URL(
    "https://api.salesync.id/api/user/create"
);

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

let body = {
    "name": "Ferryanto",
    "phone": "081234567890",
    "email": "[email protected]",
    "password": "12345678"
};

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

Example response (200):


{
    "status": true,
    "message": "Data sales berhasil ditambahkan",
    "data": {}
}
 

Example response (403):


{
    "status": false,
    "message": "Akses ini hanya untuk user customer",
    "data": null
}
 

Request      

POST api/user/create

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Nama sales. Example: Ferryanto

phone   numeric   

Nomor handphone sales. Example: 081234567890

email   string   

Email sales. Example: [email protected]

password   string  optional  

Password sales default 12345678. Example: 12345678

Visit

Check In Visit

Example request:
curl --request POST \
    "https://api.salesync.id/api/visit/create" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "outlet_id=1234"\
    --form "note=LED-5-watt"\
    --form "path_image=@/tmp/phpnNc11O" 
const url = new URL(
    "https://api.salesync.id/api/visit/create"
);

const headers = {
    "Authorization": "Bearer {access_token}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('outlet_id', '1234');
body.append('note', 'LED-5-watt');
body.append('path_image', document.querySelector('input[name="path_image"]').files[0]);

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil ditambahkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/visit/create

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

outlet_id   string   

UUID Outlet. Example: 1234

note   string   

Note Outlet. Example: LED-5-watt

path_image   file   

Foto Outlet max 2MB outlet (png,jpg,jpeg) Example: /tmp/phpnNc11O

List Visit

Example request:
curl --request POST \
    "https://api.salesync.id/api/visit" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://api.salesync.id/api/visit"
);

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

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/visit

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Detail Visit

Example request:
curl --request POST \
    "https://api.salesync.id/api/visit/detail" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"outlet_uuid\": \"1234\"
}"
const url = new URL(
    "https://api.salesync.id/api/visit/detail"
);

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

let body = {
    "outlet_uuid": "1234"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/visit/detail

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

outlet_uuid   string   

UUID Outlet. Example: 1234

Checkout Visit

Example request:
curl --request POST \
    "https://api.salesync.id/api/visit/update" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"outlet_uuid\": \"1234\"
}"
const url = new URL(
    "https://api.salesync.id/api/visit/update"
);

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

let body = {
    "outlet_uuid": "1234"
};

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

Example response (200):


{
    "status": true,
    "message": "Data berhasil didapatkan",
    "data": {}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/visit/update

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

outlet_uuid   string   

UUID Outlet. Example: 1234