Quantcast

SodaHead.com Partner API Endpoints

In all instances, polls must have been created via <partners> sub-domain.

[active] poll(s) by id:

  • http://<partner>.sodahead.com/api/polls/<poll_id>/
  • http://<partner>.sodahead.com/api/polls/<poll_id>/<poll_id>/<poll_id>/.../

[active] poll(s) (by id) extensions (ex. geo-location):

  • http://<partner>.sodahead.com/api/polls/(<poll_id>/)*?ext=geo
  • @param ext: extensions (csv options: geo, geo-intl, geo-<country_code>)
  • geo shows US per-state counts and the remainder under intl.
  • Where sessions do not have a state locality, counts are accumulated under an empty, "" state-key for the applicable country, if expanded to the state level.
  • Country codes are ISO 3166 (string).
  • State/province codes are ISO-3166-2 (string) for US/Canada and FIPS 10-4 (string) otherwise.
  • Answer ids and counts are uint32.
  • geo-intl shows per-country counts.
  • Where sessions do not have a country locality, counts are accumulated under the US key.
  • geo-<country_code> shows that countries counts and the remainder under intl -- geo-us is synonymous and adheres to the rules of geo.
  • Where sessions do not have a country locality, counts are accumulated under the intl key.

[open] poll voting:

  • http://<partner>.sodahead.com/api/polls/<poll_id>/vote/
  • @param answer: (POST) answer_id
  • @return poll and vote objects

[active] poll(s) (by faceted search)

  • http://<partner>.sodahead.com/api/polls/
  • @param site: (variadic) (int) site/affiliate/author id(s)
  • @param startdate: (UTC datetime) (int) start/activation datetime >= seconds since POSIX epoch
  • @param enddate: (UTC datetime) (int) end/close datetime <= seconds since POSIX epoch
  • @param keyword: (variadic) (str) keyword(s)
  • @param limit: items returned per page (default: 40; max: 1000)
  • @return next and prev [relative] uri(s)
  • Variadic parameters take a set of values under the same key; values are OR'd for each set.

[active] poll(s) by page:

  • http://<partner>.sodahead.com/api/polls/page/?index=/<unique_identifier>/index.html
  • @param index: URI to an index
  • @return single poll
  • http://<partner>.sodahead.com/api/polls/page/?story=<identifier>
  • @param story: URI to a story
  • @return list of poll(s), even if only a single index
  • URIs can be urlencoded / quoted