fans and counting

api FanBridge API - Reference

Top Top

account/me

Returns the information of the current user.

URL:

https://api.fanbridge.com/[version]/account/me.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

none

Returns:

  • id integer Current user ID.
  • firstname string Firstname of current user.
  • lastname string Lastname of current user.
  • band_name string Band name of current user.
  • band_image string URL of the band logo.
  • band_url integer External URL to access the site of the band.
  • subdomain string URL to access the site of the band.
  • welcome_message string An additional welcome message from band.
Top

socialnet_campaign/cancel_schedule

Puts a socialnet campaign in draft mode.

URL:

https://api.fanbridge.com/[version]/socialnet_campaign/cancel_schedule.[format]?token=[token]&signature=[signature]

Supported request methods:

POST

Parameters:

  • campaign_id integer (required) The campaign ID we want to cancel the schedule.

Returns:

none
Top

socialnet_campaign/create

Creates a new campaign.

URL:

https://api.fanbridge.com/[version]/socialnet_campaign/create.[format]?token=[token]&signature=[signature]

Supported request methods:

POST

Parameters:

  • name string (required) Name of the socialnet campaign.
  • message string (required) Message to be posted in the socialnet.
  • date_schedule string (required) Datetime of the schedule.
  • accounts array (required) Accounts IDs to post the campaign.
    You can fetch all available accounts with socialnet_campaign / fetch_accounts method.
    • id integer (required) Account ID.

Returns:

  • id integer The new campaign ID.
Top

socialnet_campaign/fetch_accounts

Returns all socialnet accounts a user already added to his account.

URL:

https://api.fanbridge.com/[version]/socialnet_campaign/fetch_accounts.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

none

Returns:

  • id integer Account ID.
  • name string The name you use to login to this account.
  • network string The name of this network. Ie.: "facebook".
  • type string The type of the network.
Top

email_group/create

Creates a new group.

URL:

https://api.fanbridge.com/[version]/email_group/create.[format]?token=[token]&signature=[signature]

Supported request methods:

POST

Parameters:

  • name string (required) The name of the new group.
  • description string A description for the group.
  • public boolean Indicates if we want the group to be public.

Returns:

  • id integer New group ID.
Top

email_group/fetch_all

Returns the email groups of the current user.

URL:

https://api.fanbridge.com/[version]/email_group/fetch_all.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

  • offset integer The resultset offset to start. Default value is '0'.
  • limit integer The limit amount of results to retrieve. Default value is '15'.

Returns:

  • id integer Group Id.
  • name string Group name.
  • public boolean Whther group scope is public or not.
  • description string Group description.
  • count integer The amount of members in the group.
  • created_on string Group creation date in ISO format (YYYY-MM-DD HH:MM:SS) on EST timezone.
Top

subscriber/add

Add a new subscriber to the current user list.

URL:

https://api.fanbridge.com/[version]/subscriber/add.[format]?token=[token]&signature=[signature]

Supported request methods:

POST

Parameters:

  • firstname string Subscriber firstname.
  • lastname string Subcriber lastname.
  • email string (required) Subscriber email address.
  • address string Subscriber main address.
  • address2 string Subscriber secondary address.
  • zip_code integer Subscriber zip code info.
  • city string Subscriber city name.
  • state string Subscriber state name. You can fetch all available states with region / get_states method.
  • country string Subscriber country ISO code. You can fetch all available countries with region / get_countries method.
  • cellphone string Subscriber cellphone number.
  • carrier integer (required if cellphone is provided) Cellphone carrier.
    You can fetch all available carrier IDs with text_subscriber / get_carriers method.
  • year integer Subscriber age.
  • gender string Subscriber gender.
    Allowed values are: female, male
  • format string Email sending format.
    Allowed values are: html, text
  • ip string Detected subscriber IP address. Default value is IP detected by the server.
  • twitter_url string Subscriber Twitter URL.
  • notes string Some usefull description.
  • groups array Groups for adding the subscriber to.
  • welcome_email boolean Whether we want to send a welcome email or not.

