API Methods: users.getProfileBlock

Description

Returns a list of profile blocks and their fields, or if called appropriately, returns a user's responses for a given profile block.


Authentication

This method requires authentication with 'read' permission.

API Version

Version 2

Required parameters

  • None

Optional parameters

  • block_id
    the unique identifier of the block
  • user_id
    passing a user_id and a block_id together will provide you with the given user's responses to the specified profile block
  • title
    the title of the block
  • tiers
    the tiers to which the profile block is applicable
  • modified
    the timestamp of the last modification
  • enabled
    whether or not the profile block is enabled

Example response

Profile block information:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok" time="Mon, 09 Mar 2009 07:04:59 +0000">
<profile_blocks count="2" total="2">
	<profile_block>
		<block_id>1</block_id>
		<title><![CDATA[Basic Information]]></title>
		<enabled>1</enabled>
		<tiers><![CDATA[1,2]]></tiers>
		<modified><![CDATA[Mon, 26 Jan 2009 23:55:33 +0000]]></modified>
		<fields>
			<field>
				<type>textField</type>
				<label>Location</label>
				<default_value>enter your location</default_value>
				<options_list/>
				<max_length>150</max_length>
				<required>1</required>
				<display_on_profile>1</display_on_profile>
				<display_on_registration>1</display_on_registration>
				<tiers>1,2</tiers>
				<sequence>1</sequence>
				<modified>2009-01-26 17:55:33</modified>
				<field_id>1</field_id>
			</field>
			<field>
				<type>textField</type>
				<label>Contact</label>
				<default_value>Enter your email address</default_value>
				<options_list/>
				<max_length>100</max_length>
				<required>1</required>
				<display_on_profile>1</display_on_profile>
				<display_on_registration>0</display_on_registration>
				<tiers>1,2</tiers>
				<sequence>2</sequence>
				<modified>2009-01-26 17:56:15</modified>
				<field_id>2</field_id>
			</field>
		</fields>
	</profile_block>
</profile_blocks>
</response>

Profile block information with user response values:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok" time="Mon, 09 Mar 2009 07:04:59 +0000">
<profile_blocks count="2" total="2">
	<profile_block>
		<block_id>1</block_id>
		<title><![CDATA[Basic Information]]></title>
		<enabled>1</enabled>
		<tiers><![CDATA[1,2]]></tiers>
		<modified><![CDATA[Mon, 26 Jan 2009 23:55:33 +0000]]></modified>
		<fields>
			<field>
				<type>textField</type>
				<label>Location</label>
				<default_value>enter your location</default_value>
				<options_list/>
				<max_length>150</max_length>
				<required>1</required>
				<display_on_profile>1</display_on_profile>
				<display_on_registration>1</display_on_registration>
				<tiers>1,2</tiers>
				<sequence>1</sequence>
				<modified>2009-01-26 17:55:33</modified>
				<field_id>1</field_id>
				<userdata><![CDATA[Austin, TX]]></userdata>
			</field>
			<field>
				<type>textField</type>
				<label>Contact</label>
				<default_value>Enter your email address</default_value>
				<options_list/>
				<max_length>100</max_length>
				<required>1</required>
				<display_on_profile>1</display_on_profile>
				<display_on_registration>0</display_on_registration>
				<tiers>1,2</tiers>
				<sequence>2</sequence>
				<modified>2009-01-26 17:56:15</modified>
				<field_id>2</field_id>
				<userdata><![CDATA[nobody@nowhere.com]]></userdata>
			</field>
		</fields>
	</profile_block>
</profile_blocks>
</response>