การใช้งาน POSPOS Developer API

การเรียกใช้งาน POSPOS Developer (0.3)
POSPOS มี APIs ให้นักพัฒนาเรียกใช้ได้หลักๆ ดังนี้
- Transaction API
- Stock API
- Member API
- Sell-Credit API
API จะมี 3 Licenses
- Trial (เรียกไม่เกิน 1 ครั้ง/ชม.)
- Registered (เรียกไม่เกิน 10 ครั้ง/ชม. - Smart Package ขึ้นไป)
- Business (เรียกไม่เกิน 100 ครั้ง/ชม. - มีค่าใช้จ่ายเพิ่มเติม)
การขอ API Key
- ผู้ขอ Key จะต้อง Login ด้วย POSPOS Shop Owner (เจ้าของร้าน)
- ก๊อบปี้ Token Key จากหน้า User Profile Setting แล้วส่งให้เจ้าหน้าที่ทาง support@pospos.co
- เจ้าหน้าที่จะทำการตรวจสอบเพื่ออนุมัติ Token Key ให้เป็น API Key ส่งกลับไปที่ผู้ขอผ่านอีเมล
การเรียกใช้งาน API
- เรียกใช้ผ่าน RESTful API พร้อมแนบ API Key มากับ Http Header
- ผู้ใช้งานต้องรักษา Key ไว้ให้ดี หากมีการใช้งานเกิน Quota ระบบจะยกเลิก Keys และ บริการโดยอัตโนมัติ ตามเงื่อนไขของแต่ละ POSPOS Subscription
ตัวอย่างการเรียกใช้งาน API ผ่าน Postman
API: Get Transactions
Call to feed payment transactions. The number of transactions is set by duration attached in the string query.
Example: Transactions between 2021-01-06T17:00:00.000Z to 2021-01-08T16:59:59.999Z
*URL (HTTP GET)
https://posposgo.co/developer/api/transactions?page=1&limit=200&start=2021-01-06&end=2021-01-08
*String Query
page : {page_offset}
limit : {transaction limit per request}
start : {begin date and time}
end : {end date and time}
*Header
apikey: {YOUR_API_KEY}
|
API: Get All Products-Stock
Call to feed all product stock information in array.
*URL (HTTP GET)
https://posposgo.co/developer/api/stock
*Header
apikey: {YOUR_API_KEY}
|
API: Get Product Stock by Id
Call to get all information of specific product including stock - by product id
*URL (HTTP GET)
https://posposgo.co/developer/api/stock/{product_id}
*Header
apikey: {YOUR_API_KEY}
|
API: Get All Members
Call to feed all members.
*URL (HTTP GET)
https://posposgo.co/developer/api/member
*Header
apikey: {YOUR_API_KEY}
|
API: Get Sell-Credit
Call to feed all credit sell (ค้างจ่าย).
*URL (HTTP GET)
https://posposgo.co/developer/api/credit?{string query}
*String Query
page : {page_offset}
limit : {limit per request}
period : {ALL | OUT_OF_PERIOD | IN_OF_PERIOD}
status : {paid | pending}
*Header
apikey: {YOUR_API_KEY}
|
We are working hard to publish more APIs.
:)
Tags:
API,
tech,
พัฒนาธุรกิจ