Skip to content

ຂໍ້ມູນຍອດເງິນ

API ນີ້ໃຊ້ເພື່ອດຶງຂໍ້ມູນຍອດເງິນປະຈຸບັນຂອງບັນຊີທີ່ລະບຸ.

ເສັ້ນທາງ (Endpoint)

GET https://open-api.q23.co/termgame/{identifier}/get-balance

ແທນທີ່ {identifier} ດ້ວຍລະຫັດຂອງທ່ານ.

Example:

https://open-api.q23.co/termgame/therdy/get-balance

https://open-api.q23.co/termgame/q23/get-balance
ຊື່ Headerຈຳເປັນຄຳອະທິບາຍ
agent-tokenລະຫັດຜ່ານສຳລັບການຢືນຢັນ

ຕົວຢ່າງ:

agent-token: agent_password

ຄຳຕອບ (Response)

ຖ້າສຳເລັດ ຈະໄດ້ຮັບ JSON ດັ່ງນີ້:

json
{
  "name": "shop.therdy.co",
  "balance": 9762001
}

ລາຍລະອຽດຄ່າທີ່ຕອບກັບ

ຊື່ຄ່າປະເພດຄຳອະທິບາຍ
namestringຊື່ບັນຊີ
balancenumberຍອດເງິນປະຈຸບັນ

ຕົວຢ່າງການໃຊ້ງານ

cURL

bash
curl -X GET \
  'https://open-api.q23.co/termgame/your_identifier_here/get-balance' \
  -H 'agent-token: agent_password'

JavaScript

javascript
fetch("https://open-api.q23.co/termgame/your_identifier_here/get-balance", {
  method: "GET",
  headers: {
    "agent-token": "agent_password",
  },
})
  .then((response) => response.json())
  .then((data) => console.log(data))
  .catch((error) => console.error("Error:", error));