Add or Edit Coupon

Call this API method to add or edit coupons. If the coupon_id parameter is null, a new coupon is added. This API is limited to 100 coupons per request. Coupons shared between races cannot be edited using the API. The API returns a list of coupon ids added or edited.

Field Description
coupon_id Coupon ID if editing.
discount_type “O” for an Overall Discount, “R” for a Discount per Registrant or “E” for a Discount per Registrant per Event.
start_date Date/time (Eastern Time) the coupon takes effect.
end_date Optional Date/time (Eastern Time) the coupon takes effect.
Applicable Fees
applies_to_race_fee Does the discount apply to registration?
exclude_event_cost Should the event cost be excluded from the discount amount? (Only applicable if applies_to_race_fee is “T”)
applies_to_giveaway Does the discount apply to giveaway pricing? (Only applicable if applies_to_race_fee is “T”)
applies_to_addons Does the discount apply to add-ons? (Only applicable if applies_to_race_fee is “T”)
applies_to_club_membership_discounts Does the discount apply to events where the registrant is taking a club membership discount? (Only applicable if applies_to_race_fee is “T”)
applies_to_race_memberships Does the discount apply to events where the registrant is taking a race membership discount? (Only applicable if applies_to_race_fee is “T”)
applies_to_group_setup_fees Does the fee apply to group/team setup fees? (Only applicable if applies_to_race_fee is “T”)
applies_to_group_special_event_costs Does the discount apply to events where the registrant is using special group/team event pricing? (Only applicable if applies_to_race_fee is “T”)
applies_to_age_based_pricing Does the discount apply to events where the registrant is taking age-based pricing? (Only applicable if applies_to_race_fee is “T”)
applies_to_multi_person_pricing Does the discount apply to events where the registrant is using multi-person pricing? (Only applicable if applies_to_race_fee is “T”)
applies_to_extra_fee Does the discount apply to extra fees? (Only applicable if applies_to_race_fee is “T”)
applies_with_multi_event_discount Does the discount apply to registrations that used multi-event discounts?
applies_to_shipping_charges Does the discount apply to shipping charges?
applies_to_store Does the discount apply to the store?
Usage Restrictions
new_customer_only Does the discount only apply to new participants in the race?
minimum_amount_in_cents Minimum amount (determined by the fees that can be discounted according to the rules above) that the coupon can be used for.
minimum_donation_amount_in_cents Minimum donation amount required to use the coupon.
limit_per_customer Optional limit on the number of times a single customer can use the coupon.
max_uses Optional limit on maximum number of use of the coupon. Note that one use might include multiple registrations.
max_num_race_registrants Optional limit on maximum number of registrations to use the coupon.
max_events_per_registration Optional limit on maximum number of events registrations per transaction that use the coupon.
event_specific Does the coupon only apply to certain events?
applicable_event_ids If the coupon only applys to certain events, list of event IDs that if applies to?
Coupon Management Fields
coupon_notes Optional notes about the coupon.
tags Optional tags for the coupon. A tag may not contain spaces.

For JSON requests, the request should look like the example below.

{
	"coupons": [
		{
			"coupon_id": null,
			"coupon_code": "abc",
			"percentage": 25,
			"fixed_discount_in_cents": 0,
			"discount_type": "O",
			"start_date": "2015-01-01 00:00:00",
			"end_date": "2015-01-31 23:59:59",
			
			"applies_to_race_fee": "T",
			"exclude_event_cost": "F",
			"applies_to_giveaway": "F",
			"applies_to_addons": "F",
			"applies_to_club_membership_discounts": "F",
			"applies_to_race_memberships": "F",
			"applies_to_group_setup_fees": "F",
			"applies_to_group_special_event_costs": "F",
			"applies_to_age_based_pricing": "F",
			"applies_to_multi_person_pricing": "F",
			"applies_to_extra_fee": "F",
			"applies_with_multi_event_discount": "F",
			"applies_to_shipping_charges": "F",
			"applies_to_store": "F",
			
			"new_customer_only": "F",
			"minimum_amount_in_cents": 2000,
			"minimum_donation_amount_in_cents": 500,
			"limit_per_customer": 1,
			"max_uses": 10,
			"max_num_race_registrants": 10,
			"max_events_per_registration": 2,
			
			"event_specific": "F",
			"applicable_event_ids": [],
			
			"coupon_notes": null,
			"tags": []
		},
		{
			"coupon_id": 12345,
			"coupon_code": "xyz",
			"percentage": null,
			"fixed_discount_in_cents": 500,
			"discount_type": "O",
			"start_date": "2015-01-01 00:00:00",
			"end_date": null,
			
			"applies_to_race_fee": "T",
			"exclude_event_cost": "F",
			"applies_to_giveaway": "F",
			"applies_to_addons": "F",
			"applies_to_club_membership_discounts": "F",
			"applies_to_race_memberships": "F",
			"applies_to_group_setup_fees": "F",
			"applies_to_group_special_event_costs": "F",
			"applies_to_age_based_pricing": "F",
			"applies_to_multi_person_pricing": "F",
			"applies_to_extra_fee": "F",
			"applies_with_multi_event_discount": "F",
			"applies_to_shipping_charges": "F",
			"applies_to_store": "F",
			
			"new_customer_only": "T",
			"minimum_amount_in_cents": 0,
			"minimum_donation_amount_in_cents": null,
			"limit_per_customer": null,
			"max_uses": null,
			"max_num_race_registrants": null,
			"max_events_per_registration": null,
			
			"event_specific": "T",
			"applicable_event_ids": [123,456],
			
			"coupon_notes": "This coupons only applies to certain events.",
			"tags": ["tag1", "tag2"]
		}
	]
}

