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

Event Item Attribute Collection API Endpoint

Use Item Attributes to provide options for event items, such as sizes for clothing articles, or color or style options. Use the Item Attribute Collection API endpoint to create (POST) a new attribute, or retrieve (GET) all existing attributes for an item.

Methods:

Click a method to view its documentation

GET POST

DescriptionTOP

Privileges required: campaign:write

Create a new attribute for an event item; specify the event and item using the eventId and itemId path parameters. To create an attribute, include the attribute name and quantity_total (minimum = 0) in the JSON request body. Each attribute for an item must have a unique name with a minimum length of 1 character.

POST: https://api.constantcontact.com/v2/eventspot/events/{eventId}/items/{itemId}/attributes

Test API

name

type

default

description

api_key

query

REQUIRED; The API key for the application

eventId

path

Unique ID of the event to which the item belongs.

itemId

path

Unique ID of the item to which you are creating the attribute

Example JSON Request BodyTOP

{
    "name": "Hi-Vis Green",
    "quantity_total": 75
}

Response CodesTOP

code

description

201

Attribute was successfully created

400

Bad Request: Either JSON was malformed or there was a data validation error

401

Authentication failure

404

An event or item with specified ID not found

406

Unsupported accept header value, must be application/json

409

Attribute name already in use

415

Unsupported content-type in the header, use application/json

500

Internal server error occurred

StructureTOP

property

type(max length)

description

id

string (100)

The attribute's Unique ID (Read Only)

name

string (100)

REQUIRED. Attribute name, minimum length = 1, cannot leave blank

quantity_available

integer

Number of item attributes that are still available (Read Only)

quantity_total

integer

REQUIRED. Number of item attributes offered, minimum = 0, cannot leave blank

Example ResponseTOP

{
	"id":"9k7uXp6Hgyiq7BCC11zFc476STDHQ_sadfwfRCYGMSU",
	"name":"Hi-Vis Green",
	"quantity_total":75,
	"quantity_available":75
}