Returns:

  • id integer The ID of the newly added subscriber.
Top

subscriber/count

Counts the total of subscribers if none parameter have been passed. Counts the total of subscribers grouping by zip code, if some bunch of zip codes have been passed.

URL:

https://api.fanbridge.com/[version]/subscriber/count.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

none

Or
  • zip_codes array A bunch of zip groups to get members count from. Each zip group must have the following form:
    • zip string (required) Zip code.
    • distance integer Distance ratio. Limits are from 0 to 10000 miles.

Returns:

  • count integer The total subscribers count.
Or
  • zip string Zip code.
  • distance integer Distance ratio.
  • count integer Members count for this zip code and ratio.
Top

subscriber/import

Makes bulk of imports.

URL:

https://api.fanbridge.com/[version]/subscriber/import.[format]?token=[token]&signature=[signature]

Supported request methods:

POST

Parameters:

  • subscribers array (required) The list of subscribers to import.
    • firstname string Subscriber firstname.
    • lastname string Subcriber lastname.
    • email string (required) Subscriber email address.
    • address string Subscriber main address.
    • address2 string Subscriber secondary address.
    • zip_code integer Subscriber zip code info.
    • city string Subscriber city name.
    • state string Subscriber state name. You can fetch all available states with region / get_states method.
    • country string Subscriber country ISO code. You can fetch all available countries with region / get_countries method.
    • cellphone string Subscriber cellphone number.
    • carrier integer (required if cellphone is provided) Cellphone carrier.
      You can fetch all available carrier IDs with text_subscriber / get_carriers method.
    • year integer Subscriber age.
    • gender string Subscriber gender.
      Allowed values are: female, male
    • format string Email sending format.
      Allowed values are: html, text
    • twitter_url string Subscriber Twitter URL.
    • notes string Some usefull description.
  • groups array Groups for adding the subscriber to.
  • welcome_email boolean Whether we want to send a welcome email or not.
  • welcome_message string A custom welcome message for all new subscribers.

Returns:

  • id integer The ID of the newly started import.
Top

subscriber/cancel_import

Cancels an already started import process.

URL:

https://api.fanbridge.com/[version]/subscriber/cancel_import.[format]?token=[token]&signature=[signature]

Supported request methods:

POST

Parameters:

  • import_id integer (required) Import ID.

Returns:

none
Top

subscriber/import_status

Gets the status and report of a started/finished import process.

URL:

https://api.fanbridge.com/[version]/subscriber/import_status.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

  • import_id integer (required) Import ID.

Returns:

  • status string Current status of the process. Possible values are:
    • pending: Import process is waiting to start.
    • running: Import process is running.
    • canceled: Import process was canceled.
    • finished: Import process was finished.
  • progress mixed The progress percentage of the process if running; empty otherwise.
  • report array Current statistics for the current import process.
    • msl integer Master supression list: Users not allowed to send emails to.
    • fan_unsubscribed integer Subscribers that were previously unsubscribed by themselves.
    • bounces integer Rejected subscribers by the system (unexistent email probably).
    • invalid_address integer Subscribers with invalid email addresses.
    • updated integer Updated subscribers.
    • success integer Added subscribers.
Top

tour_calendar/fetch

Fetches a show for a user.

URL:

https://api.fanbridge.com/[version]/tour_calendar/fetch.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

  • id integer (required) Show ID.

Returns:

  • id integer Show ID.
  • name string Name of the show.
  • date_time string Date and Time of the show.
  • doors_time string Show doors time.
  • price integer Show price.
  • currency string Currency type.
  • ticket_purchase_url string Web page where you can purchease tickets.
  • age_minimum string Minimum age for accessing the show.
  • additional string Additional info.
  • details string Show FanBridge page.
  • show_external_last_updated string Last show update.
  • venue array Show venue.
    • name string Venue name.
    • address string Venue address.
    • address2 string Another venue address.
    • city string Venue city.
    • state string Venue state.
    • state_abbv string Venue state abbreviation.
    • zip_code integer Venue zip code.
    • country_code string Venue country code.
    • country_name string Venue country name.
    • phone string Contact phone.
    • url string Venue URL.
  • source array Show source.
    • source. string Source type.
    • artist_external_identifier string Third part artist identifier.
    • show_external_identifier string Third part show identifier.
