BILLmanager 6
en En
es Es
We want your feedback!
Take our survey and help us improve the ISPsystem ecosystem as our lead advisor
Take the survey

Referral programs (referralprogram)

referralprogram

Access level: user

The function provides a list of available referral programs.

Data retrieval:

  • Result: list of referral programs in bjson format.

Request parameters:

ParameterValue
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "elem": [
    {
      "id": "1",
      "locale_name": "string",
      "assign_by_default": "on",
      "locale_url": "string",
      "project_name": "string"
    }
  ]
}

referralprogram.edit

Access level: user

The function is intended for creating or editing a referral program.

Data modification:

  • Parameters:
    • sok — the parameter value must be non-empty, usually ok;
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.edit.
sokForm submission confirmation. Usually takes the value ok.
outResponse format. Default is bjson.
projectProvider under which this referral program is active.
nameName of the referral program displayed to the client.
promocodePromocode template. Use @ID@ in the position where the partner’s ID should be inserted. If a referral enters a promocode matching this template, the client will be credited to the partner.
start_dateThe referral program will start generating rewards for expenses created after this date.
end_dateThe referral program will generate rewards for expenses created before this date.
assign_by_defaultIf specified, the referral program will be automatically assigned to a client upon becoming the customer of the provider. Only one referral program can be assigned by default.
urlProvider’s website URL. Each partner will have a unique link. The client’s ID will be appended to this URL.
account_groupClient group for which participation in the referral program is available. Value restrict: prohibit participation for members of the group.
account_group_restrictGroup whose clients will not receive rewards under the referral program.
Example response for successful execution (code 200):
{
  "func": "referralprogram.edit",
  "ok": true,
  "id": "1"
}

referralprogram.edit

Access level: user

The function is intended for editing an existing referral program.

Data modification:

  • Parameters:
    • sok — the parameter value must be non-empty, usually ok;
    • elid — unique identifier of the referral program being edited;
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.edit.
sokForm submission confirmation. Usually takes the value ok.
elidUnique identifier of the referral program.
outResponse format. Default is bjson.
projectProvider under which this referral program is active.
nameName of the referral program displayed to the client.
promocodePromocode template. Use @ID@ in the position where the partner’s ID should be inserted. If a referral enters a promocode matching this template, the client will be credited to the partner.
start_dateThe referral program will start generating rewards for expenses created after this date.
end_dateThe referral program will generate rewards for expenses created before this date.
assign_by_defaultIf specified, the referral program will be automatically assigned to a client upon becoming the customer of the provider. Only one referral program can be assigned by default.
urlProvider’s website URL. Each partner will have a unique link: the client’s ID will be appended to this URL.
account_groupClient group for which participation in the referral program is available. Value restrict: prohibit participation for members of the group.
account_group_restrictGroup whose clients will not receive rewards under the referral program.
Example response for successful execution (code 200):
{
  "func": "referralprogram.edit",
  "ok": true
}

referralprogram.delete

Access level: user

The function is intended for deleting an existing referral program.

Data modification:

  • Parameters:
    • elid — unique identifier of the referral program to be deleted.
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.delete.
elidUnique identifier of the item (referral program).
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "func": "referralprogram.delete",
  "ok": true
}

referralprogram.rule

Access level: user

The function provides a list of rules associated with the specified referral program.

Data retrieval:

  • Result: list of referral program rules in bjson format.

Request parameters:

ParameterDescription
elidUnique identifier of the referral program.
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "elem": [
    {
      "id": "1",
      "reward": "string",
      "reward_period": "string",
      "reward_payment_interval": "string",
      "orderpriority": "string"
    }
  ]
}

referralprogram.rule.edit

Access level: user

The function is intended for creating a new rule within the specified referral program.

Data modification:

  • Parameters:
    • sok — the parameter value must be non-empty, usually ok;
    • plid — unique identifier of the parent referral program.
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.rule.edit.
sokForm submission confirmation. Usually takes the value ok.
plidUnique identifier of the parent item (referral program).
outResponse format. Default is bjson.
reward_method

Method of rewarding the referrer for attracting new clients:

  • 0 — funds to the account balance;
  • 1 — bonuses.
reward_value_type

Method for determining the reward amount:

  • 0 — calculated;
  • 1 — fixed.
