Rewards API commands

Rewards API

The following documentation is not officially supported by DreamHost. However, if you find any instructions in this article do not function as intended, it's possible it may be out of date. When in doubt, please contact support for further assistance.

It's no longer possible to add promo codes as an affiliate. View the Refer and Earn rewards program article for further details.

The rewards API module contains commands for managing promo codes and tracking referrals.

Commands

rewards-remove_promo_code

Removes a promo code (only allowed if the code was never used).

Command rewards-remove_promo_code
Values

code

Result

success

Possible errors

invalid_code
code_used

rewards-enable_promo_code

Enables a promo code so it can be used again (must have been disabled).

Command rewards-enable_promo_code
Values

code

Result

success

Possible errors

invalid_code

rewards-disable_promo_code

Disables a promo code so it can no longer be used (must be enabled).

Command rewards-disable_promo_code
Values

code

Result

success

Possible errors

invalid_code

rewards-list_promo_codes

Lists all the promo codes you have created.

Command rewards-list_promo_codes
Values

(none)

Result

success
code description created status used
TESTCODE my promo code 2010-11-16 17:37:05 active 0

Possible errors

(none)

rewards-promo_details

Gets the detailed information for a promo code (you must have created the code).

Command rewards-promo_details
Values

code

Result

success
code description status discount_month discount_1year discount_2year bonus_domregs bonus_ips
TESTCODE my promo code active $0.00 $0.00 $0.00 2 1

Possible errors

no_code
invalid_code

rewards-referral_summary

Gives a summary of all referrals for the given time period.

Command rewards-referral_summary
Values

period : a period of time such as "1 day" or "3 months"

Result

success
code signups raw_clicks unique_clicks conversion
none 0 8 8 0.00%
TESTCODE 213 5515 5235 4.07%
Total 213 5523 5243 4.06%

Possible errors

no_period
invalid_period

rewards-referral_log

Returns a raw log of of referrals for the given time period. If the person signed up, then it also shows their webid and signup time.

Command rewards-referral_log
Values

period : a period of time such as "1 day" or "3 months"

Result

success
click_time ip code signup_time ref_url webid status
2010-11-16 17:40:34 1.2.3.4 TEST N/A N/A no signup
2010-11-16 17:40:12 5.6.7.8 TEST N/A http://www.example.com N/A no signup
2010-11-16 17:32:27 9.10.11.12 TEST N/A http://www.example.com N/A no signup

Possible errors

no_period
invalid_period

See also

 

Did this article answer your questions?

Article last updated PST.