Individual Promocode Endpoint

Use this API endpoint to retrieve (GET), update (PUT), or DELETE an existing event fee promocode.

Methods:

Click a method to view its documentation

GET PUT DELETE

DescriptionTOP

Privileges required: campaign:read

Retrieve a specific promotional code for an event; use the promocodeId and eventId path parameters to specify the code and the event it belongs to.

GET: https://api.constantcontact.com/v2/eventspot/events/{eventId}/promocodes/{promocodeId}

Test API

name

type

default

description

api_key

query

REQUIRED; The API key for the application

eventId

path

Unique ID of the event for which to retrieve the promocode

promocodeId

path

Unique ID of the promocode to retrieve

Response CodesTOP

code

description

200

Request was successful

401

Authentication failure

404

Either an event could not be found for the eventId or
a promocode could not be found for the promocodeId provided

406

Unsupported Accept Header value, must be application/json

500

Internal server error occurred

StructureTOP

property

type(max length)

description

code_name

string (12)

Name of the promotional code visible to registrants, between 4 - 12 characters, cannot contain spaces or special character (_ is OK); each code_name must be unique

code_type

string

Type of promocode:

  • ACCESS - applies to a specific fee with has_restricted_access = true, fee_list must include only a single fee_id. See Event Fees.
  • DISCOUNT - when set to DISCOUNT, you must specify either a discount_percent or a discount_amount

discount_amount

number

Specifies a fixed discount amount, minimum of 0.01, is required when code_type = DISCOUNT, but not using discount_percent

discount_percent

integer

Specifies a discount percentage, from 1% - 100%, is required when code_type = DISCOUNT, but not using discount_amount

discount_scope

string

Required when code_type = DISCOUNT;

  • FEE_LIST - discount is applied only to those fees listed in the fee_ids array
  • ORDER_TOTAL - discount is applied to the order total

discount_type

string

Discount types:

  • PERCENT - discount is a percentage specified by discount_percent
  • AMOUNT - discount is a fixed amount, specified by discount_amount

fee_ids

array

Identifies the fees to which the promocode applies;

  • If code_type = ACCESS promocode applies to a single fee with has_restricted_access = true, include only 1 fee id
  • If code_type = DISCOUNT and discount_scope = ORDER_TOTAL, do not include any fee_ids
  • If code_type = DISCOUNT and discount_scope = FEE_LIST, then include all fee_ids to which the discount applies

id

string (50)

Unique ID for the event promotional code

is_paused

boolean

When set to true, promocode cannot be redeemed; when false, promocode can be redeemed; default = false.

quantity_available

integer

Number of promocodes available for redemption; -1 = unlimited.

quantity_total

integer

Total number of promocodes available for redemption; -1 = unlimited.

quantity_used

integer

Number of promocodes that have been redeemed; starts at 0.

status

string

Status of the promocode:

  • LIVE - promocode is available to be redeemed
  • PAUSED - promocode is not available for redemption
  • DEPLETED - no more promocodes remain, quantity_available = 0

Example ResponseTOP

{
	"id":"MIT4bfRPOntYqxSKs2ui9rIwqpZ7nzW2Y09fUs00t3Q",
	"status":"LIVE",
	"code_name":"TOTAL_FEE",
	"is_paused":false,
	"fee_ids":[
		"MIT4bfRPOntYqxSKs2ui9oPJUvBGM9P1V53KQcYO8Aw"
		],
	"quantity_total":-1,
	"quantity_used":0,
	"quantity_available":-1,
	"code_type":"DISCOUNT",
	"discount_scope":"FEE_LIST",
	"discount_type":"PERCENT",
	"discount_percent":33
}