home > support > API > Marketplace API > List Custom Fields
List all extra tour content fields for an account.
For Tour Operator usage only (not accessible by Marketplace Agents).
Endpoint | api/account/custom_fields/get |
Formats | XML |
Example | /api/account/custom_fields/get.xml |
Verb | GET |
PHP examples use the PHP Client Library with the return type set to SimpleXML
object get_custom_fields(int $channel)
// Define the channel ID the account belongs to.
$channel = 3930;
// Call TourCMS API, listing all custom fields.
$result = $tourcms->get_custom_fields($channel);
if ($result->error == "OK") {
print "List Custom Fields";
foreach ($result->custom_fields->custom_field as $field) {
print($field->extra_id. ' - '. $field->title);
}
} else {
print $result->error;
}
List Custom Fields
1 - shortdescription
2 - largedescription
Looking for sample code in a different language? TourCMS and community provided API libraries
There are no querystring parameters.
There are no post fields
XML Node | Notes | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request | Confirmation of the request that you sent | ||||||||||||||||
error | Any error message returned, if there is no error this will just contain the text OK | ||||||||||||||||
account_id | The ID of the account | ||||||||||||||||
custom_fields |
custom_fields node contains:
|