swagger: '2.0' info: description: The Constant Contact, Inc. V3 public API, for building integrations with Constant Contact, the leading small-business email marketing platform. version: 3.0.149 title: AppConnect V3 Account Services Contacts Custom Fields API contact: name: webservices@constantcontact.com license: name: Private url: https://www.constantcontact.com/legal/terms-of-use host: api.cc.email basePath: /v3 schemes: - https consumes: - application/json produces: - application/json tags: - name: Contacts Custom Fields description: Endpoints and methods to get, create, delete, and update on one or more custom fields. paths: /contact_custom_fields/{custom_field_id}: get: tags: - Contacts Custom Fields summary: GET a custom_field description: Get details for a specified custom field. operationId: getCustomField produces: - application/json parameters: - name: custom_field_id in: path description: The ID that uniquely identifies the custom field. required: true type: string x-example: 04fe9a-a579-43c5-bb1a-58ed29bf0a6a responses: '200': description: Request successful schema: $ref: '#/definitions/CustomField' '400': description: Bad request. Either the JSON was malformed or there was a data validation error. '401': description: The Access Token used is invalid. '403': description: Forbidden request. You lack the necessary scopes, you lack the necessary user privileges, or the application is deactivated. '404': description: The requested resource was not found. '500': description: There was a problem with our internal service. '503': description: Our internal service is temporarily unavailable. security: - oauth2_implicit: - contact_data - oauth2_access_code: - contact_data x-authorization-privileges: - contacts:read put: tags: - Contacts Custom Fields summary: Update a custom field. description: Update an existing custom field. operationId: putCustomField consumes: - application/json produces: - application/json parameters: - name: custom_field_id in: path description: The ID that uniquely identifies the custom field to update. required: true type: string x-example: 04fe9a-a579-43c5-bb1a-58ed29bf0a6a - in: body name: body description: The JSON payload used to update an existing custom field. Any properties omitted in the PUT request are overwritten with a null value. required: true schema: $ref: '#/definitions/CustomFieldPutRequest' responses: '200': description: Success - custom_field updated schema: $ref: '#/definitions/CustomField' '400': description: Bad request. Either the JSON was malformed or there was a data validation error. '401': description: The Access Token used is invalid. '403': description: Forbidden request. You lack the necessary scopes, you lack the necessary user privileges, or the application is deactivated. '404': description: The requested resource was not found. '500': description: There was a problem with our internal service. '503': description: Our internal service is temporarily unavailable. security: - oauth2_implicit: - contact_data - oauth2_access_code: - contact_data x-authorization-privileges: - contacts:write x-sdk-methodName: updateCustomField delete: tags: - Contacts Custom Fields summary: DELETE a custom_field description: Delete a custom field from the user's account. operationId: deleteCustomField consumes: - application/json parameters: - name: custom_field_id in: path description: The ID that uniquely identifies the custom field to delete. required: true type: string x-example: 04fe9a-a579-43c5-bb1a-58ed29bf0a6a responses: '204': description: Request successful; No content returned '401': description: The Access Token used is invalid. '403': description: Forbidden request. You lack the necessary scopes, you lack the necessary user privileges, or the application is deactivated. '404': description: The requested resource was not found. '415': description: Unsupported Media Type. '500': description: There was a problem with our internal service. '503': description: Our internal service is temporarily unavailable. security: - oauth2_implicit: - contact_data - oauth2_access_code: - contact_data x-authorization-privileges: - contacts:write /contact_custom_fields: get: tags: - Contacts Custom Fields summary: GET custom_fields Collection description: 'Get all custom fields defined in the user''s account.
This method does not currently support filtering results using the custom field update date.
single_select or multi_select. Maximum number of elements for checkbox and radio display types is 20. Maximum number of elements for a dropdown is 100.'
items:
$ref: '#/definitions/CustomFieldChoicePutRequest'
maxItems: 100
CustomField:
type: object
required:
- label
- type
properties:
custom_field_id:
type: string
format: uuid
example: 1618ae62-4752-11e9-9c8a-fa163e6b01c1
description: The system generated ID that uniquely identifies a custom_field.
readOnly: true
label:
type: string
example: Vehicle make and model year
description: The custom field name to display in the UI (free-form text).
maxLength: 50
name:
type: string
example: Vehicle_make_and_model_year
description: The unique custom field name constructed from the label by replacing blanks with underscores.
readOnly: true
maxLength: 50
type:
type: string
example: date
description: The data value type the custom field accepts.
maxLength: 20
metadata:
$ref: '#/definitions/CustomFieldMetadata'
version:
type: integer
example: 1
description: For datetime data types, this is the version number associated with the custom field.
choices:
type: array
description: Choices available for single_select and multi_select type custom fields. The maximum number of elements for radio or checkbox display types is 20. Maximum number of elements for a dropdown is 100.
items:
$ref: '#/definitions/CustomFieldChoice'
maxItems: 100
updated_at:
type: string
format: date-time
example: '2016-01-23T13:48:44.108Z'
description: System generated date and time that the resource was updated, in ISO-8601 format.
readOnly: true
created_at:
type: string
format: date-time
example: '2016-03-03T10:53:04-05:00'
description: Date and time that the resource was created, in ISO-8601 format. System generated.
readOnly: true
description: Custom fields details.
CustomFields:
type: object
properties:
custom_fields:
type: array
items:
$ref: '#/definitions/CustomField'
maxItems: 100
_links:
$ref: '#/definitions/PagingLinks'
CustomFieldRequest:
type: object
properties:
label:
type: string
example: Favorite Fruit
description: The custom field name to display in the UI (free-form text).
maxLength: 50
type:
type: string
example: string
description: The type of data to store in the custom field.
maxLength: 20
metadata:
$ref: '#/definitions/CustomFieldMetadata'
choices:
type: array
description: 'Array of choices for custom fields of type: single_select or multi_select. Maximum number of elements for checkbox and radio display types is 20. Maximum number of elements for a dropdown is 100.'
items:
$ref: '#/definitions/CustomFieldChoiceRequest'
maxItems: 100
version:
type: integer
example: 2
description: Available if data type is data. Displays 1 if using legacy date fields where values are stored as strings. Displays 2 if using new date fields where values are stored as actual dates to support date comparisons and validations.
CustomFieldChoice:
type: object
properties:
custom_field_id:
type: string
format: uuid
example: d0737000-afbf-11ee-874a-eaf5d7a2e15d
description: The ID that uniquely identifies a custom field.
choice_id:
type: integer
example: 9A63BC
description: The ID that uniquely identifies the choice identifier.
choice_label:
type: string
example: Apple
description: Label to display for the choice on the user interface.
maxLength: 255
display_order:
type: integer
example: 1
description: Stores the order for displaying a list of choices.
created_at:
type: string
format: date-time
example: '2024-06-27T10:28:09.000Z'
description: Date and time that the record was created, in ISO-8601 format. System generated.
updated_at:
type: string
format: date-time
example: '2024-06-27T10:28:09.000Z'
description: Date and time that the record was updated, in ISO-8601 format. System generated.
deleted_at:
type: string
format: date
example: '2023-12-18'
description: Date the choice was deleted, in ISO-8601 format. System generated.
readOnly: true
description: Custom fields single_select and multi_select settings.
CustomFieldMetadata:
type: object
properties:
display_type:
type: string
example: radio
description: Determines how Constant Contact renders a single_select or multi_select field.
allow_negative:
type: boolean
example: false
description: For type number, determines if a value can be negative. By default, this value is false for the type number.
decimal_places:
type: integer
example: 1
description: For types number and currency, determines the number of decimal places possible in the value.
currency_code:
type: string
example: USD
description: For type currency, specifies the three-letter currency code to assign.
integer:
type: boolean
example: true
description: For types number and currency, determines whether the custom field should store only whole numbers (integers) without decimal values. If the integer is set to false, the decimal_places must be between 1 and 4.
display_format:
type: string
example: MM/DD/YYYY
description: Specifies the display format for date fields in the user interface. If not specified for a date type field, defaults to YYYY-MM-DD format. Valid only for version 2 type dates (values are stored as actual dates to support date comparisons and validations).
description: Additional details about a custom field in JSON format.
CustomFieldChoicePutRequest:
type: object
properties:
choice_id:
type: integer
example: 111
description: The ID that uniquely identifies the choice.
choice_label:
type: string
example: Apple
description: Label to display for the choice on the user interface.
maxLength: 255
display_order:
type: integer
example: 1
description: Stores the order for displaying a list of choices.
description: The single_select and multi_select custom field options.
Link:
type: object
properties:
href:
type: string
example: /v3/activities/04fe9a97-a579-43c5-bb1a-58ed29bf0a6a
CustomFieldChoiceRequest:
type: object
properties:
choice_label:
type: string
example: Apple
description: Label to display for the choice on the user interface.
maxLength: 255
display_order:
type: integer
example: 1
description: Stores the order for displaying a list of choices.
description: The single_select and multi_select custom field options.
securityDefinitions:
oauth2_implicit:
type: oauth2
authorizationUrl: https://authz.constantcontact.com/oauth2/default/v1/authorize
flow: implicit
scopes:
contact_data: Read or modify contact data.
campaign_data: Read or modify email campaign data.
account_read: Read account data.
account_update: Modify account data.
oauth2_access_code:
type: oauth2
authorizationUrl: https://authz.constantcontact.com/oauth2/default/v1/authorize
tokenUrl: https://authz.constantcontact.com/oauth2/default/v1/token
flow: accessCode
scopes:
contact_data: Read or modify contact data.
campaign_data: Read or modify email campaign data.
account_read: Read account data.
account_update: Modify account data.
ctctPartnerAuthorizer:
description: Partner Authentication
type: oauth2
authorizationUrl: https://v3api-partner.auth.us-east-1.amazoncognito.com/oauth2/token
flow: implicit
scopes:
v3api/general.partner: Access to general partner API methods
api_key:
type: apiKey
name: x-api-key
in: header