MENU navbar-image

Introduction


We have an extensive database of various places, including restaurants, business establishments, and hidden gems. No matter what type of place you are looking for, we can provide you with all the information you need

Base URL Staging : https://rinjani.lokalink.id/api/v1

Authenticating requests

This API is not authenticated.

Account

Get Notification

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/account/notification" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"is_read\": false
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/account/notification"
);

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

let body = {
    "is_read": false
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di dapatkan",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/account/notification

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

is_read   boolean  optional  

Sudah dibaca/belum. Example: false

Read Notification

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/account/notification/read" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"is_read\": false
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/account/notification/read"
);

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

let body = {
    "is_read": false
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di dapatkan",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/account/notification/read

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

is_read   boolean  optional  

Sudah dibaca/belum. Example: false

Request Delete Account

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/account/requestDelete" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"Menghapus akun\",
    \"otp\": \"123456\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/account/requestDelete"
);

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

let body = {
    "reason": "Menghapus akun",
    "otp": "123456"
};

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

Example response (200):


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

Request      

POST api/v1/account/requestDelete

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

reason   string   

Alasan menghapus akun. Example: Menghapus akun

otp   string   

OTP. Example: 123456

Auth Company

About Company

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/company/accountdetail" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fullname\": \"Ferryanto\",
    \"business_number\": \"081**********\",
    \"username\": \"ferryanto\",
    \"company_name\": \"PT Perusahaan\",
    \"position\": \"Manager\",
    \"company_email\": \"[email protected]\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/company/accountdetail"
);

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

let body = {
    "fullname": "Ferryanto",
    "business_number": "081**********",
    "username": "ferryanto",
    "company_name": "PT Perusahaan",
    "position": "Manager",
    "company_email": "[email protected]"
};

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

Example response (200):


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

Request      

POST api/v1/auth/company/accountdetail

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

fullname   string   

Name Lengkap pengguna. Example: Ferryanto

business_number   phone   

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

username   string   

Username pengguna. Example: ferryanto

company_name   string   

Nama Perusahaan. Example: PT Perusahaan

position   string   

Jabatan pengguna. Example: Manager

company_email   email   

Email pengguna. Example: [email protected]

Auth Personal

Register

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"081**********\",
    \"company\": true,
    \"name\": \"Ferryanto\",
    \"password\": \"Secret123456\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/register"
);

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

let body = {
    "phone": "081**********",
    "company": true,
    "name": "Ferryanto",
    "password": "Secret123456"
};

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

Example response (200):


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

Request      

POST api/v1/auth/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

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

company   boolean   

Company pengguna. Example: true

name   string   

Name Lengkap pengguna. Example: Ferryanto

password   string   

Password pengguna. Example: Secret123456

Validasi OTP Register

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/validasicode" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"081**********\",
    \"code\": \"1234\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/validasicode"
);

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

let body = {
    "phone": "081**********",
    "code": "1234"
};

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

Example response (200):


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

Request      

POST api/v1/auth/validasicode

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

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

code   string   

Kode OTP pengguna. Example: 1234

Submit Password Register

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"081**********\",
    \"password\": \"Secret123456\",
    \"cpassword\": \"Secret123456\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/password"
);

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

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

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

Example response (200):


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

Request      

POST api/v1/auth/password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

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

password   string   

Password pengguna. Example: Secret123456

cpassword   string   

Password pengguna. Example: Secret123456

Update Profile

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/updateprofile" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"081**********\",
    \"nik\": 35,
    \"fullname\": \"Ferryanto\",
    \"gender\": true,
    \"birthplace\": \"Jakarta\",
    \"birthday\": \"2000-01-01\",
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/updateprofile"
);

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

let body = {
    "phone": "081**********",
    "nik": 35,
    "fullname": "Ferryanto",
    "gender": true,
    "birthplace": "Jakarta",
    "birthday": "2000-01-01",
    "email": "[email protected]"
};

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

Example response (200):


{
"status": success,
"message": "Update profil user berhasil",
"data": [data]
}
 

Request      

POST api/v1/auth/updateprofile

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

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

nik   number   

nik pengguna. Example: 35

fullname   string   

fullname pengguna. Example: Ferryanto

gender   boolean   

gender pengguna. Example: true

birthplace   string   

birthplace pengguna. Example: Jakarta

birthday   date   

birthday pengguna. Example: 2000-01-01

email   string   

email pengguna. Example: [email protected]

Login

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"08563437495\",
    \"password\": \"zxcasd123\",
    \"fcm_id\": \"cFbJxnm_T-igJNrOB7m6os:APA91bHrRAMuReddpS9c_EnOZohtnoBn0jd5y_knsW0VB0us6X9lXpRQVSi7-QswoCvoOPnFSfEckzA771A1idIWIqBJj9GkYOmJwRBQjJ8hu1Wr5MwlYQ8\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/login"
);

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

let body = {
    "phone": "08563437495",
    "password": "zxcasd123",
    "fcm_id": "cFbJxnm_T-igJNrOB7m6os:APA91bHrRAMuReddpS9c_EnOZohtnoBn0jd5y_knsW0VB0us6X9lXpRQVSi7-QswoCvoOPnFSfEckzA771A1idIWIqBJj9GkYOmJwRBQjJ8hu1Wr5MwlYQ8"
};

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

phone   phone   

Phone pengguna. Example: 08563437495

password   string   

Password pengguna. Example: zxcasd123

fcm_id   string   

FCM ID pengguna. Example: cFbJxnm_T-igJNrOB7m6os:APA91bHrRAMuReddpS9c_EnOZohtnoBn0jd5y_knsW0VB0us6X9lXpRQVSi7-QswoCvoOPnFSfEckzA771A1idIWIqBJj9GkYOmJwRBQjJ8hu1Wr5MwlYQ8

Update Details

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/updatedetails" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"phone\": \"081**********\",
    \"name\": \"Ferryanto\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/updatedetails"
);

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

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

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

Example response (200):


{
"status": success,
"message": "Update profil user berhasil",
"data": [data]
}
 

Request      

POST api/v1/auth/updatedetails

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   email   

email pengguna. Example: [email protected]

phone   phone   

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

name   string   

name pengguna. Example: Ferryanto

Lupa Password

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/forgot" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"081**********\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/forgot"
);

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

let body = {
    "phone": "081**********"
};

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

