diff --git a/api/promotions/index.html b/api/promotions/index.html index 6358ec662..e812eac40 100644 --- a/api/promotions/index.html +++ b/api/promotions/index.html @@ -31,11 +31,11 @@ window.addEventListener('beforeunload', () => { localStorage.setItem('sidebar-scroll', leftSidebar.scrollTop); }); -

Promotions

Promotions are a mechanism to reward accounts for completing certain actions.

+

Promotions

Promotions are a mechanism to reward accounts for completing certain actions.

Attributes

  • id

    string

    The unique identifier for the Promotion.

  • accountId

    string

    The ID of the Account  API  that owns the Promotion.

  • name

    string

    The display name of the Promotion.

  • programId

    string

    The ID of the Loyalty Program  API  that the Promotion belongs to.

  • description

    string

    The display description for the Promotion.

  • mediaUploadId

    string

    The ID of the Media Upload  API  image of the Promotion.

  • img

    string

    The img URL of the Promotion.

  • startsAt

    timestamp

    The timestamp of when the Promotion starts.

  • endsAt

    timestamp

    The timestamp of when the Promotion ends.

  • rewards

    array

    A list of Rewards  API  that the account will receive upon completing the Promotion.

  • activityType

    string

    The type of Activity that will trigger increments and completions of the Promotion.

  • target

    object

    Describes how to complete the promotion. See Promotion Target  API .

  • type

    string

    The type of Promotion. Can be cashback or challenge. challenge rewards the account once, after the challenge target is met. cashback gives a reward based on the payment amount, which can be completed an unlimited amount of times.

  • conditions

    array

    The list of Conditions  API  that need to be met when incrementing/completing the Promotion.

+
  • id

    string

    The unique identifier for the Promotion.

  • accountId

    string

    The ID of the Account  API  that owns the Promotion.

  • name

    string

    The display name of the Promotion.

  • programId

    string

    The ID of the Loyalty Program  API  that the Promotion belongs to.

  • description

    string

    The display description for the Promotion.

  • mediaUploadId

    string

    The ID of the Media Upload  API  image of the Promotion.

  • img

    string

    The img URL of the Promotion.

  • startsAt

    timestamp

    The timestamp of when the Promotion starts.

  • endsAt

    timestamp

    The timestamp of when the Promotion ends.

  • rewards

    array

    A list of Rewards  API  that the account will receive upon completing the Promotion.

  • eventType

    string

    The type of Event that will trigger increments and completions of the Promotion.

  • target

    object

    Describes how to complete the promotion. See Promotion Target  API .

  • type

    string

    The type of Promotion. Can be cashback or challenge. challenge rewards the account once, after the challenge target is met. cashback gives a reward based on the payment amount, which can be completed an unlimited number of times.

  • conditions

    array

    The list of Conditions  API  that need to be met when incrementing/completing the Promotion.

Attributes

  • name

    stringrequired

    The display name of the Promotion.

  • description

    string

    The display description for the Promotion.

  • mediaUploadId

    string

    The ID of the Media Upload  API  image of the Promotion.

  • startsAt

    timestamp

    The timestamp of when the Promotion starts.

  • endsAt

    timestamp

    The timestamp of when the Promotion ends.

  • rewards

    arrayrequired

    A list of Rewards  API  that the account will receive upon completing the Promotion.

  • activityType

    stringrequired

    The type of Activity that will trigger increments and completions of the Promotion.

  • target

    object

    Describes how to complete the promotion. See Promotion Target  API .

  • type

    stringrequired

    The type of Promotion. Can be cashback or challenge. challenge rewards the account once, after the challenge target is met. cashback gives a reward based on the payment amount, which can be completed an unlimited amount of times.

  • conditions

    array

    The list of Conditions  API  that need to be met when incrementing/completing the Promotion.

Errors

  • name

    stringrequired

    The display name of the Promotion.

  • description

    string

    The display description for the Promotion.

  • mediaUploadId

    string

    The ID of the Media Upload  API  image of the Promotion.

  • startsAt

    timestamp

    The timestamp of when the Promotion starts.

  • endsAt

    timestamp

    The timestamp of when the Promotion ends.

  • rewards

    arrayrequired

    A list of Rewards  API  that the account will receive upon completing the Promotion.

  • eventType

    stringrequired

    The type of Event that will trigger increments and completions of the Promotion.

  • target

    object

    Describes how to complete the promotion. See Promotion Target  API .

  • type

    stringrequired

    The type of Promotion. Can be cashback or challenge. challenge rewards the account once, after the challenge target is met. cashback gives a reward based on the payment amount, which can be completed an unlimited number of times.

  • conditions

    array

    The list of Conditions  API  that need to be met when incrementing/completing the Promotion.

Errors

  • PROMOTION_REWARDS_INVALID

    403

    One or more of the rewards ledgers does not exist or permissions are invalid.

Request
POST/api/loyalty-programs/WRhAxxWpTKb5U7pXyxQjjY/promotions
curl -X POST \
  https://service.centrapay.com/api/loyalty-programs/WRhAxxWpTKb5U7pXyxQjjY/promotions \
@@ -69,7 +69,7 @@
    "amount": "500"
   }
  ],
- "activityType": "payment",
+ "eventType": "payment",
  "target": {
   "type": "count",
   "amount": "1"
@@ -101,7 +101,7 @@
       "amount": "500"
     }
   ],
-  "activityType": "payment",
+  "eventType": "payment",
   "target": {
     "type": "count",
     "amount": "1"
@@ -144,7 +144,7 @@
           "amount": "500"
         }
       ],
-      "activityType": "payment",
+      "eventType": "payment",
       "target": {
         "type": "count",
         "amount": 1