# Privage Open API ## Docs - [Welcome to Privage Open API Documents](https://api-docs.privageapp.com/welcome-to-privage-open-api-documents-2092620m0.md): - [Welcome to Privage Open API Documents](https://api-docs.privageapp.com/welcome-to-privage-open-api-documents-1734093m0.md): ## API Docs - Authentication [Generate Exchange Token](https://api-docs.privageapp.com/generate-exchange-token-33666016e0.md): สร้าง exchange token ที่ใช้ได้ 1 ครั้ง (อายุ 60 วินาที) สำหรับ Management Site ส่งให้ iframe ของ add-on แปลงเป็น access + refresh token ต่อไป - Authentication [Exchange Access Token](https://api-docs.privageapp.com/exchange-access-token-33666017e0.md): ในระบบ iframe ของ Add-On จะมีการแนบ Exchange Token มาเพื่อให้ Add-On สามารถนำไปแปลงเป็น access token และ refresh token ที่พร้อมใช้งาน - Authentication [Renew Access Token](https://api-docs.privageapp.com/renew-access-token-33666018e0.md): เรียกใช้เมื่อ access token หมดอายุ (ได้รับ 401) **ไม่ต้องยืนยันตัวตน** — refresh token เป็นหลักฐานในตัวเอง - Authentication [Get Access Token](https://api-docs.privageapp.com/get-access-token-33666019e0.md): ขอ Access Token โดยใช้ API Key และ API Secret จากการติดตั้ง App Connect - Extension Config [Get Current Add-On status](https://api-docs.privageapp.com/get-current-add-on-status-33666020e0.md): รายละเอียดการสมัครสมาชิกที่ใช้งานอยู่ รวมถึงวันที่ของแผน, ข้อมูล Add-on, การตั้งค่า App Connect และข้อมูลธุรกิจ เหมาะสำหรับ Add-on ที่ต้องการตรวจสอบสถานะแผนของตัวเองหรือแสดงข้อมูลธุรกิจ - Campaigns [Get Campaign](https://api-docs.privageapp.com/get-campaign-33666021e0.md): ดูข้อมูลแคมเปญในระบบ - Member Profiles [Get Profile](https://api-docs.privageapp.com/get-profile-33666022e0.md): ตรวจสอบข้อมูลสมาชิก - Transactions [Get Transaction](https://api-docs.privageapp.com/get-transaction-33666023e0.md): ส่งคืนรายการ Transaction ทั้งหมด - Transactions [Add Point](https://api-docs.privageapp.com/add-point-33666024e0.md): API สำหรับเพิ่มคะแนนหรือแปลงยอดมูลค่า (value) เป็นคะแนนให้กับบัตรสมาชิก โดยจะทำงานต่างกันตามค่า method - Transactions [Burn Point](https://api-docs.privageapp.com/burn-point-33666025e0.md): ทำการใช้คะแนนสมาชิกโดยตรง - Transactions [Void Transaction By Id](https://api-docs.privageapp.com/void-transaction-by-id-33666026e0.md): วอยด์รายการโดยใช้รหัส Transaction UUID - Transactions [Void Transaction By RefNo](https://api-docs.privageapp.com/void-transaction-by-refno-33666027e0.md): วอยด์รายการโดยใช้ เลขที่ใบเสร็จ - Transactions [Void Transaction By RefId](https://api-docs.privageapp.com/void-transaction-by-refid-33666028e0.md): วอยด์รายการโดยใช้รหัส Transaction Reference ID - Coupons [Get Coupon Set](https://api-docs.privageapp.com/get-coupon-set-33666029e0.md): รายการชุดคูปองของธุรกิจแบบแบ่งหน้า - Coupons [Create Coupon Set](https://api-docs.privageapp.com/create-coupon-set-33666030e0.md): สร้างชุดคูปองใหม่แบบ `AUTO_GENERATE` คูปองจะถูกสร้างอัตโนมัติเมื่อมอบให้สมาชิกผ่าน endpoint มอบคูปอง - Coupons [Give Coupon to Member ID](https://api-docs.privageapp.com/give-coupon-to-member-id-33666031e0.md): สร้างรหัสคูปองและมอบให้สมาชิก - Coupons [Get Give Coupon History](https://api-docs.privageapp.com/get-give-coupon-history-33666032e0.md): รายการคูปองที่มอบให้สมาชิกรายนั้นแบบแบ่งหน้า - Coupons [Void Give Coupon](https://api-docs.privageapp.com/void-give-coupon-33666033e0.md): ยกเลิกคูปองที่มอบให้แล้ว - Coupons [Check Coupon](https://api-docs.privageapp.com/check-coupon-33666034e0.md): ค้นหาคูปองด้วยรหัส `code` เท่านั้น — **ไม่รับ `static_code`** เพราะอาจอ้างถึงคูปองหลายใบได้ - Coupons [Mark Use Coupon](https://api-docs.privageapp.com/mark-use-coupon-33666035e0.md): ทำเครื่องหมายคูปองเป็น `USED` แบบ atomic - [Get Current Add-On status](https://api-docs.privageapp.com/get-current-add-on-status-31744607e0.md): รายละเอียดการสมัครสมาชิกที่ใช้งานอยู่ รวมถึงวันที่ของแผน, ข้อมูล Add-on, การตั้งค่า App Connect และข้อมูลธุรกิจ เหมาะสำหรับ Add-on ที่ต้องการตรวจสอบสถานะแผนของตัวเองหรือแสดงข้อมูลธุรกิจ - [Get Profile](https://api-docs.privageapp.com/get-profile-31744608e0.md): ตรวจสอบข้อมูลสมาชิก - [Get Coupon Set](https://api-docs.privageapp.com/get-coupon-set-31744609e0.md): รายการชุดคูปองของธุรกิจแบบแบ่งหน้า - [Get Transaction](https://api-docs.privageapp.com/get-transaction-33621131e0.md): ส่งคืนรายการ Transaction ทั้งหมด - [Check Coupon](https://api-docs.privageapp.com/check-coupon-33621132e0.md): ค้นหาคูปองด้วยรหัส `code` เท่านั้น — **ไม่รับ `static_code`** เพราะอาจอ้างถึงคูปองหลายใบได้ - [Get Campaign](https://api-docs.privageapp.com/get-campaign-22070793e0.md): ดูข้อมูลแคมเปญในระบบ - [Exchange Access Token](https://api-docs.privageapp.com/exchange-access-token-31744604e0.md): ในระบบ iframe ของ Add-On จะมีการแนบ Exchange Token มาเพื่อให้ Add-On สามารถนำไปแปลงเป็น access token และ refresh token ที่พร้อมใช้งาน - [Create Coupon Set](https://api-docs.privageapp.com/create-coupon-set-31744610e0.md): สร้างชุดคูปองใหม่แบบ `AUTO_GENERATE` คูปองจะถูกสร้างอัตโนมัติเมื่อมอบให้สมาชิกผ่าน endpoint มอบคูปอง - [Mark Use Coupon](https://api-docs.privageapp.com/mark-use-coupon-33621133e0.md): ทำเครื่องหมายคูปองเป็น `USED` แบบ atomic - [Get Transaction](https://api-docs.privageapp.com/get-transaction-22071347e0.md): ดูข้อมูล Transaction ในระบบ - [Add Point](https://api-docs.privageapp.com/add-point-22071930e0.md): API สำหรับเพิ่มคะแนนหรือแปลงยอดมูลค่า (value) เป็นคะแนนให้กับบัตรสมาชิก โดยจะทำงานต่างกันตามค่า method - [Renew Access Token](https://api-docs.privageapp.com/renew-access-token-31744605e0.md): เรียกใช้เมื่อ access token หมดอายุ (ได้รับ 401) **ไม่ต้องยืนยันตัวตน** — refresh token เป็นหลักฐานในตัวเอง - [Give Coupon to Member ID](https://api-docs.privageapp.com/give-coupon-to-member-id-31744611e0.md): สร้างรหัสคูปองและมอบให้สมาชิก - [Burn Point](https://api-docs.privageapp.com/burn-point-22072168e0.md): ทำการใช้คะแนนสมาชิกโดยตรง - [Void Transaction By Id](https://api-docs.privageapp.com/void-transaction-by-id-22072174e0.md): วอยด์รายการโดยใช้รหัส Transaction UUID - [Get Give Coupon History](https://api-docs.privageapp.com/get-give-coupon-history-31744612e0.md): รายการคูปองที่มอบให้สมาชิกรายนั้นแบบแบ่งหน้า - [Void Transaction By RefNo](https://api-docs.privageapp.com/void-transaction-by-refno-22072180e0.md): วอยด์รายการโดยใช้ เลขที่ใบเสร็จ - [Void Transaction By RefId](https://api-docs.privageapp.com/void-transaction-by-refid-24218798e0.md): วอยด์รายการโดยใช้รหัส Transaction Refernce ID - [Get Access Token](https://api-docs.privageapp.com/get-access-token-22070843e0.md): ขอ Access Token โดยใช้ API Key และ API Secret จากการติดตั้ง App Connect - [Void Give Coupon](https://api-docs.privageapp.com/void-give-coupon-31744613e0.md): ยกเลิกคูปองที่มอบให้แล้ว ## Schemas - [Void Result](https://api-docs.privageapp.com/void-result-12950164d0.md): - [Profile Card](https://api-docs.privageapp.com/profile-card-12950727d0.md): - [ErrorResponse](https://api-docs.privageapp.com/errorresponse-13843808d0.md): - [CouponByCodeBusinessBranch](https://api-docs.privageapp.com/couponbycodebusinessbranch-14349129d0.md): - [CouponInfo](https://api-docs.privageapp.com/couponinfo-14349128d0.md): - [VoidPointsResponse](https://api-docs.privageapp.com/voidpointsresponse-13843829d0.md): - [BurnPointsRequest](https://api-docs.privageapp.com/burnpointsrequest-13843827d0.md): - [AddPointsRequest](https://api-docs.privageapp.com/addpointsrequest-13843826d0.md): - [TransactionListResponse](https://api-docs.privageapp.com/transactionlistresponse-13843825d0.md): - [TransactionItem](https://api-docs.privageapp.com/transactionitem-13843824d0.md): - [CreateCouponSetRequest](https://api-docs.privageapp.com/createcouponsetrequest-13843832d0.md): - [AssignCouponRequest](https://api-docs.privageapp.com/assigncouponrequest-13843833d0.md): - [AssignCouponResponse](https://api-docs.privageapp.com/assigncouponresponse-13843834d0.md): - [AccessTokenResponse](https://api-docs.privageapp.com/accesstokenresponse-13843816d0.md): - [ApiKeyAuthRequest](https://api-docs.privageapp.com/apikeyauthrequest-13843815d0.md): - [TokenPairResponse](https://api-docs.privageapp.com/tokenpairresponse-13843814d0.md): - [RefreshTokenRequest](https://api-docs.privageapp.com/refreshtokenrequest-13843813d0.md): - [TokenExchangeRequest](https://api-docs.privageapp.com/tokenexchangerequest-13843812d0.md): - [ExchangeTokenResponse](https://api-docs.privageapp.com/exchangetokenresponse-13843811d0.md): - [ExchangeTokenRequest](https://api-docs.privageapp.com/exchangetokenrequest-13843810d0.md): - [Pagination](https://api-docs.privageapp.com/pagination-13843809d0.md): - [CouponByCodeMember](https://api-docs.privageapp.com/couponbycodemember-14349130d0.md): - [CouponByCodeResponse](https://api-docs.privageapp.com/couponbycoderesponse-14349131d0.md): - [Campaign](https://api-docs.privageapp.com/campaign-14356209d0.md): - [CampaignList](https://api-docs.privageapp.com/campaignlist-14356210d0.md): - [ExtensionConfigResponse](https://api-docs.privageapp.com/extensionconfigresponse-13843817d0.md): - [ProfileCard](https://api-docs.privageapp.com/profilecard-14356211d0.md): - [CampaignItem](https://api-docs.privageapp.com/campaignitem-13843818d0.md): - [ProfileOtherDataItem](https://api-docs.privageapp.com/profileotherdataitem-14356212d0.md): - [CampaignListResponse](https://api-docs.privageapp.com/campaignlistresponse-13843819d0.md): - [Profile](https://api-docs.privageapp.com/profile-14356213d0.md): - [MemberCard](https://api-docs.privageapp.com/membercard-13843820d0.md): - [ProfileList](https://api-docs.privageapp.com/profilelist-14356214d0.md): - [OtherDataField](https://api-docs.privageapp.com/otherdatafield-13843821d0.md): - [Transaction](https://api-docs.privageapp.com/transaction-14356215d0.md): - [ProfileItem](https://api-docs.privageapp.com/profileitem-13843822d0.md): - [TransactionList](https://api-docs.privageapp.com/transactionlist-14356216d0.md): - [ProfileListResponse](https://api-docs.privageapp.com/profilelistresponse-13843823d0.md): - [AddPointsResponse](https://api-docs.privageapp.com/addpointsresponse-14356217d0.md): - [BurnPointsResponse](https://api-docs.privageapp.com/burnpointsresponse-14356218d0.md): - [PointsTransactionResponse](https://api-docs.privageapp.com/pointstransactionresponse-13843828d0.md): - [CouponSet](https://api-docs.privageapp.com/couponset-14356219d0.md): - [CouponSetList](https://api-docs.privageapp.com/couponsetlist-14356220d0.md): - [CouponSetItem](https://api-docs.privageapp.com/couponsetitem-13843830d0.md): - [CouponSetListResponse](https://api-docs.privageapp.com/couponsetlistresponse-13843831d0.md): - [AssignCouponItem](https://api-docs.privageapp.com/assigncouponitem-14356221d0.md): - [MemberCouponItem](https://api-docs.privageapp.com/membercouponitem-13843835d0.md): - [MemberCoupon](https://api-docs.privageapp.com/membercoupon-14356222d0.md): - [MemberCouponListResponse](https://api-docs.privageapp.com/membercouponlistresponse-13843836d0.md): - [MemberCouponList](https://api-docs.privageapp.com/membercouponlist-14356223d0.md): - [VoidCouponResponse](https://api-docs.privageapp.com/voidcouponresponse-13843837d0.md): - [CouponByCode](https://api-docs.privageapp.com/couponbycode-14356224d0.md): - [UseCouponRequest](https://api-docs.privageapp.com/usecouponrequest-14356225d0.md): - [UseCouponResponse](https://api-docs.privageapp.com/usecouponresponse-14356226d0.md):