TourCMS, a leading online booking and channel management solution is operated by Palisis.

Contact Info

Palisis AG
Florastrasse 18A
8610 Uster
support@palisis.com
+41 44 533 40 40

Follow Us

home > support > API > Marketplace API > List Custom Fields

List Custom Fields

List all extra tour content fields for an account.


Notes

For Tour Operator usage only (not accessible by Marketplace Agents).

REST info

Endpointapi/account/custom_fields/get
FormatsXML
Example/api/account/custom_fields/get.xml
VerbGET

Code samples

PHP examples use the PHP Client Library with the return type set to SimpleXML


Description

object get_custom_fields(int $channel)


Parameters

$channel
ID number for the channel this account belongs to.


Example


    // 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

Querystring parameters

There are no querystring parameters.

Post fields

There are no post fields

Response fields

Response fields
XML NodeNotes
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:

XML NodeNotes
custom_field

There will be a node for each custom field defined in the account.
Each custom_field child node contains the following info.

XML NodeNotes
extra_id Custom field ID in the account
title Custom field name
type Custom field type
tag Custom field tag
display If custom field is visible or not

More information