Example response (200):


{
"status": success,
"message": "Silahkan masukkan kode verifikasi",
"data": [data]
}
 

Request      

POST api/v1/auth/forgot

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

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

Validasi OTP Forgot

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/validasiOTPForgot" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"081**********\",
    \"code\": \"1234\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/validasiOTPForgot"
);

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

let body = {
    "phone": "081**********",
    "code": "1234"
};

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

Example response (200):


{
"status": success,
"message": "Kode validasi dikenali",
"data": [data]
}
 

Request      

POST api/v1/auth/validasiOTPForgot

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

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

code   string   

Kode OTP pengguna. Example: 1234

New Password

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/newpassword" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"081**********\",
    \"password\": \"Secret123456\",
    \"cpassword\": \"Secret123456\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/newpassword"
);

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

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

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

Example response (200):


{
"status": success,
"message": "Password berhasil di update",
"data": [data]
}
 

Request      

POST api/v1/auth/newpassword

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

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

password   string   

Password pengguna. Example: Secret123456

cpassword   string   

Password pengguna. Example: Secret123456

Request OTP Auth

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/getcode" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"081**********\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/getcode"
);

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

let body = {
    "phone": "081**********"
};

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

Example response (200):


{
"status": success,
"message": "Silahkan masukkan kode verifikasi",
"data": [data]
}
 

Request      

POST api/v1/auth/getcode

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

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

Auth Staff

Login

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/staff/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"081**********\",
    \"pin\": \"1234\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/staff/login"
);

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

let body = {
    "phone": "081**********",
    "pin": "1234"
};

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

Example response (200):


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

Request      

POST api/v1/auth/staff/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

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

pin   string   

Pin pengguna. Example: 1234

Profile

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

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": success,
"message": "Data berhasil didapatkan",
"data": [data]
}
 

Request      

POST api/v1/staff/profile

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Basic

Get OTP General

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/basic/getcode" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"08563437495\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/basic/getcode"
);

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

let body = {
    "phone": "08563437495"
};

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

Example response (200):


{
"status": success,
"message": "Silahkan masukkan kode verifikasi",
"data": [data]
}
 

Request      

POST api/basic/getcode

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

Phone pengguna. Example: 08563437495

Validasi OTP General

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/basic/validasicode" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"phone\": \"081**********\",
    \"code\": \"1234\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/basic/validasicode"
);

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

let body = {
    "phone": "081**********",
    "code": "1234"
};

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

Example response (200):


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

Request      

POST api/basic/validasicode

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

phone   phone   

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

code   string   

Kode OTP pengguna. Example: 1234

Master Data Cities.

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/basic/city" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"province_id\": \"10\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/basic/city"
);

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

let body = {
    "province_id": "10"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di dapatkan",
"data": [
  {
     "id": 10,
    "state_id": 7,
   "name": "Jakarta Pusat"
},
{
  "id": 11,
 "state_id": 7,
"name": "Jakarta Timur"
},
{
  "id": 14,
 "state_id": 7,
"name": "Jakarta Selatan"
}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/basic/city

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

province_id   numeric   

Kode Provinsi . Example: 10

Master Data Provinces.

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

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": success,
"message": "Data berhasil di dapatkan",
"data": [
 {
   "id": 1,
 "name": "Jawa Timur"
},
{
  "id": 7,
"name": "DKI Jakarta"
},
{
  "id": 8,
"name": "Bali"
},
{
  "id": 9,
"name": "Daerah Istimewa Yogyakarta"
},
{
  "id": 10,
"name": "Banten"
},
{
  "id": 11,
"name": "Sumatera Utara"
}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/basic/province

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Master Data Category.

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/basic/category" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/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": success,
"message": "data berhasil di dapatkan",
"data": [data]
}
 

Request      

POST api/v1/basic/category

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Master Data Sub Category.

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

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

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

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

Example response (200):


{
"status": success,
"message": "Data berhasil di dapatkan",
"data": [
 {
    "id": 6,
    "category_id": 1,
    "name": "Dealer",
    "icon_code": "",
    "code": "DLR",
},
{
   "id": 7,
   "category_id": 1,
   "name": "Used Dealer",
   "icon_code": "",
   "code": "UDL",
},
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/basic/subcategory

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

category_id   numeric   

Kode Category . Example: architecto

Master Data Province All.

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

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": success,
"message": "Data berhasil di dapatkan",
"data": [
  {
    "id": 11,
  "provinsi_id": null,
  "name": "NANGROE ACEH DARUSSALAM"
}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/basic/provinceall

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Master Data City All.

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/basic/cityall" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"province_id\": \"10\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/basic/cityall"
);

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

let body = {
    "province_id": "10"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di dapatkan",
"data": [
  {
     "id": 11,

   "name": "Nangroe Aceh Darussalam"
}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/basic/cityall

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

province_id   numeric   

Kode Provinsi . Example: 10

Home Stats.

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

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": success,
"message": "data berhasil di dapatkan",
"data": [data]
}
 

Request      

POST api/v1/basic/homecounter

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Banner Ads.

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

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": success,
"message": "data berhasil di dapatkan",
"data": [data]
}
 

Request      

POST api/v1/basic/bannerads

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Terms and Conditions

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/basic/tnc" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"province_id\": \"10\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/basic/tnc"
);

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

let body = {
    "province_id": "10"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di dapatkan",
"data": [
  {
     "id": 11,

   "name": "Nangroe Aceh Darussalam"
}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/basic/tnc

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

province_id   numeric   

Kode Provinsi . Example: 10

Contact

Contact Us

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/basic/contact-us" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"subject\": \"Pertanyaan tentang voucher\",
    \"message\": \"Saya ingin bertanya tentang cara menggunakan voucher\",
    \"email\": \"[email protected]\",
    \"phone\": \"08123456789\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/basic/contact-us"
);

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

let body = {
    "subject": "Pertanyaan tentang voucher",
    "message": "Saya ingin bertanya tentang cara menggunakan voucher",
    "email": "[email protected]",
    "phone": "08123456789"
};

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

Example response (200):


{
"status": success,
"message": "Pesan berhasil dikirim",
"data": {
     "subject": "Pertanyaan tentang voucher",
     "message": "Saya ingin bertanya tentang cara menggunakan voucher"
}
}
 

Request      

POST api/basic/contact-us

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

subject   string   

Subject pesan. Example: Pertanyaan tentang voucher

message   string   

Isi pesan. Example: Saya ingin bertanya tentang cara menggunakan voucher

email   string  optional  

optional Email pengguna. Example: [email protected]

phone   string  optional  

optional Nomor telepon pengguna. Example: 08123456789

Endpoints

Handle Midtrans payment notification

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/notification/payment/status" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://merchant.lokalink.id/api/notification/payment/status"
);

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

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

Request      

POST api/notification/payment/status

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Handle Midtrans webhook notification This is the dedicated webhook handler using the new service

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/notification/webhook" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://merchant.lokalink.id/api/notification/webhook"
);

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

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

Request      

POST api/notification/webhook

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

POST api/v1/auth/logout

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/logout"
);

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

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

Request      

POST api/v1/auth/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

File Upload

Upload User personal KTP

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/uploadfile" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "nik=35"\
    --form "phone=081**********"\
    --form "path_image=@/tmp/php2wgiBh" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/uploadfile"
);

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

