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

  • id

    string

    The unique identifier of the Applet.

  • name

    string

    The display name of the Applet.

  • mediaUploadId

    string

    The id of the Media Upload image of the Applet.

  • img

    string

    The img URL of the Applet.

  • status

    string

    The status of the Applet.

  • accountId

    string

    The Account that owns the Applet.

  • createdAt

    timestamp

    When the Applet was created.

  • createdBy

    crn

    The User or API Key that created the Applet.

  • test

    boolean

    true if the Applet is for testing purposes only.


Create Applet experimental

This endpoint allows you to create an Applet .

Attributes

  • name

    string required

    The display name of the Applet.

  • accountId

    string required

    The Account that will own the Applet.

  • mediaUploadId

    string

    The id of the Media Upload image of the Applet.

Errors

  • ACCOUNT_TYPE_INVALID

    403

    The Account must be type org.

  • MEDIA_UPLOAD_INVALID

    403

    The media upload id does not reference a media upload.

Request
curl -X POST \
https://service.centrapay.com/api/appletss \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>' \
-d '
{
"name": "Centrapay Cafe Applet",
"mediaUploadId": "8aoMfscvtuewsuJzmzBzAs",
"accountId": "Jaim1Cu1Q55uooxSens6yk"
}
'
Response
{
"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"
}