What is it?
The MC Professional API Attribute resource allows a 3rd party client to get the list of attributes, name prefixes, name suffixes, states and selection set options.
Get a List of Attributes
This resource returns the list of built-in, custom and system attributes the user has permission to view. The attribute names of built-in and system attributes are surrounded by square brackets "[ ]".
Scope
To access this resource, the access token must have the read scope.
Permissions
This resource is available to administrators.
The list of attributes is restricted further by attribute security. An attribute will be included in the list if the user can view that attribute for at least one member type.
The [Deleted] system attribute will be included in the list if the user has the Profile Admin admin permission.
Request
The request to get a list of attributes is an HTTP GET to the /api/v1/attribute endpoint. The following is the format of the request:
GET /api/v1/attribute HTTP/1.1
Host: <orgId>.memberclicks.net
Accept: application/json
Authorization: Bearer <accessToken>
Cache-Control: no-cache
- orgId: the MC Professional organization ID
- accessToken: the access token issued by the authorization server
Example
Using the example values below, the following is the resulting request:
- orgId: apiexample
- accessToken: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNDIxNjQsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJhZGU4ZWQyMy05NzBmLTQxY2MtYTQyNi0yMmJlZWUzNjZhYzUiLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.b97GRFZqZFJeWJj-NZoumSEF508USxUuBNIWflDU7Kk
GET /api/v1/attribute HTTP/1.1
Host: apiexample.memberclicks.net
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNDIxNjQsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJhZGU4ZWQyMy05NzBmLTQxY2MtYTQyNi0yMmJlZWUzNjZhYzUiLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.b97GRFZqZFJeWJj-NZoumSEF508USxUuBNIWflDU7Kk
Cache-Control: no-cache
Response
A successful request will return an HTTP status 200 OK with the response in the following format:
HTTP/1.1 200 OK
{
"totalCount": <totalCount>,
"attributes": <attributes>
}
- totalCount: the total count of attributes
- attributes: the array of attributes. Each object in the array contains the attribute name and type. Some attribute types include an extra field listed below:
- The Name Prefix built-in attribute type includes a prefixesUrl field. The Get a List of Name Prefixes section details how to use this URL.
- The Name Suffix built-in attribute type includes a suffixesUrl field. The Get a List of Name Suffixes section details how to use this URL.
- The State/Province built-in address attribute type includes a statesUrl field. The Get a List of States/Provinces for Built-in Attributes section details how to use this URL.
- The Country built-in address attribute type includes a countriesUrl field. The Get a List of Countries section details how to use this URL.
- The Group built-in attribute includes a groupsUrl field. The Get a List of Groups section details how to use this URL.
- The Member Status built-in attribute includes a memberStatusesUrl field. The Get a List of Member Statuses section details how to use this URL.
- The Member Type built-in attribute includes a memberTypesUrl field. The Get a List of Member Types section details how to use this URL.
- The State/Province custom attribute type includes a statesUrl field. The Get a List of States/Provinces for a Custom Attribute section details how to use this URL.
- The Country custom attribute type includes a countriesUrl field. The Get a List of Countries section details how to use this URL.
- The Selection Set custom attribute type includes a selectionsUrl field. The Get a List of Selection Set Options for a Custom Attribute section details how to use this URL.
Example
The following is the response for the example request above:
HTTP/1.1 200 OK
{
"totalCount": 72,
"attributes": [
{
"name": "[Profile ID]",
"type": "Profile ID"
},
{
"name": "[Name | Prefix]",
"type": "Name Prefix",
"prefixesUrl": "https://apiexample.memberclicks.net/api/v1/attribute/name/prefix"
},
{
"name": "[Name | First]",
"type": "First Name"
},
{
"name": "[Name | Middle]",
"type": "Middle Name"
},
{
"name": "[Name | Last]",
"type": "Last Name"
},
{
"name": "[Name | Suffix]",
"type": "Name Suffix",
"suffixesUrl": "https://apiexample.memberclicks.net/api/v1/attribute/name/suffix"
},
{
"name": "[Contact Name]",
"type": "Contact Name"
},
{
"name": "[Email | Primary]",
"type": "Email"
},
{
"name": "[Email | Work]",
"type": "Email"
},
{
"name": "[Email | Home]",
"type": "Email"
},
{
"name": "[Address | Primary | Line 1]",
"type": "Address Line 1"
},
{
"name": "[Address | Primary | Line 2]",
"type": "Address Line 2"
},
{
"name": "[Address | Primary | City]",
"type": "City"
},
{
"name": "[Address | Primary | State]",
"type": "State/Province",
"statesUrl": "https://apiexample.memberclicks.net/api/v1/attribute/address/state"
},
{
"name": "[Address | Primary | Zip]",
"type": "Zip"
},
{
"name": "[Address | Primary | Country]",
"type": "Country",
"countriesUrl": "https://apiexample.memberclicks.net/api/v1/country"
},
{
"name": "[Address | Business | Line 1]",
"type": "Address Line 1"
},
{
"name": "[Address | Business | Line 2]",
"type": "Address Line 2"
},
{
"name": "[Address | Business | City]",
"type": "City"
},
{
"name": "[Address | Business | State]",
"type": "State/Province",
"statesUrl": "https://apiexample.memberclicks.net/api/v1/attribute/address/state"
},
{
"name": "[Address | Business | Zip]",
"type": "Zip"
},
{
"name": "[Address | Business | Country]",
"type": "Country",
"countriesUrl": "https://apiexample.memberclicks.net/api/v1/country"
},
{
"name": "[Address | Home | Line 1]",
"type": "Address Line 1"
},
{
"name": "[Address | Home | Line 2]",
"type": "Address Line 2"
},
{
"name": "[Address | Home | City]",
"type": "City"
},
{
"name": "[Address | Home | State]",
"type": "State/Province",
"statesUrl": "https://apiexample.memberclicks.net/api/v1/attribute/address/state"
},
{
"name": "[Address | Home | Zip]",
"type": "Zip"
},
{
"name": "[Address | Home | Country]",
"type": "Country",
"countriesUrl": "https://apiexample.memberclicks.net/api/v1/country"
},
{
"name": "[Address | Mailing | Line 1]",
"type": "Address Line 1"
},
{
"name": "[Address | Mailing | Line 2]",
"type": "Address Line 2"
},
{
"name": "[Address | Mailing | City]",
"type": "City"
},
{
"name": "[Address | Mailing | State]",
"type": "State/Province",
"statesUrl": "https://apiexample.memberclicks.net/api/v1/attribute/address/state"
},
{
"name": "[Address | Mailing | Zip]",
"type": "Zip"
},
{
"name": "[Address | Mailing | Country]",
"type": "Country",
"countriesUrl": "https://apiexample.memberclicks.net/api/v1/country"
},
{
"name": "[Phone | Primary]",
"type": "Phone"
},
{
"name": "[Phone | Home]",
"type": "Phone"
},
{
"name": "[Phone | Mobile]",
"type": "Phone"
},
{
"name": "[Phone | Office]",
"type": "Phone"
},
{
"name": "[Phone | Fax]",
"type": "Phone"
},
{
"name": "[Organization]",
"type": "Organization"
},
{
"name": "[Organization Email]",
"type": "Email"
},
{
"name": "[Organization Address | Line 1]",
"type": "Address Line 1"
},
{
"name": "[Organization Address | Line 2]",
"type": "Address Line 2"
},
{
"name": "[Organization Address | City]",
"type": "City"
},
{
"name": "[Organization Address | State]",
"type": "State/Province",
"statesUrl": "https://apiexample.memberclicks.net/api/v1/attribute/address/state"
},
{
"name": "[Organization Address | Zip]",
"type": "Zip"
},
{
"name": "[Organization Address | Country]",
"type": "Country",
"countriesUrl": "https://apiexample.memberclicks.net/api/v1/country"
},
{
"name": "[Organization Phone]",
"type": "Phone"
},
{
"name": "Birthday",
"type": "Date/Time"
},
{
"name": "Board Position",
"type": "Selection Set",
"selectionsUrl": "https://apiexample.memberclicks.net/api/v1/attribute/10010212/selection"
},
{
"name": "Certificate",
"type": "File"
},
{
"name": "Country",
"type": "Country",
"countriesUrl": "https://apiexample.memberclicks.net/api/v1/country"
},
{
"name": "Gender",
"type": "Selection Set",
"selectionsUrl": "https://apiexample.memberclicks.net/api/v1/attribute/10010204/selection"
},
{
"name": "Graduation Year",
"type": "Text"
},
{
"name": "Image",
"type": "Image"
},
{
"name": "Notes",
"type": "Text"
},
{
"name": "Number of Employees",
"type": "Number"
},
{
"name": "School",
"type": "Text"
},
{
"name": "Sports",
"type": "Selection Set",
"selectionsUrl": "https://apiexample.memberclicks.net/api/v1/attribute/10010213/selection"
},
{
"name": "State",
"type": "State/Province",
"statesUrl": "https://apiexample.memberclicks.net/api/v1/attribute/10010211/state"
},
{
"name": "Website",
"type": "Website"
},
{
"name": "[Created Date]",
"type": "Created Date"
},
{
"name": "[Expiration Date]",
"type": "Expiration Date"
},
{
"name": "[Group]",
"type": "Group",
"groupsUrl": "https://apiexample.memberclicks.net/api/v1/group"
},
{
"name": "[Join Date]",
"type": "Join Date"
},
{
"name": "[Last Renewal Date]",
"type": "Last Renewal Date"
},
{
"name": "[Last Modified Date]",
"type": "Last Modified Date"
},
{
"name": "[Member Number]",
"type": "Member Number"
},
{
"name": "[Member Status]",
"type": "Member Status",
"memberStatusesUrl": "https://apiexample.memberclicks.net/api/v1/member-status"
},
{
"name": "[Member Type]",
"type": "Member Type",
"memberTypesUrl": "https://apiexample.memberclicks.net/api/v1/member-type"
},
{
"name": "[Username]",
"type": "Username"
},
{
"name": "[Deleted]",
"type": "Deleted"
}
]
}
Get a List of Name Prefixes
This resource returns the list of name prefixes.
Scope
To access this resource, the access token must have the read scope.
Permissions
This resource is available to administrators.
Request
The request to get a list of name prefixes is an HTTP GET to the /api/v1/attribute/name/prefix endpoint. The following is the format of the request:
GET /api/v1/attribute/name/prefix HTTP/1.1
Host: <orgId>.memberclicks.net
Accept: application/json
Authorization: Bearer <accessToken>
Cache-Control: no-cache
- orgId: the MC Professional organization ID
- accessToken: the access token issued by the authorization server
Example
Using the example values below, the following is the resulting request:
- orgId: apiexample
- accessToken: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNTA3ODUsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJmNTRhNDE4ZC05ZjZhLTQxYTQtODZkZi02ZGViYzJiM2ZkNzciLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.jXXtvM-dlcyI56Z5uF4h3THGLK27TDuaU5jEoqMUJqU
GET /api/v1/attribute/name/prefix HTTP/1.1
Host: apiexample.memberclicks.net
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNTA3ODUsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJmNTRhNDE4ZC05ZjZhLTQxYTQtODZkZi02ZGViYzJiM2ZkNzciLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.jXXtvM-dlcyI56Z5uF4h3THGLK27TDuaU5jEoqMUJqU
Cache-Control: no-cache
Response
A successful request will return an HTTP status 200 OK with the response in the following format:
HTTP/1.1 200 OK
{
"totalCount": <totalCount>,
"prefixes": <prefixes>
}
- totalCount: the total count of name prefixes
- prefixes: the array of name prefixes. Each object in the array contains the prefix name.
Example
The following is the response for the example request above:
HTTP/1.1 200 OK
{
"totalCount": 4,
"prefixes": [
{
"name": "Mr."
},
{
"name": "Mrs."
},
{
"name": "Ms."
},
{
"name": "Dr."
}
]
}
Get a List of Name Suffixes
This resource returns the list of name suffixes.
Scope
To access this resource, the access token must have the read scope.
Permissions
This resource is available to administrators.
Request
The request to get a list of name suffixes is an HTTP GET to the /api/v1/attribute/name/suffix endpoint. The following is the format of the request:
GET /api/v1/attribute/name/suffix HTTP/1.1
Host: <orgId>.memberclicks.net
Accept: application/json
Authorization: Bearer <accessToken>
Cache-Control: no-cache
- orgId: the MemberClicks organization ID
- accessToken: the access token issued by the authorization server
Example
Using the example values below, the following is the resulting request:
- orgId: apiexample
- accessToken: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNTA3ODUsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJmNTRhNDE4ZC05ZjZhLTQxYTQtODZkZi02ZGViYzJiM2ZkNzciLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.jXXtvM-dlcyI56Z5uF4h3THGLK27TDuaU5jEoqMUJqU
GET /api/v1/attribute/name/suffix HTTP/1.1
Host: apiexample.memberclicks.net
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNTA3ODUsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJmNTRhNDE4ZC05ZjZhLTQxYTQtODZkZi02ZGViYzJiM2ZkNzciLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.jXXtvM-dlcyI56Z5uF4h3THGLK27TDuaU5jEoqMUJqU
Cache-Control: no-cache
Response
A successful request will return an HTTP status 200 OK with the response in the following format:
HTTP/1.1 200 OK
{
"totalCount": <totalCount>,
"suffixes": <suffixes>
}
- totalCount: the total count of name suffixes
- suffixes: the array of name suffixes. Each object in the array contains the suffix name.
Example
The following is the response for the example request above:
HTTP/1.1 200 OK
{
"totalCount": 5,
"suffixes": [
{
"name": "Jr."
},
{
"name": "Sr."
},
{
"name": "II"
},
{
"name": "III"
},
{
"name": "IV"
}
]
}
Get a List of States/Provinces for Built-in Attributes
This resource returns the list of states and provinces configured for built-in attributes.
Scope
To access this resource, the access token must have the read scope.
Permissions
This resource is available to administrators.
Request
The request to get a list of states and provinces for built-in attributes is an HTTP GET to the /api/v1/attribute/address/state endpoint. The following is the format of the request:
GET /api/v1/attribute/address/state HTTP/1.1
Host: <orgId>.memberclicks.net
Accept: application/json
Authorization: Bearer <accessToken>
Cache-Control: no-cache
- orgId: the MC Professional organization ID
- accessToken: the access token issued by the authorization server
Example
Using the example values below, the following is the resulting request:
- orgId: apiexample
- accessToken: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNTA3ODUsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJmNTRhNDE4ZC05ZjZhLTQxYTQtODZkZi02ZGViYzJiM2ZkNzciLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.jXXtvM-dlcyI56Z5uF4h3THGLK27TDuaU5jEoqMUJqU
GET /api/v1/attribute/address/state HTTP/1.1
Host: apiexample.memberclicks.net
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNTA3ODUsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJmNTRhNDE4ZC05ZjZhLTQxYTQtODZkZi02ZGViYzJiM2ZkNzciLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.jXXtvM-dlcyI56Z5uF4h3THGLK27TDuaU5jEoqMUJqU
Cache-Control: no-cache
Response
A successful request will return an HTTP status 200 OK with the response in the following format:
HTTP/1.1 200 OK
{
"totalCount": <totalCount>,
"states": <states>
}
- totalCount: the total count of states and provinces
- states: the array of states and provinces. Each object in the array contains the state or province name and abbreviation.
Example
The following is the response for the example request above:
HTTP/1.1 200 OK
{
"totalCount": 64,
"states": [
{
"name": "Alabama",
"abbreviation": "AL"
},
{
"name": "Alaska",
"abbreviation": "AK"
},
{
"name": "Arizona",
"abbreviation": "AZ"
},
{
"name": "Arkansas",
"abbreviation": "AR"
},
{
"name": "California",
"abbreviation": "CA"
},
{
"name": "Colorado",
"abbreviation": "CO"
},
{
"name": "Connecticut",
"abbreviation": "CT"
},
{
"name": "Delaware",
"abbreviation": "DE"
},
{
"name": "District of Columbia",
"abbreviation": "DC"
},
{
"name": "Florida",
"abbreviation": "FL"
},
{
"name": "Georgia",
"abbreviation": "GA"
},
{
"name": "Hawaii",
"abbreviation": "HI"
},
{
"name": "Idaho",
"abbreviation": "ID"
},
{
"name": "Illinois",
"abbreviation": "IL"
},
{
"name": "Indiana",
"abbreviation": "IN"
},
{
"name": "Iowa",
"abbreviation": "IA"
},
{
"name": "Kansas",
"abbreviation": "KS"
},
{
"name": "Kentucky",
"abbreviation": "KY"
},
{
"name": "Louisiana",
"abbreviation": "LA"
},
{
"name": "Maine",
"abbreviation": "ME"
},
{
"name": "Maryland",
"abbreviation": "MD"
},
{
"name": "Massachusetts",
"abbreviation": "MA"
},
{
"name": "Michigan",
"abbreviation": "MI"
},
{
"name": "Minnesota",
"abbreviation": "MN"
},
{
"name": "Mississippi",
"abbreviation": "MS"
},
{
"name": "Missouri",
"abbreviation": "MO"
},
{
"name": "Montana",
"abbreviation": "MT"
},
{
"name": "Nebraska",
"abbreviation": "NE"
},
{
"name": "Nevada",
"abbreviation": "NV"
},
{
"name": "New Hampshire",
"abbreviation": "NH"
},
{
"name": "New Jersey",
"abbreviation": "NJ"
},
{
"name": "New Mexico",
"abbreviation": "NM"
},
{
"name": "New York",
"abbreviation": "NY"
},
{
"name": "North Carolina",
"abbreviation": "NC"
},
{
"name": "North Dakota",
"abbreviation": "ND"
},
{
"name": "Ohio",
"abbreviation": "OH"
},
{
"name": "Oklahoma",
"abbreviation": "OK"
},
{
"name": "Oregon",
"abbreviation": "OR"
},
{
"name": "Pennsylvania",
"abbreviation": "PA"
},
{
"name": "Rhode Island",
"abbreviation": "RI"
},
{
"name": "South Carolina",
"abbreviation": "SC"
},
{
"name": "South Dakota",
"abbreviation": "SD"
},
{
"name": "Tennessee",
"abbreviation": "TN"
},
{
"name": "Texas",
"abbreviation": "TX"
},
{
"name": "Utah",
"abbreviation": "UT"
},
{
"name": "Vermont",
"abbreviation": "VT"
},
{
"name": "Virginia",
"abbreviation": "VA"
},
{
"name": "Washington",
"abbreviation": "WA"
},
{
"name": "West Virginia",
"abbreviation": "WV"
},
{
"name": "Wisconsin",
"abbreviation": "WI"
},
{
"name": "Wyoming",
"abbreviation": "WY"
},
{
"name": "Alberta",
"abbreviation": "AB"
},
{
"name": "British Columbia",
"abbreviation": "BC"
},
{
"name": "Manitoba",
"abbreviation": "MB"
},
{
"name": "New Brunswick",
"abbreviation": "NB"
},
{
"name": "Newfoundland and Labrador",
"abbreviation": "NL"
},
{
"name": "Northwest Territories",
"abbreviation": "NT"
},
{
"name": "Nova Scotia",
"abbreviation": "NS"
},
{
"name": "Nunavut",
"abbreviation": "NU"
},
{
"name": "Ontario",
"abbreviation": "ON"
},
{
"name": "Prince Edward Island",
"abbreviation": "PE"
},
{
"name": "Québec",
"abbreviation": "QC"
},
{
"name": "Saskatchewan",
"abbreviation": "SK"
},
{
"name": "Yukon",
"abbreviation": "YT"
}
]
}
Get a List of States/Provinces for a Custom Attribute
This resource returns the list of states and provinces configured for a custom attribute.
Scope
To access this resource, the access token must have the read scope.
Permissions
This resource is available to administrators.
Request
The request to get a list of states and provinces for a custom attribute is an HTTP GET to the /api/v1/attribute/<attributeId>/state endpoint. The following is the format of the request:
GET /api/v1/attribute/<attributeId>/state HTTP/1.1
Host: <orgId>.memberclicks.net
Accept: application/json
Authorization: Bearer <accessToken>
Cache-Control: no-cache
- attributeId: the attribute ID of the custom attribute
- orgId: the MC Professional organization ID
- accessToken: the access token issued by the authorization server
Example
Using the example values below, the following is the resulting request:
- orgId: apiexample
- accessToken: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNTA3ODUsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJmNTRhNDE4ZC05ZjZhLTQxYTQtODZkZi02ZGViYzJiM2ZkNzciLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.jXXtvM-dlcyI56Z5uF4h3THGLK27TDuaU5jEoqMUJqU
GET /api/v1/attribute/10010211/state HTTP/1.1
Host: apiexample.memberclicks.net
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNTA3ODUsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJmNTRhNDE4ZC05ZjZhLTQxYTQtODZkZi02ZGViYzJiM2ZkNzciLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.jXXtvM-dlcyI56Z5uF4h3THGLK27TDuaU5jEoqMUJqU
Cache-Control: no-cache
Response
A successful request will return an HTTP status 200 OK with the response in the following format:
HTTP/1.1 200 OK
{
"totalCount": <totalCount>,
"states": <states>
}
- totalCount: the total count of states and provinces
- states: the array of states and provinces. Each object in the array contains the state or province name and abbreviation.
Example
The following is the response for the example request above:
HTTP/1.1 200 OK
{
"totalCount": 51,
"states": [
{
"name": "Alabama",
"abbreviation": "AL"
},
{
"name": "Alaska",
"abbreviation": "AK"
},
{
"name": "Arizona",
"abbreviation": "AZ"
},
{
"name": "Arkansas",
"abbreviation": "AR"
},
{
"name": "California",
"abbreviation": "CA"
},
{
"name": "Colorado",
"abbreviation": "CO"
},
{
"name": "Connecticut",
"abbreviation": "CT"
},
{
"name": "Delaware",
"abbreviation": "DE"
},
{
"name": "District of Columbia",
"abbreviation": "DC"
},
{
"name": "Florida",
"abbreviation": "FL"
},
{
"name": "Georgia",
"abbreviation": "GA"
},
{
"name": "Hawaii",
"abbreviation": "HI"
},
{
"name": "Idaho",
"abbreviation": "ID"
},
{
"name": "Illinois",
"abbreviation": "IL"
},
{
"name": "Indiana",
"abbreviation": "IN"
},
{
"name": "Iowa",
"abbreviation": "IA"
},
{
"name": "Kansas",
"abbreviation": "KS"
},
{
"name": "Kentucky",
"abbreviation": "KY"
},
{
"name": "Louisiana",
"abbreviation": "LA"
},
{
"name": "Maine",
"abbreviation": "ME"
},
{
"name": "Maryland",
"abbreviation": "MD"
},
{
"name": "Massachusetts",
"abbreviation": "MA"
},
{
"name": "Michigan",
"abbreviation": "MI"
},
{
"name": "Minnesota",
"abbreviation": "MN"
},
{
"name": "Mississippi",
"abbreviation": "MS"
},
{
"name": "Missouri",
"abbreviation": "MO"
},
{
"name": "Montana",
"abbreviation": "MT"
},
{
"name": "Nebraska",
"abbreviation": "NE"
},
{
"name": "Nevada",
"abbreviation": "NV"
},
{
"name": "New Hampshire",
"abbreviation": "NH"
},
{
"name": "New Jersey",
"abbreviation": "NJ"
},
{
"name": "New Mexico",
"abbreviation": "NM"
},
{
"name": "New York",
"abbreviation": "NY"
},
{
"name": "North Carolina",
"abbreviation": "NC"
},
{
"name": "North Dakota",
"abbreviation": "ND"
},
{
"name": "Ohio",
"abbreviation": "OH"
},
{
"name": "Oklahoma",
"abbreviation": "OK"
},
{
"name": "Oregon",
"abbreviation": "OR"
},
{
"name": "Pennsylvania",
"abbreviation": "PA"
},
{
"name": "Rhode Island",
"abbreviation": "RI"
},
{
"name": "South Carolina",
"abbreviation": "SC"
},
{
"name": "South Dakota",
"abbreviation": "SD"
},
{
"name": "Tennessee",
"abbreviation": "TN"
},
{
"name": "Texas",
"abbreviation": "TX"
},
{
"name": "Utah",
"abbreviation": "UT"
},
{
"name": "Vermont",
"abbreviation": "VT"
},
{
"name": "Virginia",
"abbreviation": "VA"
},
{
"name": "Washington",
"abbreviation": "WA"
},
{
"name": "West Virginia",
"abbreviation": "WV"
},
{
"name": "Wisconsin",
"abbreviation": "WI"
},
{
"name": "Wyoming",
"abbreviation": "WY"
}
]
}
Get a List of Selection Set Options for a Custom Attribute
This resource returns the list of selection set options for a custom attribute.
Scope
To access this resource, the access token must have the read scope.
Permissions
This resource is available to administrators.
Request
The request to get a list of selection set options for a custom attribute is an HTTP GET to the /api/v1/attribute/<attributeId>/selection endpoint. The following is the format of the request:
GET /api/v1/attribute/<attributeId>/selection HTTP/1.1
Host: <orgId>.memberclicks.net
Accept: application/json
Authorization: Bearer <accessToken>
Cache-Control: no-cache
- attributeId: the attribute ID of the custom attribute
- orgId: the MC Professional organization ID
- accessToken: the access token issued by the authorization server
Example
Using the example values below, the following is the resulting request:
- orgId: apiexample
- accessToken: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNTA3ODUsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJmNTRhNDE4ZC05ZjZhLTQxYTQtODZkZi02ZGViYzJiM2ZkNzciLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.jXXtvM-dlcyI56Z5uF4h3THGLK27TDuaU5jEoqMUJqU
GET /api/v1/attribute/10010213/selection HTTP/1.1
Host: apiexample.memberclicks.net
Accept: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NjgyNTA3ODUsInVzZXJfbmFtZSI6IjEwMDEzNDU2MzAiLCJzY29wZSI6WyJyZWFkIl0sInNlcnZpY2VJZCI6NzM0MCwiYXV0aG9yaXRpZXMiOlsiUk9MRV9BRE1JTiIsIlJPTEVfRklOQU5DSUFMX0FETUlOIiwiUk9MRV9VU0VSIiwiUk9MRV9DTVNfQURNSU4iLCJST0xFX1BST0ZJTEVfSU1QT1JUX0FETUlOIiwiUk9MRV9QUk9GSUxFX0FETUlOIiwiUk9MRV9DT01NVU5JVFlfQURNSU4iLCJST0xFX01FTUJFUlNISVBfQURNSU4iLCJST0xFX0ZPUk1TX0FETUlOIiwiUk9MRV9SRVBPUlRJTkdfQURNSU4iXSwidXNlcklkIjoxMDAxMzQ1NjMwLCJqdGkiOiJmNTRhNDE4ZC05ZjZhLTQxYTQtODZkZi02ZGViYzJiM2ZkNzciLCJjbGllbnRfaWQiOiI4WmdaeFY5QjhyZHdWWEo4bHp1aCJ9.jXXtvM-dlcyI56Z5uF4h3THGLK27TDuaU5jEoqMUJqU
Cache-Control: no-cache
Response
A successful request will return an HTTP status 200 OK with the response in the following format:
HTTP/1.1 200 OK
{
"totalCount": <totalCount>,
"selections": <selections>
}
- totalCount: the total count of selection set options
- selections: the array of selection set options. Each object in the array contains the selection set option name.
Example
The following is the response for the example request above:
HTTP/1.1 200 OK
{
"totalCount": 9,
"selections": [
{
"name": "Baseball"
},
{
"name": "Basketball"
},
{
"name": "Biking"
},
{
"name": "Football"
},
{
"name": "Golf"
},
{
"name": "Hockey"
},
{
"name": "Soccer"
},
{
"name": "Softball"
},
{
"name": "Tennis"
}
]
}