const body = new FormData();
body.append('nik', '35');
body.append('phone', '081**********');
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": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/auth/uploadfile

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

path_image   file   

Foto KTP pengguna max 2MB Example: /tmp/php2wgiBh

nik   number   

nik pengguna. Example: 35

phone   phone   

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

Upload User Selfies Foto

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/uploadSelfies" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "phone=081**********"\
    --form "path_image=@/tmp/phpQTpzPe" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/uploadSelfies"
);

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

const body = new FormData();
body.append('phone', '081**********');
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": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/auth/uploadSelfies

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

path_image   file   

Foto KTP pengguna max 2MB Example: /tmp/phpQTpzPe

phone   phone   

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

Upload Company NIB & NPWP

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/company/companynib" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "phone=081**********"\
    --form "nib=@/tmp/phpYqz6Gh" \
    --form "npwp=@/tmp/phpRVU1ce" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/company/companynib"
);

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

const body = new FormData();
body.append('phone', '081**********');
body.append('nib', document.querySelector('input[name="nib"]').files[0]);
body.append('npwp', document.querySelector('input[name="npwp"]').files[0]);

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

Example response (200):


{
"status": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/auth/company/companynib

Headers

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

nib   file   

Image NIB max 2MB Example: /tmp/phpYqz6Gh

npwp   file   

Image NPWP max 2MB Example: /tmp/phpRVU1ce

phone   phone   

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

Manage

Outlet Add Description

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/manage/outlet/edit" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"outlet_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",
    \"description\": \"deskripsi\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/manage/outlet/edit"
);

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

let body = {
    "outlet_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "description": "deskripsi"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/manage/outlet/edit

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

outlet_uuid   string   

UUID Outlet. Example: 123e4567-e89b-12d3-a456-426614174000

description   string   

Description Outlet. Example: deskripsi

Outlet Add photos

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/manage/outlet/edit/photo" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "outlet_uuid=123e4567-e89b-12d3-a456-426614174000"\
    --form "type=menu,background,gallery"\
    --form "path_image=@/tmp/phpBCKrGg" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/manage/outlet/edit/photo"
);

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

const body = new FormData();
body.append('outlet_uuid', '123e4567-e89b-12d3-a456-426614174000');
body.append('type', 'menu,background,gallery');
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": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/manage/outlet/edit/photo

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

outlet_uuid   string   

UUID Outlet. Example: 123e4567-e89b-12d3-a456-426614174000

path_image   file   

Foto Profile pengguna max 2MB Example: /tmp/phpBCKrGg

type   string   

Type Outlet. Example: menu,background,gallery

Outlet

Find

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/outlet/find" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"keyword\": \"cafe\",
    \"city_id\": 1
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/outlet/find"
);

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

let body = {
    "keyword": "cafe",
    "city_id": 1
};

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

Example response (200):


{
"status": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/outlet/find

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

keyword   string   

keyword. Example: cafe

city_id   integer   

city_id. Example: 1

Claim Outlet.

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/outlet/claim" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "explanation=Penjelasan"\
    --form "outlet_uuid=123e4567-e89b-12d3-a456-426614174000"\
    --form "file_pdf[]=@/tmp/phpRhYSLe" \
    --form "file_pdf[]=@/tmp/phpOxevIe" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/outlet/claim"
);

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

const body = new FormData();
body.append('explanation', 'Penjelasan');
body.append('outlet_uuid', '123e4567-e89b-12d3-a456-426614174000');
body.append('file_pdf[]', document.querySelector('input[name="file_pdf[]"]').files[0]);
body.append('file_pdf[]', document.querySelector('input[name="file_pdf[]"]').files[0]);

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

Example response (200):


{
"status": success,
"message": "Claim outlet submitted, please wait for approval",
"data": [data]
}
 

Request      

POST api/v1/outlet/claim

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

file_pdf   file[]   

Pastikan minimal ada 1 file. Must be a file. validation.max.

explanation   string   

explanation pengguna. Example: Penjelasan

outlet_uuid   string   

outlet_uuid Outlet. Example: 123e4567-e89b-12d3-a456-426614174000

file_pdf[]   file   

Array dari file Image. Max 4MB per file. Example: /tmp/phpOxevIe

My Claim.

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/outlet/myclaim" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"pending,approved,declined\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/outlet/myclaim"
);

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

let body = {
    "status": "pending,approved,declined"
};

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

Example response (200):


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

Request      

POST api/v1/outlet/myclaim

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

status   string   

explanation pengguna. Example: pending,approved,declined

Detail Outlet

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/outlet/detail" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"uuid\": \"f3b80872-b9cc-42d3-9ef3-6363a2e7dd7f\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/outlet/detail"
);

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

let body = {
    "uuid": "f3b80872-b9cc-42d3-9ef3-6363a2e7dd7f"
};

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

Example response (200):


