GetPromotionDetails_API

Description

Parameters

Passed

Returned

This method delivers promotion details.

2 8

Important: This method is applicable to promotions with maximum 300 one-time promo codes.

Syntax

Copy
ItemResult BM::GetPromotionDetails_API(

  Str Key;

  Str Value.

)

returns

Copy
  Int Promotion ID;

  Str Name;

  Int Owner Account ID;

  Int PromotionType;

  Str Promotion Code;

  Str Condition;

  Int NumOf_OneTimePromoCodes;

  Array of Str items.

Parameters Description

Input parameters:

  • Str Key: The key which will be used for obtaining the promotion details. Allowed values:
    • PromoID;
    • PromoCode;
  • Str Value: The value of the Key parameter. The parameter takes one of these values:
    • a string promotion ID in Billing when Key = PromoID;
    • a string promotion code in Billing when Key = PromoCode.

Output parameters:

  • Int Promotion ID – Promotion ID in Billing;
  • Str Name – Promotion name in Billing;
  • Int Owner Account ID – Promotion owner in Billing;
  • Int PromotionType – Number indicating the promotion type. The parameter can take one of these values:
    • 0: Promotion By Promo Code;

      Note: For PromotionType = 0, the Promotion table in Billing DB may contain several records with the same PromoCode (and different PromoIDs). In such a case, if you pass PromoCode in the input, the response will contain information only from the first of the corresponding records in the Promotion table. To receive information from a particular record, pass the corresponding PromoID in the input.

    • 10: Promotion By Parent Plans;
    • 20: Global Promotion;
    • 30: Promotion by One-Time Promo Codes.
  • Str Promotion Code – Promotion code. The value is equal to:
    • Promotion code in <Billing_name> if Promotion Type is 0 (i.e. Promotion By Promo Code);
    • Null if Promotion Type has one of these values:
      • 10: Promotion By Parent Plans;
      • 20: Global Promotion;
      • 30: Promotion by One-Time Promo Codes;
  • Str Condition – Logical condition that defines how the promotion will be applied;
  • Int NumOf_OneTimePromoCodes: Number of promotion codes (>=0). The parameter returns:
    • A number above zero – if promotion type is 30 (Promotion by One-Time Promo Codes) and there is at least one Promo Code.
    • 0 – in these cases:
      • Promotion type is 30 (Promotion by One-Time Promo Codes) but there are no Promo Codes;
      • Promotion type is not 30 (see above);
  • Array of Str items in the format PROMOCODE=STATUS. The parameter is returned only if Promotion Type is 30 (Promotion by One-Time Promo Codes). STATUS can take one of these values:
    • 0: Not Used
    • 10: Allocated
    • 20: In Use
    • 30: Used