Description
Allows marketers the ability to retrieve information on relational tables that were created within their accounts when using the account.addRelationalTable method. Marketers can retrieve all table data or a subset of table data depending on the parameters entered.
Arguments
Field | Description | Field Type | Required | Example |
---|---|---|---|---|
table_id | The table_id that was returned when created using the account.addRelationalTable method. Passing this value will limit the information retrieved to the specific table with the table_id that was passed | Number | No | 132 |
table_name | The table_name value of a previously created table. Passing this value will limit the information retrieved to the specific table with the table_name that was passed | String | No | concert_info |
Response
Field | Description | Example |
---|---|---|
tables | A wrapper around the set of all tables that are in the response. Each individual table's properties (the remaining parameters) will fall within an <item> element inside the <tables> element. | View example below |
item | This element acts as a wrapper for each individual relational table returned in the method call.
NOTE: This <item> element should not be confused with the element of a similar name that is used as a wrapper to each individual column within a relational table. |
See example below |
table_id | The table_id that was returned when created using the account.addRelationalTable method. | 132 |
table_name | The programatic name of the table to be used when updating the table data. Limited to alphanumeric and underscore characters [A-Za-z0-9_] | concert_info |
display_name | The name users will see for the table when viewed within the application | Concert Info |
columns | This element acts as a wrapper of all individual columns within the relational table. | See example below |
item | This element contains a single <column> element. | |
column | This element identifies an individual column within the relational table. It acts as a wrapper for each individual column's metadata. | See example below |
column_name | The programatic name of the column that will be used for two purposes
|
concertDate |
display_name | The name users will see for the column when viewed within the application | Concert Date |
type | The Relational Table is limited to 20 columns. It will allow for any combination of the four following data types:
|
date |
format | Determines the display format when the date or number field is populated within an email
Date
Number
|
FMMonth ddth |
Response Codes
Error Condition | responseCode | responseText |
---|---|---|
Successful operation. All tables and table data are returned | 621 | Displaying all table data |
Successful operation. The filtered set of tables are returned | 622 | Retrieved requested subset of table data |
The "table_id" passed does not exist in the system | 623 | Action not taken, invalid table_id |
The "table_name" value passed does not exist in the system | 624 | Action not taken, invalid table_name |
The account has no relational tables created | 625 | Action not taken, 0 relational tables |
Example Post
<methodcall>
<methodName>account.getRelationalTables</methodName>
</methodcall>
Example Response
<methodResponse>
<item>
<methodName><![CDATA[account.getrelationaltables]]></methodName>
<responseCode><![CDATA[621]]></responseCode>
<responseText><![CDATA[Displaying all table data]]></responseText>
<responseData>
<tables>
<item>
<table_id><![CDATA[4]]></table_id>
<table_name><![CDATA[contacts]]></table_name>
<display_name><![CDATA[Contacts Data]]></display_name>
<columns>
<item>
<column>
<column_name><![CDATA[dob]]></column_name>
<display_name><![CDATA[date of birth]]></display_name>
<format><![CDATA[MM/DD/YYYY]]></format>
<type><![CDATA[date]]></type>
</column>
</item>
<item>
<column>
<column_name><![CDATA[sal]]></column_name>
<display_name><![CDATA[Salary]]></display_name>
<format><![CDATA[1234567]]></format>
<type><![CDATA[number]]></type>
</column>
</item>
<item>
<column>
<column_name><![CDATA[F_name]]></column_name>
<display_name><![CDATA[First Name]]></display_name>
<type><![CDATA[string]]></type>
</column>
</item>
<item>
<column>
<column_name><![CDATA[l_name]]></column_name>
<display_name><![CDATA[Last Name]]></display_name>
<type><![CDATA[string]]></type>
</column>
</item>
<item>
<column>
<column_name><![CDATA[zip]]></column_name>
<display_name><![CDATA[Zip Code]]></display_name>
<type><![CDATA[geo]]></type>
</column>
</item>
</columns>
</item>
<item>
<table_id><![CDATA[2]]></table_id>
<table_name><![CDATA[full_contacts_test]]></table_name>
<display_name><![CDATA[Full Contacts Info]]></display_name>
<columns>
<item>
<column>
<column_name><![CDATA[item]]></column_name>
<display_name><![CDATA[date 1]]></display_name>
<format><![CDATA[MM/DD/YYYY]]></format>
<type><![CDATA[date]]></type>
</column>
</item>
<item>
<column>
<column_name><![CDATA[num1]]></column_name>
<display_name><![CDATA[no 1]]></display_name>
<format><![CDATA[1234567]]></format>
<type><![CDATA[number]]></type>
</column>
</item>
<item>
<column>
<column_name><![CDATA[F_name]]></column_name>
<display_name><![CDATA[First Name]]></display_name>
<type><![CDATA[string]]></type>
</column>
</item>
</columns>
</item>
</tables>
</responseData>
<responseNum><![CDATA[1]]></responseNum>
</item>
</methodResponse>
Example Error
<methodResponse>
<item>
<methodName><![CDATA[account.getrelationaltables]]></methodName>
<responseCode><![CDATA[624]]></responseCode>
<responseText><![CDATA[Action not taken, invalid table_name]]></responseText>
<responseData>
<tables>
<item/>
</tables>
</responseData>
<responseNum><![CDATA[1]]></responseNum>
</item>
</methodResponse>