For XML requests, the request should look like the example below.

<coupons>
  <coupon>
		<coupon_id></coupon_id>
		<coupon_code>abc</coupon_code>
		<percentage>25</percentage>
		<fixed_discount_in_cents>0</fixed_discount_in_cents>
		<discount_type>O</discount_type>
		<start_date>2015-01-01 00:00:00</start_date>
		<end_date>2015-01-31 23:59:59</end_date>
		
		<applies_to_race_fee>T</applies_to_race_fee>
		<exclude_event_cost>F</exclude_event_cost>
		<applies_to_giveaway>F</applies_to_giveaway>
		<applies_to_addons>F</applies_to_addons>
		<applies_to_club_membership_discounts>F</applies_to_club_membership_discounts>
		<applies_to_race_memberships>F</applies_to_race_memberships>
		<applies_to_group_setup_fees>F</applies_to_group_setup_fees>
		<applies_to_group_special_event_costs>F</applies_to_group_special_event_costs>
		<applies_to_age_based_pricing>F</applies_to_age_based_pricing>
		<applies_to_multi_person_pricing>F</applies_to_multi_person_pricing>
		<applies_to_extra_fee>F</applies_to_extra_fee>
		<applies_with_multi_event_discount>F</applies_with_multi_event_discount>
		<applies_to_shipping_charges>F</applies_to_shipping_charges>
		<applies_to_store>F</applies_to_store>
		
		<new_customer_only>F</new_customer_only>
		<minimum_amount_in_cents>2000</minimum_amount_in_cents>
		<minimum_donation_amount_in_cents>500</minimum_donation_amount_in_cents>
		<limit_per_customer>1</limit_per_customer>
		<max_uses>10</max_uses>
		<max_num_race_registrants>10</max_num_race_registrants>
		<max_events_per_registration>2</max_events_per_registration>
		
		<event_specific>F</event_specific>
		<applicable_event_ids></applicable_event_ids>
		
		<coupon_notes></coupon_notes>
		<tags></tags>
	</coupon>
	<coupon>
		<coupon_id>12345</coupon_id>
		<coupon_code>xyz</coupon_code>
		<percentage></percentage>
		<fixed_discount_in_cents>500</fixed_discount_in_cents>
		<discount_type>O</discount_type>
		<start_date>2015-01-01 00:00:00</start_date>
		<end_date></end_date>
		
		<applies_to_race_fee>T</applies_to_race_fee>
		<exclude_event_cost>F</exclude_event_cost>
		<applies_to_giveaway>F</applies_to_giveaway>
		<applies_to_addons>F</applies_to_addons>
		<applies_to_club_membership_discounts>F</applies_to_club_membership_discounts>
		<applies_to_race_memberships>F</applies_to_race_memberships>
		<applies_to_group_setup_fees>F</applies_to_group_setup_fees>
		<applies_to_group_special_event_costs>F</applies_to_group_special_event_costs>
		<applies_to_age_based_pricing>F</applies_to_age_based_pricing>
		<applies_to_multi_person_pricing>F</applies_to_multi_person_pricing>
		<applies_to_extra_fee>F</applies_to_extra_fee>
		<applies_with_multi_event_discount>F</applies_with_multi_event_discount>
		<applies_to_shipping_charges>F</applies_to_shipping_charges>
		<applies_to_store>F</applies_to_store>
		
		<new_customer_only>T</new_customer_only>
		<minimum_amount_in_cents>0</minimum_amount_in_cents>
		<minimum_donation_amount_in_cents></minimum_donation_amount_in_cents>
		<limit_per_customer></limit_per_customer>
		<max_uses></max_uses>
		<max_num_race_registrants></max_num_race_registrants>
		<max_events_per_registration></max_events_per_registration>
		
		<event_specific>T</event_specific>
		<applicable_event_ids>
			<event_id>123</event_id>
			<event_id>456</event_id>
		</applicable_event_ids>
		
		<coupon_notes>This coupons only applies to certain events.</coupon_notes>
		<tags>
			<tag>tag1</tag>
			<tag>tag2</tag>
		</tags>
	</coupon>
</coupons>

URL

https://www.givesignup.org/rest/race/:race_id/coupons

HTTP Method

POST

Standard Parameters

Parameter HTTP Method Default Description Datatype
api_key GET API Key string
api_secret GET API Secret string
tmp_key GET Temporary API Key from login API call. This should NOT be used in combination with API Key. string
tmp_secret GET Temporary API Secret from login API call. This should NOT be used in combination with API Secret. string
rsu_api_key GET API v2 key. If used, you must send the API secret in an HTTP header named X-RSU-API-SECRET. string
sp_api_key GET Super partner API key. If used, you must send the API secret in an HTTP header named X-RSU-API-SECRET. string
X-RSU-API-SECRET HTTP Header API v2 or super partner secret. string
format GET xml Format of response. format

Parameters

Parameter HTTP Method Default Description Datatype
race_id
Required
POST ID of race. uint
request_format POST xml Format of request. format
request
Required
POST Request in proper format. string

If you continue to use this site, you consent to use all cookies. We use cookies to offer you a better browsing experience. Read how we use cookies and how you can control them by visiting our Privacy Policy.

If you continue to use this site, you consent to use all cookies.