diff --git a/api/promotions/index.html b/api/promotions/index.html index 8f6565fc0..b4b07423d 100644 --- a/api/promotions/index.html +++ b/api/promotions/index.html @@ -31,7 +31,7 @@ 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

  • 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  API  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

  • 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

    array

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

  • eventType

    stringrequired

    The type of Event  API  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 \