{
"status": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/outlet/detail

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

uuid   string   

uuid. Example: f3b80872-b9cc-42d3-9ef3-6363a2e7dd7f

Add Outlet.

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/outlet/addnew" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "business_type=Toko"\
    --form "name=Outlet Baru"\
    --form "address=Jl. Raya No. 1"\
    --form "city_id=12"\
    --form "latitude=-6.2088"\
    --form "longitude=106.8456"\
    --form "phone=08123456789"\
    --form "category_id=1"\
    --form "province_id=12"\
    --form "schedule_open={"senin": "08:00-17:00","selasa": "08:00-17:00","rabu": "08:00-17:00","kamis": "08:00-17:00","jumat": "08:00-17:00","sabtu": "08:00-17:00","minggu": "08:00-17:00"}"\
    --form "zip_code=12345"\
    --form "building_name=Bangunan Baru"\
    --form "category_name=Jasa"\
    --form "accept_cash=1"\
    --form "accept_debit_card=1"\
    --form "accept_credit_card=1"\
    --form "photo_1=@/tmp/phprCkikf" \
    --form "photo_2=@/tmp/phplxK7Ug" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/outlet/addnew"
);

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

const body = new FormData();
body.append('business_type', 'Toko');
body.append('name', 'Outlet Baru');
body.append('address', 'Jl. Raya No. 1');
body.append('city_id', '12');
body.append('latitude', '-6.2088');
body.append('longitude', '106.8456');
body.append('phone', '08123456789');
body.append('category_id', '1');
body.append('province_id', '12');
body.append('schedule_open', '{"senin": "08:00-17:00","selasa": "08:00-17:00","rabu": "08:00-17:00","kamis": "08:00-17:00","jumat": "08:00-17:00","sabtu": "08:00-17:00","minggu": "08:00-17:00"}');
body.append('zip_code', '12345');
body.append('building_name', 'Bangunan Baru');
body.append('category_name', 'Jasa');
body.append('accept_cash', '1');
body.append('accept_debit_card', '1');
body.append('accept_credit_card', '1');
body.append('photo_1', document.querySelector('input[name="photo_1"]').files[0]);
body.append('photo_2', document.querySelector('input[name="photo_2"]').files[0]);

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

Example response (200):


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

Request      

POST api/v1/outlet/addnew

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

business_type   string   

Tipe Usaha. Example: Toko

name   string   

Nama Outlet. Example: Outlet Baru

address   string   

Alamat Outlet. Example: Jl. Raya No. 1

city_id   string   

Kota Outlet. Example: 12

photo_1   file   

Foto Logo Outlet max 2MB Example: /tmp/phprCkikf

photo_2   file   

Foto Front Photo Outlet max 2MB Example: /tmp/phplxK7Ug

latitude   string   

Latitude Outlet. Example: -6.2088

longitude   string   

Longitude Outlet. Example: 106.8456

phone   string   

Nomor Telepon Outlet. Example: 08123456789

category_id   string   

Kategori Outlet. Example: 1

province_id   string   

Provinsi Outlet. Example: 12

schedule_open   json   

Jadwal Buka Outlet. Example: {"senin": "08:00-17:00","selasa": "08:00-17:00","rabu": "08:00-17:00","kamis": "08:00-17:00","jumat": "08:00-17:00","sabtu": "08:00-17:00","minggu": "08:00-17:00"}

senin   string   

Example: architecto

selasa   string   

Example: architecto

rabu   string   

Example: architecto

kamis   string   

Example: architecto

jumat   string   

Example: architecto

sabtu   string   

Example: architecto

minggu   string   

Example: architecto

zip_code   string   

Kode Pos Outlet. Example: 12345

building_name   string  optional  

optional Nama Bangunan Outlet. Example: Bangunan Baru

category_name   string   

Nama Kategori Outlet. Example: Jasa

accept_cash   boolean   

Menerima Uang Tunai. Example: true

accept_debit_card   boolean   

Menerima Kartu Debit. Example: true

accept_credit_card   boolean   

Menerima Kartu Kredit. Example: true

Add Outlet Media.

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/outlet/addoutletmedia" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "outlet_id=22"\
    --form "file=@/tmp/phpdViDue" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/outlet/addoutletmedia"
);

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

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

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

Example response (200):


{
"status": success,
"message": "Images outlet submitted, please wait for approval",
"data": [data]
}
 

Request      

POST api/v1/outlet/addoutletmedia

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

outlet_id   string   

outlet_id Outlet. Example: 22

file   file   

Array dari file Image. Max 4MB per file. Example: /tmp/phpdViDue

Edit Outlet.

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/outlet/editoutlet" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "business_name=Toko"\
    --form "business_description=Toko"\
    --form "category=FnB"\
    --form "outlet_uuid=3904-394as-39040"\
    --form "cash=1"\
    --form "debit_card=1"\
    --form "credit_card=1"\
    --form "address=Jl. Raya No. 1"\
    --form "building_name=Bangunan Baru"\
    --form "phone=08123456789"\
    --form "city=12"\
    --form "zipcode=12345"\
    --form "latitude=-6.2088"\
    --form "longitude=106.8456"\
    --form "schedule_open={"senin": "08:00-17:00","selasa": "08:00-17:00","rabu": "08:00-17:00","kamis": "08:00-17:00","jumat": "08:00-17:00","sabtu": "08:00-17:00","minggu": "08:00-17:00"}"\
    --form "website=https://outlet.com"\
    --form "facebook=https://facebook.com/outlet"\
    --form "twitter=https://twitter.com/outlet"\
    --form "instagram=https://instagram.com/outlet"\
    --form "whatsapp=08123456789"\
    --form "logo=@/tmp/phpajIunh" \
    --form "front_photo=@/tmp/phpLvsqjd" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/outlet/editoutlet"
);

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

const body = new FormData();
body.append('business_name', 'Toko');
body.append('business_description', 'Toko');
body.append('category', 'FnB');
body.append('outlet_uuid', '3904-394as-39040');
body.append('cash', '1');
body.append('debit_card', '1');
body.append('credit_card', '1');
body.append('address', 'Jl. Raya No. 1');
body.append('building_name', 'Bangunan Baru');
body.append('phone', '08123456789');
body.append('city', '12');
body.append('zipcode', '12345');
body.append('latitude', '-6.2088');
body.append('longitude', '106.8456');
body.append('schedule_open', '{"senin": "08:00-17:00","selasa": "08:00-17:00","rabu": "08:00-17:00","kamis": "08:00-17:00","jumat": "08:00-17:00","sabtu": "08:00-17:00","minggu": "08:00-17:00"}');
body.append('website', 'https://outlet.com');
body.append('facebook', 'https://facebook.com/outlet');
body.append('twitter', 'https://twitter.com/outlet');
body.append('instagram', 'https://instagram.com/outlet');
body.append('whatsapp', '08123456789');
body.append('logo', document.querySelector('input[name="logo"]').files[0]);
body.append('front_photo', document.querySelector('input[name="front_photo"]').files[0]);

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