reward_value_fixed_moneyFixed monetary amount paid to the referrer as a reward.
reward_value_fixed_bonusFixed bonus amount paid to the referrer as a reward.
reward_value_percentReward amount expressed as a percentage.
reward_max_amountMaximum reward amount. If the calculated amount exceeds this value, only the limit is paid.
reward_moment

Moment when the referrer’s purchases begin to be counted:

  • 0 — after the referral’s purchase;
  • 1 — after a specified period has elapsed.
reward_months_afterNumber of months after which the reward is paid. If the service is terminated earlier, no reward is issued.
reward_expense_period

Determines which expenses are considered when calculating the reward:

  • 0 — only those created at the time of purchase;
  • 1 — all expenses created from the moment of purchase until the reward is issued.
reward_periodPeriod (in months) during which rewards are paid based on the referral’s expenses.
reward_payment_intervalReward payment interval, specified in months.
reward_double_sidedAt the moment the reward is paid to the referrer, bonuses of the specified amount will also be credited to the referral.
orderpriorityPriority for applying rules within the referral program. The lower the value, the higher the priority.
Example response for successful execution (code 200):
{
  "func": "referralprogram.rule.edit",
  "ok": true
}

referralprogram.rule.edit

Access level: user

The function is intended for editing an existing rule within the specified referral program.

Data modification:

  • Parameters:
    • sok — the parameter value must be non-empty, usually ok;
    • plid — unique identifier of the parent referral program;
    • elid — unique identifier of the rule being edited.
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.rule.edit.
sokForm submission confirmation. Usually takes the value ok.
plidUnique identifier of the parent item (referral program).
elidUnique identifier of the item (rule being edited).
outResponse format. Default is bjson.
reward_method

Method of rewarding the referrer for attracting new clients:

  • 0 — funds to the account balance;
  • 1 — bonuses.
reward_value_type

Method for determining the reward amount:

  • 0 — calculated;
  • 1 — fixed.
reward_value_fixed_moneyFixed monetary amount paid to the referrer as a reward.
reward_value_fixed_bonusFixed bonus amount paid to the referrer as a reward.
reward_value_percentReward amount expressed as a percentage.
reward_max_amountMaximum reward amount. If the calculated amount exceeds this value, only the limit is paid.
reward_moment

Moment when the referral’s purchases begin to be counted:

  • 0 — after the referral’s purchase;
  • 1 — after a specified period has elapsed.
reward_months_afterNumber of months after which the reward is paid. If the service is terminated earlier, no reward is issued.
reward_expense_period

Expenses considered when calculating the reward:

  • 0 — only those created at the time of purchase;
  • 1 — all expenses created from the moment of purchase until the reward is issued.
reward_periodPeriod (in months) during which rewards are paid based on the referral’s expenses.
reward_payment_intervalReward payment interval, specified in months.
reward_double_sidedAt the moment the reward is paid to the referrer, bonuses of the specified amount will also be credited to the referral.
orderpriorityPriority for applying rules within the referral program. The lower the value, the higher the priority.
Example response for successful execution (code 200):
{
  "func": "referralprogram.rule.edit",
  "ok": true
}

referralprogram.rule.delete

Access level: user

The function is intended for deleting a referral program rule.

Data modification:

  • Parameters:
    • plid — unique identifier of the parent referral program;
    • elid — unique identifier of the rule to be deleted.
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.rule.delete.
plidUnique identifier of the parent item (referral program).
elidUnique identifier of the item (rule to be deleted).
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "func": "referralprogram.rule.delete",
  "ok": true
}

referralprogram.rule.condition

Access level: user

The function provides a list of conditions associated with the specified referral program rule.

Data retrieval:

  • Result: list of conditions in bjson format.

Request parameters:

ParameterDescription
plidUnique identifier of the parent item (referral program).
elidUnique identifier of the item (rule).
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "elem": [
    {
      "id": "1",
      "condition": "string",
      "group": "string"
    }
  ]
}

referralprogram.rule.condition.edit

Access level: user

The function is intended for creating a new condition within a referral program rule.

Data modification:

  • Parameters:
    • sok — the parameter value must be non-empty, usually ok;
    • plid — unique identifier of the parent referral program.
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.rule.condition.edit.
sokForm submission confirmation. Usually takes the value ok.
plidUnique identifier of the parent item (referral program).
outResponse format. Default is bjson.
ctype

Referral program condition:

  • 0 — no conditions;
  • 1 — referral’s sales volume;
  • 2 — number of services purchased by the referral;
  • 3 — number of referrals brought by the referrer;
  • 4 — total sales volume of all referrals.