Top

tour_calendar/fetch_upcoming

Fetches all shows for a user filtered by date.

URL:

https://api.fanbridge.com/[version]/tour_calendar/fetch_upcoming.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

  • date string Date to retrieve shows from, in date ISO format (YYYY-MM-DD) on EST timezone. You can use "NOW" to refer to the current date.

Returns:

  • array Retrieves all shows for a user.
    • id integer Show ID.
    • name string Name of the show.
    • date_time string Date and Time of the show.
    • doors_time string Show doors time.
    • price integer Show price.
    • currency string Currency type.
    • ticket_purchase_url string Web page where you can purchease tickets.
    • age_minimum string Minimum age for accessing the show.
    • additional string Additional info.
    • details string Show FanBridge page.
    • show_external_last_updated string Last show update.
    • venue array Show venue.
      • name string Venue name.
      • address string Venue address.
      • address2 string Another venue address.
      • city string Venue city.
      • state string Venue state.
      • state_abbv string Venue state abbreviation.
      • zip_code integer Venue zip code.
      • country_code string Venue country code.
      • country_name string Venue country name.
      • phone string Contact phone.
      • url string Venue URL.
    • source array Show source.
      • source. string Source type.
      • artist_external_identifier string Third part artist identifier.
      • show_external_identifier string Third part show identifier.
Top

tour_calendar/fetch_all

Fetches all shows for a user.

URL:

https://api.fanbridge.com/[version]/tour_calendar/fetch_all.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

  • offset integer The resultset offset to start. Default value is '0'.
  • limit integer The limit amount of results to retrieve. Default value is '50'.

Returns:

  • array Retrieves all shows for a user.
    • id integer Show ID.
    • name string Name of the show.
    • date_time string Date and Time of the show.
    • doors_time string Show doors time.
    • price integer Show price.
    • currency string Currency type.
    • ticket_purchase_url string Web page where you can purchease tickets.
    • age_minimum string Minimum age for accessing the show.
    • additional string Additional info.
    • details string Show FanBridge page.
    • show_external_last_updated string Last show update.
    • venue array Show venue.
      • name string Venue name.
      • address string Venue address.
      • address2 string Another venue address.
      • city string Venue city.
      • state string Venue state.
      • state_abbv string Venue state abbreviation.
      • zip_code integer Venue zip code.
      • country_code string Venue country code.
      • country_name string Venue country name.
      • phone string Contact phone.
      • url string Venue URL.
    • source array Show source.
      • source. string Source type.
      • artist_external_identifier string Third part artist identifier.
      • show_external_identifier string Third part show identifier.
Top

fan_question/create

Creates a new fan question.

URL:

https://api.fanbridge.com/[version]/fan_question/create.[format]?token=[token]&signature=[signature]

Supported request methods:

POST

Parameters:

  • question string (required) The question to do.
  • weekly_digest boolean Whether we want to subscribe the fan to the FanBridge newsletter. Default value is 'false'.
  • ip string Fan detected IP address. Default value is detected IP from server.
  • subscriber_id integer If the fan is already a subscriber of the account, you can provide they subscriber ID to identify them. Otherwise, the question will be sent as "Anonymous".

Returns:

  • fanquestion_id integer New fan question ID.
Top

fan_question/fetch

Returns a specific fan question.

URL:

https://api.fanbridge.com/[version]/fan_question/fetch.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

  • id integer (required) Fan Question ID.