Example response (200):


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

Request      

POST api/v1/outlet/editoutlet

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

business_name   string   

Nama Usaha. Example: Toko

business_description   string   

Deskripsi Usaha. Example: Toko

logo   file  optional  

Logo Outlet max 2MB Example: /tmp/phpajIunh

front_photo   file  optional  

Foto Front Photo Outlet max 2MB Example: /tmp/phpLvsqjd

category   string   

Kategori Outlet. Example: FnB

outlet_uuid   string   

Outlet UUID Usaha. Example: 3904-394as-39040

cash   boolean   

Menerima Uang Tunai. Example: true

debit_card   boolean   

Menerima Kartu Debit. Example: true

credit_card   boolean   

Menerima Kartu Kredit. Example: true

address   string   

Alamat Outlet. Example: Jl. Raya No. 1

building_name   string  optional  

optional Nama Bangunan Outlet. Example: Bangunan Baru

phone   string   

Nomor Telepon Outlet. Example: 08123456789

city   string   

Kota Outlet. Example: 12

zipcode   string   

Kode Pos Outlet. Example: 12345

latitude   string   

Latitude Outlet. Example: -6.2088

longitude   string   

Longitude Outlet. Example: 106.8456

schedule_open   json   

Jadwal Buka Outlet. Example: {"senin": "08:00-17:00","selasa": "08:00-17:00","rabu": "08:00-17:00","kamis": "08:00-17:00","jumat": "08:00-17:00","sabtu": "08:00-17:00","minggu": "08:00-17:00"}

senin   string   

Example: architecto

selasa   string   

Example: architecto

rabu   string   

Example: architecto

kamis   string   

Example: architecto

jumat   string   

Example: architecto

sabtu   string   

Example: architecto

minggu   string   

Example: architecto

website   string  optional  

optional Website Outlet. Example: https://outlet.com

facebook   string  optional  

optional Facebook Outlet. Example: https://facebook.com/outlet

twitter   string  optional  

optional Twitter Outlet. Example: https://twitter.com/outlet

instagram   string  optional  

optional Instagram Outlet. Example: https://instagram.com/outlet

whatsapp   string  optional  

optional WhatsApp Outlet. Example: 08123456789

Request OTP Remove.

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

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": "data berhasil didapatkan",
"data": [data]
}
 

Request      

POST api/v1/outlet/OTPremoveoutlet

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Delete My Outlet.

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/outlet/removeoutlet" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"otp\": \"3904\",
    \"reason\": \"architecto\",
    \"outlet_uuid\": \"3904-394as-39040\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/outlet/removeoutlet"
);

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

let body = {
    "otp": "3904",
    "reason": "architecto",
    "outlet_uuid": "3904-394as-39040"
};

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

Example response (200):


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

Request      

POST api/v1/outlet/removeoutlet

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

otp   string   

OTP User Usaha. Example: 3904

reason   string   

Example: architecto

outlet_uuid   string   

Outlet UUID Usaha. Example: 3904-394as-39040

Most View Outlet

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

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": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/outlet/mostview

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

List Media Outlet

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/outlet/detail/review/photos" \
    --header "Authorization: Bearer {token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"uuid\": \"f3b80872-b9cc-42d3-9ef3-6363a2e7dd7f\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/outlet/detail/review/photos"
);

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

let body = {
    "uuid": "f3b80872-b9cc-42d3-9ef3-6363a2e7dd7f"
};

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

Example response (200):


{
"status": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/outlet/detail/review/photos

Headers

Authorization      

Example: Bearer {token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

uuid   string   

uuid. Example: f3b80872-b9cc-42d3-9ef3-6363a2e7dd7f

Profile

My File

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

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": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/auth/myfile

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Request Delete

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/auth/request/delete" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"architecto\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/auth/request/delete"
);

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

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

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

Example response (200):


{
"status": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/auth/request/delete

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

reason   string   

Alasan penghapusan Example: architecto

Change Password

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

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

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

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

Example response (200):


{
"status": success,
"message": "Password berhasil di update",
"data": [data]
}
 

Request      

POST api/v1/auth/change-password

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

password   string   

Password pengguna. Example: Secret123456

cpassword   string   

Password pengguna. Example: Secret123456

My Profile

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

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": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/profile/detail

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Avatar

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/profile/photo" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "path_image=@/tmp/phpyR14cd" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/profile/photo"
);

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

const body = new FormData();
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": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/profile/photo

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

path_image   file   

Foto Avatar pengguna max 2MB Example: /tmp/phpyR14cd

Edit

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/profile/edit" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"full_name\": \"architecto\",
    \"position\": \"architecto\",
    \"username\": \"architecto\",
    \"phone\": \"architecto\",
    \"company_name\": \"architecto\",
    \"business_number\": \"architecto\",
    \"company_email\": \"[email protected]\",
    \"email\": \"[email protected]\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/profile/edit"
);

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

let body = {
    "full_name": "architecto",
    "position": "architecto",
    "username": "architecto",
    "phone": "architecto",
    "company_name": "architecto",
    "business_number": "architecto",
    "company_email": "[email protected]",
    "email": "[email protected]"
};

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

Example response (200):


{
"status": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/profile/edit

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

full_name   string   

Nama Lengkap Example: architecto

position   string   

Posisi Example: architecto

username   string   

Username Example: architecto

phone   string   

Nomor Handphone Example: architecto

company_name   string   

Nama Perusahaan Example: architecto

business_number   string   

Nomor Bisnis Example: architecto

company_email   string   

Email Perusahaan Example: [email protected]

email   string   

Email Example: [email protected]

Staff

List

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

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": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/staff/list

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Outlet Detail

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/staff/outlet/detail" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"outlet_uuid\": \"123e4567-e89b-12d3-a456-426614174000\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/staff/outlet/detail"
);

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

let body = {
    "outlet_uuid": "123e4567-e89b-12d3-a456-426614174000"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/staff/outlet/detail

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

outlet_uuid   string   

UUID Outlet. Example: 123e4567-e89b-12d3-a456-426614174000

List by Outlet

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/staff/listbyOutlet" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"outlet_uuid\": \"123e4567-e89b-12d3-a456-426614174000\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/staff/listbyOutlet"
);

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