orderperiodsPeriod of the referral’s service orders.
comparisonComparison operator (e.g., "greater than", "less than or equal to", etc.). Specific values depend on the condition context.
amount_ctype_1Total amount of the referral’s expenses during the period defined by the referral program rule schedule.
amount_ctype_4Total amount of all referrals’ expenses during the period defined by the referral program rule schedule.
item_countNumber of services purchased by the referral throughout the entire duration of the referral program.
referral_countTotal number of the referrer’s referrals at the current moment.
group

You can group conditions. Conditions within a group are combined with the OR operator. Groups themselves are combined with the AND operator. Example: conditions A, B, and C belong to one group, and D and E to another. The resulting expression: (A OR B OR C) AND (D OR E).

The parameter accepts one of the following values:

  • none — no group;
  • new — create a new condition group.
groupnameEnter the name of the condition group.
Example response for successful execution (code 200):
{
  "func": "referralprogram.rule.condition.edit",
  "ok": true
}

referralprogram.rule.condition.edit

Access level: user

The function is intended for creating a new condition within a referral program rule.

Data modification:

  • Parameters:
    • sok — the parameter value must be non-empty, usually ok;
    • plid — unique identifier of the parent referral program.
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.rule.condition.edit.
sokForm submission confirmation. Usually takes the value ok.
plidUnique identifier of the parent item (referral program).
outResponse format. Default is bjson.
ctype

Referral program condition:

  • 0 — no conditions;
  • 1 — referral’s sales volume;
  • 2 — number of services purchased by the referral;
  • 3 — number of referrals brought by the referrer;
  • 4 — total sales volume of all referrals.
orderperiodsPeriod of the referral’s service orders.
comparisonComparison operator (e.g., "greater than", "less than or equal to", etc.). Specific values depend on the condition context.
amount_ctype_1Total amount of the referral’s expenses during the period defined by the referral program rule schedule.
amount_ctype_4Total amount of all referrals’ expenses during the period defined by the referral program rule schedule.
item_countNumber of services purchased by the referral throughout the entire duration of the referral program.
referral_countTotal number of the referrer’s referrals at the current moment.
group

You can group conditions. Conditions within a group are combined with the OR operator. Groups themselves are combined with the AND operator. Example: conditions A, B, and C belong to one group, and D and E to another. The resulting expression: (A OR B OR C) AND (D OR E).

  • none — no group;
  • new — create a new condition group.
groupnameEnter the name of the condition group.
Example response for successful execution (code 200):
{
  "func": "referralprogram.rule.condition.edit",
  "ok": true,
  "id": "1"
}

referralprogram.rule.condition.edit

Access level: user

The function is intended for editing an existing condition within a referral program rule.

Data modification:

  • Parameters:
    • sok — the parameter value must be non-empty, usually ok;
    • plid — unique identifier of the parent referral program;
    • elid — unique identifier of the condition being edited.
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.rule.condition.edit.
sokForm submission confirmation. Usually takes the value ok.
plidUnique identifier of the parent item (referral program).
elidUnique identifier of the item (condition being edited).
outResponse format. Default is bjson.
ctype

Referral program condition:

  • 0 — no conditions;
  • 1 — referral’s sales volume;
  • 2 — number of services purchased by the referral;
  • 3 — number of referrals brought by the referrer;
  • 4 — total sales volume of all referrals.
orderperiodsPeriod of the referral’s service orders.
comparisonComparison operator (e.g., "greater than", "less than or equal to", etc.). Specific values depend on the condition context.
amount_ctype_1Total amount of the referral’s expenses during the period defined by the referral program rule schedule.
amount_ctype_4Total amount of all referrals’ expenses during the period defined by the referral program rule schedule.
item_countNumber of services purchased by the referral throughout the entire duration of the referral program.
referral_countTotal number of the referrer’s referrals at the current moment.
group

You can group conditions. Conditions within a group are combined with the OR operator. Groups themselves are combined with the AND operator. Example: conditions A, B, and C belong to one group, and D and E to another. The resulting expression: (A OR B OR C) AND (D OR E).

  • none — no group;
  • new — create a new condition group.
groupnameEnter the name of the condition group.
Example response for successful execution (code 200):
{
  "func": "referralprogram.rule.condition.edit",
  "ok": true
}

referralprogram.rule.condition.delete

