Info
Welcome to the generated API reference. Get Postman Collection
general
取得店家列表資訊
Example request:
curl -X GET \
-G "http://localhost/api/v2/store/list" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/v2/store/list"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/v2/store/list
商店登入第二版, 加入檢查otp機制
Example request:
curl -X POST \
"http://localhost/api/v2/store/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/v2/store/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/v2/store/login
會員登入第二版, 加入檢查otp機制
Example request:
curl -X POST \
"http://localhost/api/v2/user/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/v2/user/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/v2/user/login
API:檢查手機是否註冊過 *
Example request:
curl -X GET \
-G "http://localhost/api/mobile/check/type/1/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/mobile/check/type/1/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/mobile/check/type/{type}/{mobile}
API:發送簡訊驗證 *
Example request:
curl -X POST \
"http://localhost/api/mobile/verify/push_sms" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/mobile/verify/push_sms"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/mobile/verify/push_sms
API:簡訊驗證碼核對 *
Example request:
curl -X POST \
"http://localhost/api/mobile/verify/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/mobile/verify/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/mobile/verify/{mobile}
api/city_area/list
Example request:
curl -X GET \
-G "http://localhost/api/city_area/list" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/city_area/list"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/city_area/list
API:商店註冊 *
Example request:
curl -X POST \
"http://localhost/api/store/regist" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/regist"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/store/regist
API:商店登入 *
Example request:
curl -X POST \
"http://localhost/api/store/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/store/login
API:取得店家列表資訊 *
Example request:
curl -X GET \
-G "http://localhost/api/store/list" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/list"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/store/list
忘記密碼,生成一組隨機密碼並以簡訊通知用戶
Example request:
curl -X POST \
"http://localhost/api/store/forgotpwd" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/forgotpwd"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/store/forgotpwd
以otp修改密碼
Example request:
curl -X POST \
"http://localhost/api/store/changepwd" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/changepwd"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/store/changepwd
將商店加入收藏
Example request:
curl -X POST \
"http://localhost/api/store/favorite" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/favorite"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/store/favorite
將商店移除收藏
Example request:
curl -X DELETE \
"http://localhost/api/store/favorite" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/favorite"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/store/favorite
回報商店
Example request:
curl -X POST \
"http://localhost/api/store/report" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/report"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/store/report
API:取得本店資訊 *
Example request:
curl -X GET \
-G "http://localhost/api/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/store
店家資訊修改
Example request:
curl -X PUT \
"http://localhost/api/store/upd" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/upd"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/store/upd
用戶的來訪記錄
Example request:
curl -X GET \
-G "http://localhost/api/store/visit_record" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/visit_record"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/store/visit_record
取得商店最新版本號
Example request:
curl -X GET \
-G "http://localhost/api/store/version" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/store/version"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/store/version
API:會員註冊 *
Example request:
curl -X POST \
"http://localhost/api/user/regist" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/user/regist"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/user/regist
API:會員登入 *
Example request:
curl -X POST \
"http://localhost/api/user/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/user/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/user/login
忘記密碼,生成一組隨機密碼並以簡訊通知用戶
Example request:
curl -X POST \
"http://localhost/api/user/forgotpwd" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/user/forgotpwd"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/user/forgotpwd
以otp修改密碼
Example request:
curl -X POST \
"http://localhost/api/user/changepwd" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/user/changepwd"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/user/changepwd
API:取得個人資訊 *
Example request:
curl -X GET \
-G "http://localhost/api/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/user
會員資訊更新
Example request:
curl -X PUT \
"http://localhost/api/user/upd" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/user/upd"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/user/upd
取得會員最新版本號
Example request:
curl -X GET \
-G "http://localhost/api/user/version" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/user/version"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/user/version
api/transactions/qr/store/{store_id}
Example request:
curl -X GET \
-G "http://localhost/api/transactions/qr/store/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/transactions/qr/store/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/transactions/qr/store/{store_id}
api/transactions/qr/{transaction_id}
Example request:
curl -X GET \
-G "http://localhost/api/transactions/qr/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/transactions/qr/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/transactions/qr/{transaction_id}
消費者結帳
Example request:
curl -X POST \
"http://localhost/api/transactions/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/transactions/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/transactions/user
消費者的消費記錄
Example request:
curl -X GET \
-G "http://localhost/api/transactions/list/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/transactions/list/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/transactions/list/user
店家結帳
Example request:
curl -X POST \
"http://localhost/api/transactions/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/transactions/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/transactions/store
店家確認結帳, 消費者出示Qrcode給店家掃描後, 將消費紀錄的 is_check 設定為 true
Example request:
curl -X POST \
"http://localhost/api/transactions/check" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/transactions/check"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/transactions/check
店家的交易記錄
Example request:
curl -X GET \
-G "http://localhost/api/transactions/list/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/transactions/list/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/transactions/list/store
錢包加值完成時,藉由epay回傳參數判斷交易成功或失敗,印出簡單的訊息頁面
Example request:
curl -X GET \
-G "http://localhost/api/wallet/deposit/redirect" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/deposit/redirect"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/wallet/deposit/redirect
錢包加值完成時,藉由epay回傳參數判斷若交易成功,寫入紀錄 更新錢包 並生成推播
由於call此api應為epay系統,故不設定回傳訊息
Example request:
curl -X POST \
"http://localhost/api/wallet/deposit/notify" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/deposit/notify"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/wallet/deposit/notify
平台專用:修改提領進度
Example request:
curl -X PUT \
"http://localhost/api/wallet/withdraw" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/withdraw"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/wallet/withdraw
平台專用:提領列表查詢
Example request:
curl -X GET \
-G "http://localhost/api/wallet/withdraw_list" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/withdraw_list"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/wallet/withdraw_list
取得錢包餘額, 藉由目前登入者Id, [店家與消費者藉由不同路由驗證, 共用此function]
Example request:
curl -X GET \
-G "http://localhost/api/wallet/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/wallet/user
匯入申辦門號點數
Example request:
curl -X POST \
"http://localhost/api/wallet/user/deposit" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/user/deposit"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/wallet/user/deposit
取得錢包餘額, 藉由目前登入者Id, [店家與消費者藉由不同路由驗證, 共用此function]
Example request:
curl -X GET \
-G "http://localhost/api/wallet/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/wallet/store
取得錢包餘額, 藉由電話號碼, [店家查詢用 assign.guard:stores]
Example request:
curl -X GET \
-G "http://localhost/api/wallet/mobile/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/mobile/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/wallet/mobile/{mobile}
取得向金流平台提出加值需求所需的參數
Example request:
curl -X POST \
"http://localhost/api/wallet/deposit" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/deposit"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/wallet/deposit
提領進度查詢
Example request:
curl -X GET \
-G "http://localhost/api/wallet/withdraw" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/withdraw"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/wallet/withdraw
申請錢包提領
Example request:
curl -X POST \
"http://localhost/api/wallet/withdraw" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/wallet/withdraw"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/wallet/withdraw
商店端圖片上傳
Example request:
curl -X POST \
"http://localhost/api/image/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/image/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/image/user
用戶端圖片上傳
Example request:
curl -X POST \
"http://localhost/api/image/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/image/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/image/store
商店端優惠券圖片上傳
Example request:
curl -X POST \
"http://localhost/api/image/coupon" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/image/coupon"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/image/coupon
優惠券資訊更新
Example request:
curl -X PUT \
"http://localhost/api/coupon/upd" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/coupon/upd"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/coupon/upd
商店端待領優惠券&已核銷優惠券頁面
Example request:
curl -X GET \
-G "http://localhost/api/coupon/store/list/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/coupon/store/list/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/coupon/store/list/{page}
商店端檢查用戶是否有特定商店未使用的優惠券
Example request:
curl -X GET \
-G "http://localhost/api/coupon/mobile/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/coupon/mobile/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/coupon/mobile/{mobile}
用戶端檢查自己是否有特定商店未使用的優惠券
Example request:
curl -X GET \
-G "http://localhost/api/coupon/store/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/coupon/store/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/coupon/store/{store_id}
消費者領取店家優惠券
Example request:
curl -X GET \
-G "http://localhost/api/coupon/store/1/type/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/coupon/store/1/type/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/coupon/store/{store_id}/type/{type}
會員端優惠收納箱頁面
Example request:
curl -X GET \
-G "http://localhost/api/coupon/user/list/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/coupon/user/list/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/coupon/user/list/{page}
註冊token
Example request:
curl -X POST \
"http://localhost/api/notify/token" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/notify/token"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/notify/token
平台發送推播給特定端
Example request:
curl -X POST \
"http://localhost/api/notify/myfree" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/notify/myfree"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/notify/myfree
取個人推播歷史紀錄
Example request:
curl -X GET \
-G "http://localhost/api/notify/list/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/notify/list/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/notify/list/store
取得未讀推播總數
Example request:
curl -X GET \
-G "http://localhost/api/notify/unread/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/notify/unread/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/notify/unread/store
標為已讀
Example request:
curl -X PUT \
"http://localhost/api/notify/read/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/notify/read/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/notify/read/store
取個人推播歷史紀錄
Example request:
curl -X GET \
-G "http://localhost/api/notify/list/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/notify/list/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/notify/list/user
取得未讀推播總數
Example request:
curl -X GET \
-G "http://localhost/api/notify/unread/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/notify/unread/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/notify/unread/user
標為已讀
Example request:
curl -X PUT \
"http://localhost/api/notify/read/user" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/notify/read/user"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/notify/read/user
開啟福袋
Example request:
curl -X GET \
-G "http://localhost/api/lucky_bag/open/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/lucky_bag/open/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/lucky_bag/open/{lucky_bag_id}
API:計算每日分潤
Example request:
curl -X GET \
-G "http://localhost/api/sponsor/calculate" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/sponsor/calculate"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/sponsor/calculate
API:計算過往分潤
Example request:
curl -X GET \
-G "http://localhost/api/sponsor/calculate/past" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/sponsor/calculate/past"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/sponsor/calculate/past
平台專用API:提領列表查詢
Example request:
curl -X GET \
-G "http://localhost/api/sponsor/withdraw_list" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/sponsor/withdraw_list"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/sponsor/withdraw_list
平台專用API:修改提領進度
Example request:
curl -X PUT \
"http://localhost/api/sponsor/withdraw" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/sponsor/withdraw"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/sponsor/withdraw
店家取得自己的商品列表
Example request:
curl -X GET \
-G "http://localhost/api/product/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/product/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/product/store
店家取得單一自有商品資訊
Example request:
curl -X GET \
-G "http://localhost/api/product/store/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/product/store/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET api/product/store/{productId}
新增一筆商品
Example request:
curl -X POST \
"http://localhost/api/product/store" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/product/store"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/product/store
店家修改單一自有商品資訊
Example request:
curl -X PUT \
"http://localhost/api/product/store/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/product/store/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/product/store/{productId}
店家刪除單一自有商品
Example request:
curl -X DELETE \
"http://localhost/api/product/store/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/api/product/store/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/product/store/{productId}
店家的Qrcode
Example request:
curl -X GET \
-G "http://localhost/transactions/qr/create/store/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/transactions/qr/create/store/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (500):
{
"message": "Server Error"
}
HTTP Request
GET transactions/qr/create/store/{store_id}
贊助會員註冊 *
Example request:
curl -X GET \
-G "http://localhost/sponsor/register" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sponsor/register"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET sponsor/register
贊助會員註冊 *
Example request:
curl -X POST \
"http://localhost/sponsor/register" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sponsor/register"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST sponsor/register
贊助會員修改
Example request:
curl -X GET \
-G "http://localhost/sponsor/update" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sponsor/update"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET sponsor/update
贊助會員修改
Example request:
curl -X POST \
"http://localhost/sponsor/update" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sponsor/update"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST sponsor/update
贊助會員登入 *
Example request:
curl -X GET \
-G "http://localhost/sponsor/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sponsor/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET sponsor/login
贊助會員登入 *
Example request:
curl -X POST \
"http://localhost/sponsor/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sponsor/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST sponsor/login
贊助會員提領 *
Example request:
curl -X GET \
-G "http://localhost/sponsor/withdraw" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sponsor/withdraw"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET sponsor/withdraw
贊助會員提領 *
Example request:
curl -X POST \
"http://localhost/sponsor/withdraw" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sponsor/withdraw"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST sponsor/withdraw
贊助會員登出 *
Example request:
curl -X GET \
-G "http://localhost/sponsor/logout" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sponsor/logout"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET sponsor/logout
sponsor/detail
Example request:
curl -X GET \
-G "http://localhost/sponsor/detail" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/sponsor/detail"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET sponsor/detail
contracts/{filename}
Example request:
curl -X GET \
-G "http://localhost/contracts/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"http://localhost/contracts/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET contracts/{filename}