let body = {
    "outlet_uuid": "123e4567-e89b-12d3-a456-426614174000"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/staff/listbyOutlet

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

outlet_uuid   string   

UUID Outlet. Example: 123e4567-e89b-12d3-a456-426614174000

Create

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/staff/create" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"outlet_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",
    \"name\": \"Debian\",
    \"phone\": \"08563437495\",
    \"pin\": \"1234\",
    \"jabatan\": \"Staff\",
    \"gender\": true
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/staff/create"
);

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

let body = {
    "outlet_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Debian",
    "phone": "08563437495",
    "pin": "1234",
    "jabatan": "Staff",
    "gender": true
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/staff/create

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

outlet_uuid   string   

UUID Outlet. Example: 123e4567-e89b-12d3-a456-426614174000

name   string   

Nama Staff. Example: Debian

phone   string   

Nomor Telepon Staff. Example: 08563437495

pin   numeric   

Pin Staff. Example: 1234

jabatan   string   

Jabatan Staff. Example: Staff

gender   boolean   

gender Staff. Example: true

Update

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/staff/update" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"staff_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",
    \"name\": \"Debian\",
    \"jabatan\": \"Manager\",
    \"phone\": \"08563437495\",
    \"gender\": true
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/staff/update"
);

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

let body = {
    "staff_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Debian",
    "jabatan": "Manager",
    "phone": "08563437495",
    "gender": true
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/staff/update

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

staff_uuid   string   

UUID Staff. Example: 123e4567-e89b-12d3-a456-426614174000

name   string   

Nama Staff. Example: Debian

jabatan   string   

Jabatan Staff. Example: Manager

phone   string   

Nomor Telepon Staff. Example: 08563437495

gender   boolean   

gender Staff. Example: true

Delete

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/staff/delete" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"staff_uuid\": \"123e4567-e89b-12d3-a456-426614174000\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/staff/delete"
);

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

let body = {
    "staff_uuid": "123e4567-e89b-12d3-a456-426614174000"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/staff/delete

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

staff_uuid   string   

UUID Staff. Example: 123e4567-e89b-12d3-a456-426614174000

Voucher Claim

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/staff/voucher/claim" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"status\": \"claimed\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/staff/voucher/claim"
);

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

let body = {
    "status": "claimed"
};

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

Example response (200):


{
"status": success,
"message": "Voucher Claim berhasil didapatkan",
"data": {
     "title": "Voucher A",
     "voucher_type": "diskon",
     "diskon_persen": 10,
     "price_awal": "200000",
     "price_akhir": "180000",
     "is_enabled": false,
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/staff/voucher/claim

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

status   string  optional  

optional Status Voucher. Example: claimed

Subscription

Get Midtrans Key

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

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": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/subscription/midtrans/key

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get Master Plan

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

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

let body = {
    "type": "subscription"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/subscription/master

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   string  optional  

Type Plan. Example: subscription

Sign Up Enhance

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/subscription/subscription/create" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"outlet_uuids\": [
        \"123e4567-e89b-12d3-a456-426614174000\",
        \"123e4567-e89b-12d3-a456-426614175000\"
    ],
    \"type\": \"subscription\",
    \"plan_id\": \"1\",
    \"start_date\": \"2026-06-01\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/subscription/subscription/create"
);

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

let body = {
    "outlet_uuids": [
        "123e4567-e89b-12d3-a456-426614174000",
        "123e4567-e89b-12d3-a456-426614175000"
    ],
    "type": "subscription",
    "plan_id": "1",
    "start_date": "2026-06-01"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data submit berhasil',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/subscription/subscription/create

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

outlet_uuids   string[]   

Array of Outlet UUIDs.

type   string   

Tipe Subscription. Example: subscription

plan_id   string   

ID Plan. Example: 1

start_date   string   

Must be a valid date in the format Y-m-d. Example: 2026-06-01

Recreate Subscription

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/subscription/recreate" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"enhance_uuids\": null,
    \"start_date\": \"2026-05-04\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/subscription/recreate"
);

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

let body = {
    "enhance_uuids": null,
    "start_date": "2026-05-04"
};

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

Example response (200):


{
"status": success,
"message": "Subscription berhasil di-recreate",
"data": [
  {
     "message": 'Data submit berhasil',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'
}
]
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/subscription/recreate

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

enhance_uuids   string[]  optional  

Enhance UUIDs.

start_date   required  optional  

Start date for new subscription. Example: 2026-05-04

Billing History

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/subscription/billing" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"type\": \"architecto\",
    \"status\": \"architecto\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/subscription/billing"
);

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

let body = {
    "type": "architecto",
    "status": "architecto"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/subscription/billing

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

type   string  optional  

Type of plan (subscription, voucher). Optional. Example: architecto

status   string  optional  

Status of billing (pending, paid, expired) multi status. Optional. Example: architecto

Billing Detail

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/subscription/billing/detail" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"billing_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",
    \"snap_token\": \"mid-123e4567-e89b-12d3-a456-426614174000\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/subscription/billing/detail"
);

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

let body = {
    "billing_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "snap_token": "mid-123e4567-e89b-12d3-a456-426614174000"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data outlet terhapus',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/subscription/billing/detail

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

billing_uuid   string  optional  

Billing UUID. Example: 123e4567-e89b-12d3-a456-426614174000

snap_token   string  optional  

Midtrans Snap Token. Example: mid-123e4567-e89b-12d3-a456-426614174000

Validate Payment

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/subscription/billing/payment" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"billing_uuid\": \"123e4567-e89b-12d3-a456-426614174000\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/subscription/billing/payment"
);

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

let body = {
    "billing_uuid": "123e4567-e89b-12d3-a456-426614174000"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data berhasil di submit',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/subscription/billing/payment

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

billing_uuid   string  optional  

Billing UUID. Example: 123e4567-e89b-12d3-a456-426614174000

Transfer Data

Request Code

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/transfer/request" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"reason\": \"ganti pengurus\",
    \"outlet_uuids\": [
        \"123e4567-e89b-12d3-a456-426614174000\",
        \"123e4567-e89b-12d3-a456-426614175000\"
    ]
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/transfer/request"
);

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