Access level: user

The function is intended for deleting a referral program condition.

Data modification:

  • Parameters:
    • plid — unique identifier of the parent referral program;
    • elid — unique identifier of the condition to be deleted.
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.rule.condition.delete.
plidUnique identifier of the parent item (referral program).
elidUnique identifier of the condition to be deleted.
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "func": "referralprogram.rule.condition.delete",
  "ok": true
}

referralprogram.rule.up

Access level: user

The function is intended to increase the priority of a referral program rule by moving it up in the list.

Data modification:

  • Parameters:
    • plid — unique identifier of the parent referral program;
    • elid — unique identifier of the rule whose priority is being increased.
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.rule.up.
plidUnique identifier of the parent item (referral program).
elidUnique identifier of the rule.
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "func": "referralprogram.rule.up",
  "ok": true
}

referralprogram.rule.down

Access level: user

The function is intended to decrease the priority of a referral program rule by moving it down in the list.

Data modification:

  • Parameters:
    • plid — unique identifier of the parent referral program;
    • elid — unique identifier of the rule whose priority is being decreased.
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.rule.down.
plidUnique identifier of the parent item (referral program).
elidUnique identifier of the rule.
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "func": "referralprogram.rule.down",
  "ok": true
}

referralprogram.rule.history

Access level: user

The function provides the change history of the specified referral program rule.

Data retrieval:

  • Result: list of change records in bjson format.

Request parameters:

ParameterDescription
plidUnique identifier of the parent item (referral program).
elidUnique identifier of the rule.
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "elem": [
    {
      "changedate": "string",
      "desc": "string",
      "user": "string",
      "ip": "string",
      "action": "string"
    }
  ]
}

referralprogram.history

Access level: user

The function provides the change history of the specified referral program.

Data retrieval:

  • Result: list of change records in bjson format.

Request parameters:

ParameterDescription
elidUnique identifier of the referral program.
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "elem": [
    {
      "changedate": "string",
      "desc": "string",
      "user": "string",
      "ip": "string",
      "action": "string"
    }
  ]
}

referralprogram.referer

Access level: user

The function provides a list of referrers participating in the specified referral program, along with key statistics.

Data retrieval:

  • Result: list of referrers in bjson format.

Request parameters:

ParameterDescription
elidUnique identifier of the referral program.
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "elem": [
    {
      "id": "1",
      "name": "string",
      "stat_count_click_url": "string",
      "stat_count_click_promocode": "string",
      "stat_count_referral": "string",
      "stat_count_referral_with_success_payment": "string",
      "stat_sum_paid_reward_amount_money": "string",
      "stat_count_paid_reward": "string",
      "stat_count_reward_payment": "string",
      "stat_sum_planned_reward_amount_money": "string",
      "stat_near_reward_date": "string"
    }
  ]
}

referralprogram.referer.referral

Access level: user

The function provides a list of referrals brought by the specified referrer within the given referral program.

Data retrieval:

  • Result: list of referrals in bjson format.

Request parameters:

ParameterDescription
plidUnique identifier of the parent item (referral program).
elidUnique identifier of the referrer.
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "elem": [
    {
      "id": "1",
      "name": "string",
      "sum_expense_reward_amount": "string",
      "sum_expense_amount": "string"
    }
  ]
}

referralprogram.client

Access level: user

The function is intended for viewing and modifying the client’s referral program participation form data.

Data retrieval:

  • Result: list of parameters.

Data modification:

  • Parameters:
    • sok — the parameter value must be non-empty, usually ok;
  • Result: successful operation or an error message.

Request parameters:

ParameterDescription
funcFunction name: referralprogram.client.
outResponse format. Default is bjson.
referralprogramReferral program in which the client will participate.
urlReferral link URL.
promocodeClients who enter this promocode will be credited as referred by you.
Example response for successful execution (code 200):
{
  "func": "referralprogram.client",
  "ok": true
}

referralprogram.client.click

Access level: user

The function provides statistics on clicks on the client’s referral link.

Data retrieval:

  • Result: list of click records in bjson format.

Request parameters:

ParameterDescription
outResponse format. Default is bjson.
Example response for successful execution (code 200):
{
  "elem": [
    {
      "cdate": "string",
      "site": "string",
      "referral": "string",
      "status": "string",
      "paid": "on"
    }
  ]
}
The article was last updated on 11.11.2025. The article was prepared by technical writers of ISPsystem