Applets
An applet is a discoverable container of functions and features that users can add to their wallets. It can hold Centrapay assets and loyalty programs, or be an externally-hosted web application.
Applet Model
Attributes
Applet Extensions
Loyalty Extension Model
Attributes
-
type
string -
loyaltyProgramId
string -
getPromotionsUrl
string -
getPromotionMembershipsUrl
string -
getLoyaltyProgramUrl
string
Create Applet experimental
This endpoint allows you to create an Applet .
Attributes
-
name
string required -
accountId
string required -
mediaUploadId
string -
extensions
array
Errors
-
ACCOUNT_TYPE_INVALID
403 -
MEDIA_UPLOAD_INVALID
403 -
APPLET_EXTENSIONS_INVALID
403
curl -X POST \ https://service.centrapay.com/api/applets \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>' \ -d '{ "name": "Centrapay Cafe Applet", "mediaUploadId": "8aoMfscvtuewsuJzmzBzAs", "accountId": "Jaim1Cu1Q55uooxSens6yk", "extensions": [ { "type": "loyalty", "loyaltyProgramId": "L001", "getPromotionsUrl": "service.payap.com/api/loyaltyPrograms/L001/promotions", "getPromotionMembershipsUrl": "service.payap.com/api/loyaltyPrograms/L001/promotionMemberships", "getLoyaltyProgramUrl": "service.payap.com/api/loyaltyPrograms/L001" } ]}'
{ "id": "WRhAxxWpTKb5U7pXyxQjjY", "name": "Centrapay Cafe", "mediaUploadId": "8aoMfscvtuewsuJzmzBzAs", "img": "https://media-upload.centrapay.com/image.png?jhbdsfau67ewejshb=487hsdjhbdgs743", "accountId": "Jaim1Cu1Q55uooxSens6yk", "createdAt": "2021-08-25T00:02:49.488Z", "createdBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99", "extensions": [ { "type": "loyalty", "loyaltyProgramId": "L001", "getPromotionsUrl": "service.payap.com/api/loyaltyPrograms/L001/promotions", "getPromotionMembershipsUrl": "service.payap.com/api/loyaltyPrograms/L001/promotionMemberships", "getLoyaltyProgramUrl": "service.payap.com/api/loyaltyPrograms/L001" } ]}
curl -X GET \ https://service.centrapay.com/api/accounts/Jaim1Cu1Q55uooxSens6yk/applets \ -H 'content-type: application/json' \ -H 'x-api-key: <TOKEN>'
{ "items": [ { "id": "WRhAxxWpTKb5U7pXyxQjjY", "name": "Centrapay Cafe", "mediaUploadId": "8aoMfscvtuewsuJzmzBzAs", "img": "https://media-upload.centrapay.com/image.png?jhbdsfau67ewejshb=487hsdjhbdgs743", "accountId": "Jaim1Cu1Q55uooxSens6yk", "createdAt": "2021-08-25T00:02:49.488Z", "createdBy": "crn::user:b657195e-dc2f-11ea-8566-e7710d592c99", "extensions": [ { "type": "loyalty", "loyaltyProgramId": "L001", "getPromotionsUrl": "service.payap.com/api/loyaltyPrograms/L001/promotions", "getPromotionMembershipsUrl": "service.payap.com/api/loyaltyPrograms/L001/promotionMemberships", "getLoyaltyProgramUrl": "service.payap.com/api/loyaltyPrograms/L001" } ] } ]}