let body = {
    "reason": "ganti pengurus",
    "outlet_uuids": [
        "123e4567-e89b-12d3-a456-426614174000",
        "123e4567-e89b-12d3-a456-426614175000"
    ]
};

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

Example response (200):


{
"status": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/transfer/request

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

reason   string   

reason pengguna. Example: ganti pengurus

outlet_uuids   string[]   

Array of Outlet UUIDs.

Validate Code

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/transfer/validate" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"kode_transfer\": \"1234567890\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/transfer/validate"
);

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

let body = {
    "kode_transfer": "1234567890"
};

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

Example response (200):


{
"status": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/transfer/validate

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

kode_transfer   string   

kode transfer. Example: 1234567890

History

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/transfer/history" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/transfer/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": success,
"message": "File berhasil di submit",
"data": [data]
}
 

Request      

POST api/v1/transfer/history

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Voucher

SignUp

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/signup" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "outlet_uuids[]=123e4567-e89b-12d3-a456-426614174000"\
    --form "plan_id=3333-e89b-12d3-a456-426614174000"\
    --form "type_voucher=free/diskon"\
    --form "diskon_persen=10"\
    --form "title=Voucher Diskon Spesial"\
    --form "kuota=99"\
    --form "price_awal=200000"\
    --form "price_akhir=150000"\
    --form "deskripsi=Deskripsi Voucher"\
    --form "tnc=Term and Condition Voucher"\
    --form "contact_person=08123456789"\
    --form "start_date=2052-06-24"\
    --form "end_date=2026-06-01T16:45:03"\
    --form "banner_image=@/tmp/phpyNVlLd" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/signup"
);

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

const body = new FormData();
body.append('outlet_uuids[]', '123e4567-e89b-12d3-a456-426614174000');
body.append('plan_id', '3333-e89b-12d3-a456-426614174000');
body.append('type_voucher', 'free/diskon');
body.append('diskon_persen', '10');
body.append('title', 'Voucher Diskon Spesial');
body.append('kuota', '99');
body.append('price_awal', '200000');
body.append('price_akhir', '150000');
body.append('deskripsi', 'Deskripsi Voucher');
body.append('tnc', 'Term and Condition Voucher');
body.append('contact_person', '08123456789');
body.append('start_date', '2052-06-24');
body.append('end_date', '2026-06-01T16:45:03');
body.append('banner_image', document.querySelector('input[name="banner_image"]').files[0]);

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data submit berhasil',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/signup

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

outlet_uuids   string[]   

Array of Outlet UUIDs.

banner_image   file   

Image banner voucher max 2MB Example: /tmp/phpyNVlLd

plan_id   string   

UUID Plan. Example: 3333-e89b-12d3-a456-426614174000

type_voucher   string   

Tipe Voucher. Example: free/diskon

diskon_persen   integer   

Diskon Persen. Example: 10

title   string   

Title Voucher. Example: Voucher Diskon Spesial

kuota   string   

Kuota Voucher. Example: 99

price_awal   string   

Harga Awal. Example: 200000

price_akhir   string   

Harga Diskon. Example: 150000

deskripsi   string   

Deskripsi Voucher. Example: Deskripsi Voucher

tnc   string   

TnC Voucher. Example: Term and Condition Voucher

contact_person   string  optional  

optional Contact Person Voucher. Example: 08123456789

start_date   string  optional  

validation.date validation.after_or_equal. Example: 2052-06-24

end_date   string  optional  

validation.date. Example: 2026-06-01T16:45:03

My Voucher

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/history" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/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": success,
"message": "Data berhasil di submit",
"data": [
  {
     "voucher_list": [
         {
             "title": "Voucher A",
             "voucher_type": "diskon",
             "diskon_persen": 10,
             "price_awal": "200000",
             "price_akhir": "180000",
         }
     ]

}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/history

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Detail Voucher

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/detail" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"voucher_uuid\": \"123e4567-e89b-12d3-a456-426614174000\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/detail"
);

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

let body = {
    "voucher_uuid": "123e4567-e89b-12d3-a456-426614174000"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": {
     "title": "Voucher A",
     "voucher_type": "diskon",
     "diskon_persen": 10,
     "price_awal": "200000",
     "price_akhir": "180000",
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/detail

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

voucher_uuid   string   

UUID Voucher. Example: 123e4567-e89b-12d3-a456-426614174000

Activate Voucher

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/activate" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"voucher_uuid\": \"123e4567-e89b-12d3-a456-426614174000\",
    \"start_date\": \"architecto\",
    \"end_date\": \"architecto\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/activate"
);

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

let body = {
    "voucher_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "start_date": "architecto",
    "end_date": "architecto"
};

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

Example response (200):


{
"status": success,
"message": "Voucher berhasil diaktifkan",
"data": {
     "title": "Voucher A",
     "voucher_type": "diskon",
     "diskon_persen": 10,
     "price_awal": "200000",
     "price_akhir": "180000",
     "is_enabled": true,
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/activate

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

voucher_uuid   string   

UUID Voucher. Example: 123e4567-e89b-12d3-a456-426614174000

start_date   string   

Tanggal Mulai Voucher (format Y-m-d). Example: architecto

end_date   string   

Tanggal Berakhir Voucher (format Y-m-d). Example: architecto

Stop Voucher

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/stop" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"voucher_uuid\": \"123e4567-e89b-12d3-a456-426614174000\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/stop"
);

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

let body = {
    "voucher_uuid": "123e4567-e89b-12d3-a456-426614174000"
};

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

Example response (200):


{
"status": success,
"message": "Voucher berhasil dihentikan",
"data": {
     "title": "Voucher A",
     "voucher_type": "diskon",
     "diskon_persen": 10,
     "price_awal": "200000",
     "price_akhir": "180000",
     "is_enabled": false,
}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/stop

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

voucher_uuid   string   

UUID Voucher. Example: 123e4567-e89b-12d3-a456-426614174000

Recreate

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/recreate" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"voucher_uuids\": \"123e4567-e89b-12d3-a456-426614174000\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/recreate"
);

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

let body = {
    "voucher_uuids": "123e4567-e89b-12d3-a456-426614174000"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "message": 'Data submit berhasil',
    "created_at": '2021-12-01 12:00:00',
   "updated_at": '2021-12-01 12:00:00'

}
]
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/recreate

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