Returns:

  • id integer Fan Question ID.
  • answered boolean Whether the question has been answered or not.
  • media_type string The text type of the question.
  • question string Text of the question.
  • date_question string The date the question was made.
  • default_question string The automatic question made for the system on subscribing.
  • status string The status of the question. Possible values are:
    • read: Question has been already chcked.
    • unread: Question has not been checked yet.
    • deleted: Question has been deleted.
  • answer string Text of the answer.
  • date_answer string The date the question was answered.
  • subscriber_id integer ID of the user that made the question.
  • email string [Deprecated]
  • subscriber_email string Subscriber email.
  • user_id integer User ID.
  • subscriber_enabled boolean Whether the subscriber is enabled or not.
  • subscribed boolean Whether the subscriber is email subscribed or not.
  • question_to_post string Question for posting.
Top

fan_question/fetch_all

Returns all fan question.

URL:

https://api.fanbridge.com/[version]/fan_question/fetch_all.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

  • offset integer Records offset to start from. Default value is '0'.
  • limit integer Limit of results to get for a page. Default value is '100'.
  • type string Whether we should apply a filter for results. Possible values are:
    • answered: All answered questions.
    • unanswered: All unanswered questions.
    • all: All questions (default).

Returns:

  • array A bunch of Fan Questions. Each group has the following fields:
    • id integer Fan Question ID.
    • answered boolean Whether the question has been answered or not.
    • media_type string The text type of the question.
    • question string Text of the question.
    • date_question string The date the question was made.
    • default_question string The automatic question made for the system on subscribing.
    • status string The status of the question. Possible values are:
      • read: Question has been already chcked.
      • unread: Question has not been checked yet.
      • deleted: Question has been deleted.
    • answer string Text of the answer.
    • date_answer string The date the question was answered.
    • email string [Deprecated]
    • subscriber_email string Subscriber email.
Top

fan_question/count

Returns the total of fan question (filtered by type or not).

URL:

https://api.fanbridge.com/[version]/fan_question/count.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

  • type integer Type of Fan Question to count.

Returns:

  • count integer The total of filtered (or not) Fan Questions.
Top

fan_question/update

Answers a Fan Question.

URL:

https://api.fanbridge.com/[version]/fan_question/update.[format]?token=[token]&signature=[signature]

Supported request methods:

POST

Parameters:

  • id integer (required) Fan Question ID.
  • answer string (required) The text of the answer.
  • edit boolean Whether we are updating an already answered question or not.

Returns:

none
Top

fan_question/delete

Deletes a Fan Question.

URL:

https://api.fanbridge.com/[version]/fan_question/delete.[format]?token=[token]&signature=[signature]

Supported request methods:

POST

Parameters:

  • id integer (required) Fan Question ID.

Returns:

none
Top

fan_question/mark_as_read

Marks a Fan Question as read.

URL:

https://api.fanbridge.com/[version]/fan_question/mark_as_read.[format]?token=[token]&signature=[signature]

Supported request methods:

POST

Parameters:

  • id integer (required) Fan Question ID.

Returns:

none
Top

region/get_states

Returs the USA states.

URL:

https://api.fanbridge.com/[version]/region/get_states.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

none

Returns:

  • id integer State ID.
  • name string State name.
  • abbv string State abbreviation name.
Top

region/get_countries

Returs the countries.

URL:

https://api.fanbridge.com/[version]/region/get_countries.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

none

Returns:

  • iso string Country ISO code.
  • name string Country name.
Top

text_subscriber/get_carriers

Returs phone carriers.

URL:

https://api.fanbridge.com/[version]/text_subscriber/get_carriers.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

none

Returns:

  • id integer Carrier ID.
  • carrier string Carrier name.
Top

utils/get_date_time

Returns the current datetime of the FanBridge server.

URL:

https://api.fanbridge.com/[version]/utils/get_date_time.[format]?token=[token]&signature=[signature]

Supported request methods:

GET

Parameters:

none

Returns:

  • date_time string FanBridge server date and time in ISO format (YYYY-MM-DD HH:MM:SS) on EST timezone.