Our v3 API is now available! Learn more by visiting the v3 developer portal.

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:write

Update an existing promocode for an event; specify the code and event using the eventId and promocodeId path parameters.

PUT: 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 update the promocode

promocodeId

path

Unique ID of the promocode to update

Example JSON Request BodyTOP

{
    "code_type": "ACCESS",
    "code_name": "REDUCED_FEE",
    "quantity_total": 100,
    "is_paused": false,
    "discount_scope": "FEE_LIST",
    "fee_ids": [
        "MIT4bfRPOntYqxSKs2ui9oPJUvBGM9P1V53KQcYO8Aw"
        ]
}

Response CodesTOP

code

description

200

Promocode was successfully updated

400

Either JSON was malformed or there was a data validation error

401

Authentication failure

404

An event or promocode with specified ID not found

406

Unsupported accept header value, must be application/json

415

Unsupported content-type in the header, must be application/json

500

Internal server error occurred

StructureTOP

property

type(max length)

description

code_name

string (12)

REQUIRED. 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

REQUIRED. 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 (Read Only)

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 (Read Only)

is_paused

boolean

REQUIRED. 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. (Read Only)

quantity_total

integer

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

quantity_used

integer

Number of promocodes that have been redeemed; starts at 0. (Read Only)

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
(Read Only)

Example ResponseTOP

{
    "id":"MIT4bfRPOntYqxSKs2ui9oPJUvBGM9P1V53KQcYO8Aw",
    "status":"LIVE",
    "code_name":"REDUCED_FEE",
    "is_paused":false,
    "fee_ids":[
        "MIT4bfRPOntYqxSKs2ui9oPJUvBGM9P1V53KQcYO8Aw"
        ],
    "quantity_total":100,
    "quantity_used":0,
    "quantity_available":100,
    "code_type":"ACCESS"
}