BatchBook API

SuperTags

The SuperTags service supports list all available SuperTags, as well as fetching the details of a given SuperTag. Currently, it does not support requests to create, update or delete the SuperTags themselves. You can apply SuperTags to other records and assign values to the fields.

Note: Each of these requests requires that you authenticate with a BatchBook account. This requires an account name and an API token. For more information on authentication, visit the API homepage.

Methods

Show

GET /service/super_tags/#{name}.xml
Returns a single Super Tag. Note: If the SuperTag name has spaces, it must be encoded.

Response

    
      Status: 200
      
      <super_tag>
        <name>testtag</name>
        <fields>
          <field type="Multiple choice" name="Sales Cluster">
            <option></option>
            <option>Sapphire</option>
            <option>Emerald</option>
            <option>Ruby</option>
          </field>
          <field type="Multiple choice" name="More Choices">
            <option></option>
            <option>yellow</option>
            <option>red</option>
            <option>blue</option>
          </field>
          <field type="Multiple choice" name="Multiple Checkbox">
            <option>first</option>
            <option>second</option>
            <option>third</option>
            <option>last</option>
          </field>
          <field type="Text">Something</field>
        </fields>
      </super_tag>
    
  

List All

GET /service/super_tags.xml
Returns all SuperTags and their formats.

Response

    
      Status: 200
      
      <super_tags type="array">
        <super_tag>
          ...
        </super_tag>
        <super_tag>
          ...
        </super_tag>	
      </super_tags>
    
  

Show SuperTag for a Record

GET /service/#{records}/#{record_id}/super_tags/#{name}.xml
Returns the SuperTag and information for the record. The record could be either deals, companies, or people. Note: If the SuperTag name has spaces, it must be encoded.

    Note:
  • If the field is empty, it won't be returned.
  • If the field name has spaces, the spaces will be replaced with '_' underscores.

Response

    
      Status: 200
      
      <super_tag>
        <id>89</id>
        <name>sample SuperTag</name>
        <supertag>true</supertag>
        <fields>
          <single_choice_dropdown>Best Choice</single_choice_dropdown>
          <simple_text_field>Simple text</simple_text_field>
          <multiple_checkboxes type="Array">
            <multiple_checkbox>first</multiple_checkbox>
            <multiple_checkbox>second</multiple_checkbox>
          </multiple_checkboxes>
        </fields>
      </super_tag>
    
  

List All SuperTags for a Record

GET /service/#{records}/#{record_id}/super_tags.xml
Returns all SuperTags for a Record. The record could be either deals, companies, or people. Note: If the SuperTag name has spaces, it must be encoded.

    Note:
  • If the field is empty, it won't be returned.
  • If the field name has spaces, the spaces will be replaced with '_' underscores.

Response

    
      Status: 200
      
      <super_tags type="array">
        <super_tag>
          ...
        </super_tag>
        <super_tag>
          ...
        </super_tag>	
      </super_tags>
    
  

Add or Update a SuperTag to a Record

PUT /service/#{records}/#{record_id}/super_tags/#{name}.xml
Add or Update a SuperTag on a Record. The record could be either deals, companies, or people. The data to send is based on the fields in the SuperTag. See Show for more information.

    Note:
  • If the record doesn't have the SuperTag, one will be added.
  • If the field name has spaces, the spaces must be replaced with '_' underscores.
  • If selecting more than one option for the checkboxes (multiple choice) they are not nested as seen below.
  • Checkboxes (Multiple Choice) values can also be sent in one xml element, with comma separated values "first,second" as well.

Request

    
      Dependent on the field names and types
      
      <super_tag>
        <single_choice_dropdown>Best Choice</single_choice_dropdown>
        <simple_text_field>Simple text</simple_text_field>
        <multiple_checkbox>first</multiple_checkbox>
        <multiple_checkbox>second</multiple_checkbox>
      </super_tag>
    
  

Remove a SuperTag from a Record

DELETE /service/#{records}/#{record_id}/super_tags/#{name}.xml
Removes a SuperTag that has been associated with a Record. The record could be either deals, companies, or people.

Response

    
      Status: 200