# POS Replies ## Innercircle authentication Always visible and usable **Backend reply to POS** ``` { data: { "customerId": "32c27350-46c5-11ee-a072-0d1f6b3ce3c4", } } ``` --- ## Coupon Can be used only once per user **App** Hygraph GetCoupons type = "coupon" BE GetUserUsedCoupons Other exceptions and filtering related (will add later) **Backend reply to POS** ``` { data: { "customerId": "32c27350-46c5-11ee-a072-0d1f6b3ce3c4", "discountList": [ { "posDiscountId": "afe998ca-293b-4521-9803-0e9aaa7f6deb", "discountId": "C123" } ] } } ``` **Data for discountList:** posDiscountId - from Hygraph discountId - from Hygraph (couponId) --- ## Reward Can be used multiple times if user has enough reward points **App** Hygraph GetCoupons type = "reward" BE GetUserRewardPoints **Backend reply to POS** ``` { data: { "customerId": "32c27350-46c5-11ee-a072-0d1f6b3ce3c4", "discountList": [ { "posDiscountId": "afe998ca-293b-4521-9803-0e9aaa7f6deb", "discountId": "1200_REWARD-CODE" }, ], "paymentList": [ { "posTenderId": "6729a2f7-dac3-4ef9-ab11-66c082177747", "paymentId": "REWARDPOINTS", "posDiscountId": "afe998ca-293b-4521-9803-0e9aaa7f6deb" } ] } } ``` **Data for discountList:** posDiscountId - from Hygraph discountId - from Hygraph (couponId) **Data for paymentList:** posTenderId - hardcoded (different from giftcard) paymentId - hardcoded posDiscountId - from Hygraph --- ## GiftCard (Real) Can be used as money at cafe Full amount sent to POS and calculations needed to mark decrease used **App** BE GetUserGiftcardPoints **Backend reply to POS** ``` { "data": { "customerId": "32c27350-46c5-11ee-a072-0d1f6b3ce3c4", "paymentList": [ { "posTenderId": "57b5d4ca-48c0-4aad-b07e-711fd4c73051", "paymentId": "APP_GIFTCARD", "amount": 1000 } ] } } ``` **Data for paymentList:** posTenderId - hardcoded paymentId - hardcoded amount - full amount left calculated from BE --- ## GiftCard (HackOneUse) **App** NOT RELATED TO APP **Backend reply to POS** if code not used ``` { "data": { "customerId": "00000000-0000-0000-0000-000000000001", "paymentList": [ { "posTenderId": "57b5d4ca-48c0-4aad-b07e-711fd4c73051", "paymentId": "APP_GIFTCARD", "amount": 1000 } ] } } ``` **Data for paymentList:** posTenderId - hardcoded paymentId - hardcoded amount - hardcoded if code used ``` { "data": { "customerId": "00000000-0000-0000-0000-000000000001", "posMessage": "Lahjakortti on käytetty" } } ``` "lahjakortti on käytetty" = "Giftcard has been used"