voucher_uuids   required  optional  

Voucher UUIDs. Example: 123e4567-e89b-12d3-a456-426614174000

Edit Voucher

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/edit" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "voucher_uuid=123e4567-e89b-12d3-a456-426614174000"\
    --form "title=Voucher A"\
    --form "voucher_type=diskon"\
    --form "diskon_persen=10"\
    --form "price_awal=200000"\
    --form "price_akhir=180000"\
    --form "quota=100"\
    --form "details_promotion=Details promotion"\
    --form "terms_conditions=Terms conditions"\
    --form "contact_person=Contact person"\
    --form "banner_image=@/tmp/phpwJ4Zjd" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/edit"
);

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

const body = new FormData();
body.append('voucher_uuid', '123e4567-e89b-12d3-a456-426614174000');
body.append('title', 'Voucher A');
body.append('voucher_type', 'diskon');
body.append('diskon_persen', '10');
body.append('price_awal', '200000');
body.append('price_akhir', '180000');
body.append('quota', '100');
body.append('details_promotion', 'Details promotion');
body.append('terms_conditions', 'Terms conditions');
body.append('contact_person', 'Contact person');
body.append('banner_image', document.querySelector('input[name="banner_image"]').files[0]);

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": {
     "title": "Voucher A",
     "voucher_type": "diskon",
     "diskon_persen": 10,
     "price_awal": "200000",
     "price_akhir": "180000",
}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/edit

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

voucher_uuid   string   

UUID Voucher. Example: 123e4567-e89b-12d3-a456-426614174000

title   string  optional  

optional Title voucher. Example: Voucher A

voucher_type   string  optional  

optional Type voucher. Example: diskon

diskon_persen   integer  optional  

optional Discount percentage. Example: 10

price_awal   string  optional  

optional Original price. Example: 200000

price_akhir   string  optional  

optional Final price. Example: 180000

quota   integer  optional  

optional Quota. Example: 100

details_promotion   string  optional  

optional Details promotion. Example: Details promotion

terms_conditions   string  optional  

optional Terms conditions. Example: Terms conditions

banner_image   file  optional  

optional Banner image max 2MB Example: /tmp/phpwJ4Zjd

contact_person   string  optional  

optional Contact person. Example: Contact person

Edit Voucher Images

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/update/image" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "voucher_uuid=123e4567-e89b-12d3-a456-426614174000"\
    --form "type=1"\
    --form "voucher_image=@/tmp/phpksen1f" 
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/update/image"
);

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

const body = new FormData();
body.append('voucher_uuid', '123e4567-e89b-12d3-a456-426614174000');
body.append('type', '1');
body.append('voucher_image', document.querySelector('input[name="voucher_image"]').files[0]);

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

Example response (200):


{
"status": "success",
"message": "Images updated successfully",
"data": {
     "voucher_uuid": "123e4567-e89b-12d3-a456-426614174000",
     "voucher_image_1": "path/to/image1.jpg",
}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/update/image

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

voucher_uuid   string   

UUID Voucher. Example: 123e4567-e89b-12d3-a456-426614174000

voucher_image   file   

Image detail voucher max 2MB Example: /tmp/phpksen1f

type   string   

Type gambar integer (1-4). Example: 1

Voucher Claim

Redeem Voucher

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/redeem" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"L12345678\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/redeem"
);

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

let body = {
    "code": "L12345678"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "voucher_title": "Voucher A",
     "claimed_at": "2024-01-01 12:00:00",
     "status": "claimed"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/redeem

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

code   string   

Code for redeem voucher. Example: L12345678

Redeem History

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/redeem/history" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"keyword\": \"Nama Voucher\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/redeem/history"
);

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

let body = {
    "keyword": "Nama Voucher"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "voucher_title": "Voucher A",
     "claimed_at": "2024-01-01 12:00:00",
     "status": "claimed"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/redeem/history

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

keyword   string  optional  

Keyword for redeem voucher. Example: Nama Voucher

Redeem Detail

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/redeem/detail" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"L90099090\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/redeem/detail"
);

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

let body = {
    "code": "L90099090"
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil di submit",
"data": [
  {
     "voucher_title": "Voucher A",
     "claimed_at": "2024-01-01 12:00:00",
     "status": "claimed"
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/redeem/detail

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

code   string  optional  

code required for redeem voucher. Example: L90099090

Redeem Reject

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/redeem/reject" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"code\": \"L90099090\"
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/redeem/reject"
);

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

let body = {
    "code": "L90099090"
};

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

Example response (200):


{
"status": success,
"message": "Voucher claim berhasil di-reject",
"data": {
     "id": 1,
     "code": "L90099090",
     "status": "rejected",
     "staff_id": 1,
     "updated_at": "2024-01-01 12:00:00"
}
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/redeem/reject

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

code   string   

Code for reject voucher claim. Example: L90099090

Redeem Logs

Example request:
curl --request POST \
    "https://merchant.lokalink.id/api/v1/voucher/redeem/logs" \
    --header "Authorization: Bearer {access_token}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"voucher_uuids\": [
        \"123e4567-e89b-12d3-a456-426614174000\"
    ]
}"
const url = new URL(
    "https://merchant.lokalink.id/api/v1/voucher/redeem/logs"
);

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

let body = {
    "voucher_uuids": [
        "123e4567-e89b-12d3-a456-426614174000"
    ]
};

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

Example response (200):


{
"status": success,
"message": "Data berhasil diambil",
"data": [
  {
     "id": 1,
     "uuid": "claim-uuid",
     "code": "L90099090",
     "voucher": {
         "uuid": "voucher-uuid",
         "title": "Voucher A",
         "voucher_type": "diskon",
         "diskon_persen": 20,
         "quota": 100
     },
     "redeemBy": {
         "first_name": "John",
         "last_name": "Doe",
         "username": "08123456789"
     },
     "staffBy": {
         "id": 1,
         "name": "Staff Name",
         "jabatan": "Kasir"
     },
     "claimed_at": "2024-01-01 12:00:00",
     "status": "claimed"
  }
]
}
 

Example response (401):


{
    "message": "Unauthenticated."
}
 

Request      

POST api/v1/voucher/redeem/logs

Headers

Authorization      

Example: Bearer {access_token}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

voucher_uuids   string[]   

Voucher UUIDs to get redeem logs.