Manage Customer Fields - Add New Field

Create a new field used to gather customer data.

See more

Manage Customer Fields - List

Show the fields used to gather customer data.

See more

Manage Customer Fields - Update

Update the status of fields used to gather customer data.

See more

Manage Customer Fields - Delete Field

Remove a field used to gather customer data.

See more

Manage Transaction Fields - Add New Field

Create a new field used when recording customer transactions.

See more

Manage Transaction Fields - List Custom Fields

List all the custom fields used when recording customer transactions.

See more

Manage Transaction Fields - Update

Update fields used when recording customer transactions.

See more

Manage Transaction Fields - Delete Field

Delete existing fields used when recording customer transactions.

See more
Back to Top

Manage Customer Fields - Add New Field

The data to be submitted to the API is composed of the following fields:

field Example Note
API 1.6 Required
user_id john1970 Required
user_api_key 1959caadac9b13dcb3 Required
type manage_fields Required
action add Required
account_id greatwidgets Required
custom_field_#_label Marital Status Required
custom_field_#_show N optional
custom_field_#_type List Required
custom_field_#_choices Single, Married, Other optional
custom_field_#_searchable Y optional
custom_field_#_unique Y optional
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

NOTE:

  • Only users with proper permissions can access this call.
  • Multiple fields can be added at the same time.
  • If a field is received by the API and is missing some of its parameters, it will be created with any such missing values set to their default: Show=No, Type=Text.
  • Additional fields have the following [field_name_#] structure:
    • "custom_field_#" where the "#" is any integer above 1
      (because one of the per-existing fields is already "custom_field_1")
      Example:
      • custom_field_2
      • custom_field_14
      • ...
    • How do know which number to use? We suggest you do a Customer Fields - List API call first, and see which custom fields, if any, already exist.
  • Field types are:
      Text (up to 64000 characters, unless it's set as searchable (is ID) or unique, in which cases it's up to 255 characters.) Date ("datetime" stamp. Ex: 2012-01-01 14:45:04 ) Pick (Requires [field_name]_choices )
    • List (Requires [field_name]_choices )
  • Currently, the only field type that can be set to be "unique" is the Text type. "Unique" fields don't allow a content entry to be a duplicate of an existing one. An example might be an ID code, etc.
  • Only Text type fields can be set to searchable. All custom fields are searchable with the Customer - Find and Customer - Search API calls. This setting applies only to certain situations, like coalition accounts, where the ability to pull up a customer record is limited by the user's permissions. This field allows to mark a field as being like an "ID" field in that a user can pull up this customer in a coaltion account even though the customer doesn't yet "belong" to that campaign. In non-coalition situations, this would enable the user of Master/Slave customer IDs that allow multiple customers (family, businesses) to earn in a single customer account.
  • The difference between the List type and the Pick type is that for the Pick type, only ONE of the choices can be submitted back to the API, whereas for the List type, any number of the choices can be sent back (separated by a comma ",".)
  • The following default field_names can only be set to show or not. (Their type is set.)
    • card_number
    • first_name
    • last_name
    • phone
    • email
    • street1
    • street2
    • city
    • state
    • zip
    • country
    • customer_username
    • customer_PIN
    • customer_password
    • custom_date
    • custom_field_1

Example PHP Request:

If you are using PHP, the $data array would look like this:


              $data['API'] = '1.5';
              $data['user_id'] = 'john1970';
              $data['user_api_key'] = '1959caadac9b13dcb3'; 
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'manage_fields';
              $data['action'] = 'add';$data['country_show'] = 'N
              $data['custom_field_2_label'] = 'Middle Name'
              $data['custom_field_2_show'] = 'Y';
              $data['custom_field_2_type'] = 'Text';
              $data['custom_field_3_label'] = 'Tags';
              $data['custom_field_3_show'] = 'Y';
              $data['custom_field_3_type'] = 'List';
              $data['custom_field_3_choices'] = 'Tag A, Tag B, Tag C, Tag D, ...';
              $data['custom_field_4_label'] = 'Allow SMS';
              $data['custom_field_4_show'] = 'Y';
              $data['custom_field_4_type'] = 'Pick';
              $data['custom_field_4_choices'] = 'Yes|No';
          

Success XML Response (lists ALL the existing fields):


              <response status="success">
                <account>
                      <account_id>test2009050502</account_id>
                      <fields>
                          <field>
                              <name>card_number</name>
                              <label>Member #</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          <field>
                              <name>first_name</name>
                              <label>First Name</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          ...
                          <field>
                              <name>custom_field_2</name>
                              <label>Middle Name</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          <field>
                              <name>custom_field_3</name>
                              <label>Tags</label>
                              <show>Y</show>
                              <type>List</type>
                              <choices>
                                  <choice>Tag A</choice>
                                  <choice>Tag B</choice>
                                  <choice>Tag C</choice>
                              </choice>
                        </field>
                        <field>
                              <name>custom_field_4</name>
                              <label>Allow SMS</label>
                              <show>Y</show>
                              <type>Pick</type>
                            <choices>
                                  <choice>Yes</choice>
                                  <choice>No</choice>
                            </choice>
                        </field>
                    </fields>
                  </account>
              </response>
          

NOTE:

  • The <show> response indicates whether or not this field ought to be shown or not. Usually fields with "N" will have nothing in them. However, it is allowed to add content to any defined field through the API regardless of their <show> status.

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>
          
Back to Top

Manage Customer Fields - List

The data to be submitted to the API is composed of the following fields:

field Example Note
API 1.6 Required
user_id john1970 Required
user_api_key 1959caadac9b13dcb3 Required
account_id greatwidgets Required
type manage_fields Required
action list Required
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

NOTE:

- Almost all users can access this call.

Example PHP Request:

If you are using PHP, the $data array would look like this:


              $data['user_id'] = 'john1970';
              $data['user_api_key'] = '1959caadac9b13dcb3'; 
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'manage_fields';
              $data['action'] = 'list';
          

Success XML Response:


              <response status="success">
                <account>
                      <account_id>test2009050502</account_id>
                      <fields>
                        <field>
                              <name>card_number</name>
                              <label>Card #</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          <field>
                              <name>custom_field_2</name>
                              <label>Marital Status</label>
                              <show>Y</show>
                              <type>List</type>
                            <choices>
                                  <choice>Single</choice>
                                  <choice>Married</choice>
                                  <choice>Divorced</choice>
                                  <choice>In Civil Union</choice>
                                  <choice>Other</choice>
                            </choices>
                        </field>
                        ...
                    </fields>
                </account>
              </response>
          

NOTE:

  • The <show> response indicates whether or not this field ought to be shown or not. Usually fields with "N" will have nothing in them. However, it is allowed to add content to any defined field through the API regardless of their <show> status.
  • The <type> parameter can be: Text, Date, List (Multiple Choice), or Pick (Single Choice)

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>
          
Back to Top

Manage Customer Fields - Update

The data to be submitted to the API is composed of the following fields:

field Example Note
API 1.6 Required
user_id john1970 Required
user_api_key 1959caadac9b13dcb3 Required
type manage_fields Required
action update Required
account_id greatwidgets Required
custom_field_#__label Marital Status optional
custom_field_#__show N optional
custom_field_#__type List See Note
custom_field_#__choices Single, Married, Other optional
custom_field_#_searchable Y optional
web_update Y optional
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

NOTE:

  • Only users with proper permissions can access this call.
  • Multiple fields can be updated at the same time.
  • [field_name]_type and [field_name]_unique will be ignored if the field to be updated already exists (as it should in an "update" API call -- however, it is allowed to be passed in case the update is done blindly without the ability to know if the field already exists or not, in which case it would be "added", and that requires the "type" to be set, and perhaps if that field is to be "unique" or not, since the these can only be set when a field is created.
  • Only Text type fields can be set to searchable. All custom fields are searchable with the Customer - Find and Customer - Search API calls. This setting applies only to certain situations, like coalition accounts, where the ability to pull up a customer record is limited by the user's permissions. This field allows to mark a field as being like an "ID" field in that a user can pull up this customer in a coaltion account even though the customer doesn't yet "belong" to that campaign. In non-coalition situations, this would enable the user of Master/Slave customer IDs that allow multiple customers (family, businesses) to earn in a single customer account.
  • If using this call as part of a web-based HTML form where users tick checkboxes to select which fields to show, the HTML form will only send back those fields whose boxes are checked. (ie: unchecking a box means that no data is sent back and is essentially the same as the option having never been given.) To solve that issue, either make sure to develop code to still send any "unchecked" field with its value set to "N", OR include the web_udate=Y option which will cause the API to treat any non-submitted choice (unchecked) as having been assigned the value of "N" (This works only on existing fields, because it assumes that those that are "missing" are those that are unchecked.)
  • If a field is received by the API to be updated and does not already exist, it will be created with any values provided (Default: Show=No, if it's not provided.) WARNING: This will NOT happen if a type is not provided, and you cannot change the type once it's set.
  • Field types are:
          Text (up to 64000 characters) Date ("datetime" stamp. Ex: 2012-01-01 14:45:04 ) Pick (Requires [field_name]_choices ) List (Requires [field_name]_choices )
  • The following default field_names can only be set to show or not. (Their type is set.)
    • card_number
    • first_name
    • last_name
    • phone
    • email
    • street1
    • street2
    • city
    • state
    • zip
    • country
    • customer_username
    • customer_PIN
    • customer_password
    • custom_date
    • custom_field_1
  • Additional fields have the following [field_name_#] structure:
    • "custom_field_#" where the "#" is any integer above 1
      (because one of the per-existing fields is already "custom_field_1")
      Example:
      • custom_field_2
      • custom_field_14
      • ...
    • How do know which number to use? We suggest you do a Customer Fields - List API call first, and see which custom fields, if any, already exist.

Example PHP Request:

If you are using PHP, the $data array would look like this:


              $data['API'] = '1.5';
              $data['user_id'] = 'john1970';
              $data['user_api_key'] = '1959caadac9b13dcb3'; 
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'manage_fields';
              $data['action'] = 'update';
              $data['card_number_label'] = 'Member #';
              $data['card_number_show'] = 'Y';
              $data['country_show'] = 'N';
              $data['custom_field_3_label'] = 'Gender';
              $data['custom_field_3_show'] = 'Y';
              $data['custom_field_3_type'] = 'Pick';
              $data['custom_field_3_choices'] = 'Male, Female, Other';
              $data['custom_field_4_label'] = 'Allow SMS';
              $data['custom_field_4_show'] = 'Y';
              $data['custom_field_4_type'] = 'Text';
          

Success XML Response (lists ALL the existing fields):


              <response status="success">
                <account>
                      <account_id>test2009050502</account_id>
                      <fields>
                        <field>
                              <name>card_number</name>
                              <label>Member #</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          <field>
                              <name>first_name</name>
                              <label>First Name</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          ...
                          <field>
                              <name>country</name>
                              <label>Country</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          <field>
                              <name>custom_field_3</name>
                              <label>Gender</label>
                              <show>Y</show>
                              <type>Pick</type>
                              <choices>
                                  <choice>Male</choice>
                                  <choice>Female</choice>
                                  <choice>Other</choice>
                            </choice>
                          </field>
                          <field>
                              <name>custom_field_4</name>
                              <label>Allow SMS</label>
                              <show>Y</show>
                              <type>Text</type>
                        </field>
                    </fields>
                </account>
              </response>
          

NOTE:

  • The <show> response indicates whether or not this field ought to be shown or not. Usually fields with "N" will have nothing in them. However, it is allowed to add content to any defined field through the API regardless of their <show> status.

Example Request 2 (without any fields passed, and "web_update+ set to "Y")
(ie: All fields were unchecked -- Not likely but given as an extreme example):


              $data['API'] = '1.5';
              $data['user_id'] = 'john1970';
              $data['user_api_key'] = '1959caadac9b13dcb3'; 
              $data['type'] = 'manage_fields';
              $data['action'] = 'update';
              $data['account_id'] = 'greatwidgets';
              $data['web_update'] = 'Y';
          

Success XML Response:


              <response status="success">
                <account>
                      <account_id>test2009050502</account_id>
                      <fields>
                          <field>
                              <id>card_number</name>
                              <label>Card #</label>
                              <show>N</show>
                          </field>
                          <field>
                              <id>first_name</name>
                              <label>First Name</label>
                              <show>N</show>
                          </field>
                          ...
                      </fields>
                </account>
              </response>
          

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>
          
Back to Top

Manage Customer Fields - Delete Field

The data to be submitted to the API is composed of the following fields:

field Example Note
API 1.6 Required
user_id john1970 Required
user_api_key 1959caadac9b13dcb3 Required
type manage_fields Required
action delete Required
account_id greatwidgets Required
field_list custom_field_3|custom_field_4 Required
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

NOTE:

  • Only users with proper permissions can access this call.
  • Multiple fields can be deleted at the same time.
  • The following default field_names cannot be deleted (you can update them to show=N, however.)
    • card_number
    • first_name
    • last_name
    • phone
    • email
    • street1
    • street2
    • city
    • state
    • zip
    • country
    • customer_username
    • customer_PIN
    • customer_password
    • custom_date
    • custom_field_1
  • Valid fields that can be deleted have the following field_name structure:
    • "custom_field_#" where the "#" is any integer above 1
      (one of the default fields is "custom_field_1")
      Example:
      • custom_field_2
      • custom_field_14
      • ...

Example PHP Request:

If you are using PHP, the $data array would look like this:


              $data['API'] = '1.5';
              $data['user_id'] = 'john1970';
              $data['user_api_key'] = '1959caadac9b13dcb3'; 
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'manage_fields';
              $data['action'] = 'delete';
              $data['field_list'] = 'custom_field_3|custom_field_4';
          

Success XML Response (lists ALL the existing fields):


              <response status="success">
                  <account>
                      <account_id>test2009050502</account_id>
                      <fields>
                          <field>
                              <name>card_number</name>
                              <label>Member #</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          <field>
                              <name>first_name</name>
                              <label>First Name</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          ...
                          <field>
                              <name>custom_field_2</name>
                              <label>Middle Name</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                      </fields>
                  </account>
              </response>
          

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>
          
Back to Top

Manage Transaction Fields - Add New Field

The data to be submitted to the API is composed of the following fields:

field Example Note
API 1.6 Required
user_id john1970 Required
user_api_key 1959caadac9b13dcb3 Required
type transaction_fields Required
action add Required
account_id greatwidgets Required
custom_field_#_label Item SKU optional
custom_field_#_show Y optional
custom_field_#_type Text Required
custom_field_#_choices New|Used|Other optional
custom_field_#_unique Y optional
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

NOTE:

  • Only users with proper permissions can access this call.
  • Multiple fields can be added at the same time.
  • The type is required, and once set, cannot be changed.
  • If a field is received by the API and is missing some of its parameters, it will be created with any such missing values set to their default: Show=No
  • Field types are:
      Text (up to 255 characters) Number (max precision of 16 digits, with 5 decimal. ie: max value: 99,999,999,999.99999) Monetary (max precision of 14 digits, with 2 decimal. ie: max value: 999,999,999,999.99) Date ("datetime" stamp. Ex: 2012-01-01 14:45:04 ) Pick (Requires [field_name]_choices ) List (Requires [field_name]_choices )
  • Currently, the only field type that can be set to be "unique" is the Text type. "Unique" fields don't allow a content entry to be a duplicate of an existing one. An example might be an ID code, etc.
  • Additional fields MUST have the following field_name structure:
    • "custom_field_#" where the "#" is any integer above 1
      (one of the default fields is "custom_field_1")
      Example:
      • custom_field_2
      • custom_field_14
      • ...

Example PHP Request:

If you are using PHP, the $data array would look like this:


              $data['API'] = '1.5';
              $data['user_id'] = 'john1970';
              $data['user_api_key'] = '1959caadac9b13dcb3'; 
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'transaction_fields';
              $data['action'] = 'add';
              $data['custom_field_1_label'] = 'Item SKU'
              $data['custom_field_1_show'] = 'Y';
              $data['custom_field_1_type'] = 'Text';
              $data['custom_field_2_label'] = 'Tags';
              $data['custom_field_2_show'] = 'Y';
              $data['custom_field_2_type'] = 'List';
              $data['custom_field_2_choices'] = 'Tag A|Tag B|Tag C|Tag D|...';
              $data['custom_field_3_label'] = 'Condition';
              $data['custom_field_3_show'] = 'Y';
              $data['custom_field_3_type'] = 'Pick';
              $data['custom_field_3_choices'] = 'New|Used|Other';
              $data['custom_field_4_label'] = 'Expiration Date';
              $data['custom_field_4_show'] = 'Y';
              $data['custom_field_4_type'] = 'Date';
              $data['custom_field_5_label'] = 'Kilograms';
              $data['custom_field_5_show'] = 'Y';
              $data['custom_field_5_type'] = 'Number';
          

Success XML Response (lists ONLY the custom fields added):


              <response status="success">
                  <account>
                      <account_id>test2009050502</account_id>
                      <fields>
                          <field>
                              <name>custom_field_1</name>
                              <label>Item SKU</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          <field>
                              <name>custom_field_2</name>
                              <label>Tags</label>
                              <show>Y</show>
                              <type>List</type>
                              <choices>
                                  <choice>Tag A</choice>
                                  <choice>Tag B</choice>
                                  <choice>Tag C</choice>
                            </choice>
                          </field>
                          <field>
                              <name>custom_field_3</name>
                              <label>Condition</label>
                              <show>Y</show>
                              <type>Pick</type>
                              <choices>
                                  <choice>New</choice>
                                  <choice>Used</choice>
                                  <choice>Other</choice>
                            </choice>
                          </field>
                          <field>
                              <name>custom_field_4</name>
                              <label>Expiration Date</label>
                              <show>Y</show>
                              <type>Date</type>
                          </field>
                          <field>
                              <name>custom_field_5</name>
                              <label>Kilograms</label>
                              <show>Y</show>
                              <type>Number</type>
                          </field>
                      </fields>
                  </account>
              </response>
          

NOTE:

  • The <show> response indicates whether or not this field ought to be shown or not. Usually fields with "N" will have nothing in them. However, it is allowed to add content to any defined field through the API regardless of their <show> status.

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>
          
Back to Top

Manage Transaction Fields - List Custom Fields

The data to be submitted to the API is composed of the following fields:

field Example Note
API 1.6 Required
user_id john1970 Required
user_api_key 1959caadac9b13dcb3 Required
account_id greatwidgets Required
type transaction_fields Required
action list Required
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

NOTE:

  • Almost all users can access this call.
  • This call returns ONLY the ADDITIONAL custom fields, and NOT the regular predefined ones.
    ie: Only fields whose field_name conform to the custom_field_# format are returned.

Example PHP Request:

If you are using PHP, the $data array would look like this:


              $data['API'] = '1.5';
              $data['user_id'] = 'john1970';
              $data['user_api_key'] = '1959caadac9b13dcb3'; 
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'transaction_fields';
              $data['action'] = 'list';
          

Success XML Response (lists ONLY the custom fields added):


              <response status="success">
                  <account>
                      <account_id>test2009050502</account_id>
                      <fields>
                          <field>
                              <name>custom_field_1</name>
                              <label>Customer ID</label>
                              <show>Y</show>
                              <type>Text</type>
                              <unique>Yes</unique>
                          </field>
                          <field>
                              <name>custom_field_2</name>
                              <label>Tags</label>
                              <show>Y</show>
                              <type>List</type>
                              <choices>
                                  <choice>Tag A</choice>
                                  <choice>Tag B</choice>
                                  <choice>Tag C</choice>
                              </choice>
                          </field>
                          <field>
                              <name>custom_field_3</name>
                              <label>Condition</label>
                              <show>Y</show>
                              <type>Pick</type>
                              <choices>
                                  <choice>New</choice>
                                  <choice>Used</choice>
                                  <choice>Other</choice>
                              </choice>
                          </field>
                          <field>
                              <name>custom_field_4</name>
                              <label>Expiration Date</label>
                              <show>Y</show>
                              <type>Date</type>
                          </field>
                          <field>
                              <name>custom_field_5</name>
                              <label>Kilograms</label>
                              <show>Y</show>
                              <type>Number</type>
                          </field>
                      </fields>
                  </account>
              </response>
          

NOTE:

  • The <show> response indicates whether or not this field ought to be shown or not. Usually fields with "N" will have nothing in them. However, it is allowed to add content to any defined field through the API regardless of their <show> status.

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>
          
Back to Top

Manage Transaction Fields - Update

The data to be submitted to the API is composed of the following fields:

field Example Note
API 1.6 Required
user_id john1970 Required
user_api_key 1959caadac9b13dcb3 Required
type transaction_fields Required
action update Required
account_id greatwidgets Required
custom_field_#_label Item SKU optional
custom_field_#_show Y optional
custom_field_#_type Text See Note
custom_field_#_choices New|Used|Other optional
web_update Y optional
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

NOTE:

  • Only users with proper permissions can access this call.
  • Multiple fields can be added at the same time. [field_name]_type and [field_name]_unique will be ignored if the field to be updated already exists (as it should in an "update" API call -- however, it is allowed to be passed in case the update is done blindly without the ability to know if the field already exists or not, in which case it would be "added", and that requires the "type" to be set, and perhaps if that field is to be "unique" or not, since the these can only be set when a field is created.
  • If using this call as part of a web-based HTML form where users tick checkboxes to select which fields to show, the HTML form will only send back those fields whose boxes are checked. (ie: unchecking a box means that no data is sent back and is essentially the same as the option having never been given.) To solve that issue, either make sure to develop code to still send any "unchecked" field with its value set to "N", OR include the web_udate=Y option which will cause the API to treat any non-submitted choice (unchecked) as having been assigned the value of "N" (This works only on existing fields, because it assumes that those that are "missing" are those that are unchecked.)
  • If a field is received by the API to be updated and does not already exist, it will be created with any values provided (Default: Show=No, if it's not provided.) WARNING: This will NOT happen if a type is not provided, and you cannot change the type once it's set.
  • Field types are:
      Text (up to 255 characters) Number (max precision of 16 digits, with 5 decimal. ie: max value: 99,999,999,999.99999) Monetary (max precision of 14 digits, with 2 decimal. ie: max value: 999,999,999,999.99) Date ("datetime" stamp. Ex: 2012-01-01 14:45:04 ) Pick (Requires [field_name]_choices ) List (Requires [field_name]_choices )
  • Additional fields MUST have the following field_name structure:
    • "custom_field_#" where the "#" is any integer above 1
      (one of the default fields is "custom_field_1")
      Example:
      • custom_field_2
      • custom_field_14
      • ...

Example PHP Request:

If you are using PHP, the $data array would look like this:


              $data['API'] = '1.5';
              $data['user_id'] = 'john1970';
              $data['user_api_key'] = '1959caadac9b13dcb3'; 
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'transaction_fields';
              $data['action'] = 'update';
              $data['custom_field_1_label'] = 'SKU'
              $data['custom_field_2_show'] = 'N';
              $data['custom_field_6_label'] = 'New Field';
              $data['custom_field_6_show'] = 'Y';
              $data['custom_field_6_type'] = 'Text';
          

Success XML Response (lists ONLY the custom fields added):


              <response status="success">
                  <account>
                      <account_id>test2009050502</account_id>
                      <fields>
                          <field>
                              <name>custom_field_1</name>
                              <label>ID</label>
                              <show>Y</show>
                              <type>Text</type>
                              <unique>Yes</unique>
                          </field>
                          <field>
                              <name>custom_field_2</name>
                              <label>Tags</label>
                              <show>N</show>
                              <type>List</type>
                              <choices>
                                  <choice>Tag A</choice>
                                  <choice>Tag B</choice>
                                  <choice>Tag C</choice>
                              </choice>
                          </field>
                          <field>
                              <name>custom_field_3</name>
                              <label>Condition</label>
                              <show>Y</show>
                              <type>Pick</type>
                              <choices>
                                  <choice>New</choice>
                                  <choice>Used</choice>
                                  <choice>Other</choice>
                              </choice>
                          </field>
                          <field>
                              <name>custom_field_4</name>
                              <label>Expiration Date</label>
                              <show>Y</show>
                              <type>Date</type>
                          </field>
                          <field>
                              <name>custom_field_5</name>
                              <label>Kilograms</label>
                              <show>Y</show>
                              <type>Number</type>
                          </field>
                          <field>
                              <name>custom_field_6</name>
                              <label>New Field</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                      </fields>
                  </account>
              </response>
          

NOTE:

  • The <show> response indicates whether or not this field ought to be shown or not. Usually fields with "N" will have nothing in them. However, it is allowed to add content to any defined field through the API regardless of their <show> status.

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>
          
Back to Top

Manage Transaction Fields - Delete Field

The data to be submitted to the API is composed of the following fields:

field Example Note
API 1.6 Required
user_id john1970 Required
user_api_key 1959caadac9b13dcb3 Required
account_id greatwidgets Required
type transaction_fields Required
action delete Required
field_list custom_field_3|custom_field_4 Required
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

NOTE:

  • Only users with proper permissions can access this call.
  • Multiple fields can be deleted at the same time.

Example PHP Request:

If you are using PHP, the $data array would look like this:


              $data['API'] = '1.5';
              $data['user_id'] = 'john1970';
              $data['user_api_key'] = '1959caadac9b13dcb3'; 
              $data['account_id'] = 'greatwidgets';
              $data['type'] = 'transaction_fields';
              $data['action'] = 'delete';
              $data['field_list'] = 'custom_field_3|custom_field_4'
          

Success XML Response (lists ONLY the remaining custom fields added):


              <response status="success">
                  <account>
                      <account_id>test2009050502</account_id>
                      <fields>
                          <field>
                              <name>custom_field_1</name>
                              <label>Item SKU</label>
                              <show>Y</show>
                              <type>Text</type>
                          </field>
                          <field>
                              <name>custom_field_2</name>
                              <label>Tags</label>
                              <show>Y</show>
                              <type>List</type>
                              <choices>
                                  <choice>Tag A</choice>
                                  <choice>Tag B</choice>
                                  <choice>Tag C</choice>
                              </choice>
                          </field>
                          <field>
                              <name>custom_field_5</name>
                              <label>Kilograms</label>
                              <show>Y</show>
                              <type>Number</type>
                          </field>
                      </fields>
                  </account>
              </response>
          

Error XML Response:


              <response status="error">
                <error>Error message</error>
              </response>