Skip to content

Sharing Service API Documentation

6 edited this page Jan 5, 2013 · 3 revisions

Bandido has a RESTful JSON API that supports both HTTP and HTTPS for sharing search records and UGC photos and stories.

URLs

POST / to share search records and UGC photos and stories

Header

  • CONTENT-TYPE: application/json
  • User authentication (choose 1)
    • X-ACOM-ATT: att_token_value
    • X-ACOM-USER-TOKEN: user_token_value

Body

  • Search Records
    • collection_id and record_id are required strings
    • tree_id, person_id, referrer, and locale are optional
{
  "collection_id": "collection_id",
  "record_id": "record_id",
  "tree_id": "tree_id",
  "person_id": "person_id",
  "referrer": {
    "client": "web", //web, iOS, android, or 3rd-party API token
    "page": "page" //any string
  },
  "locale": "locale" // see below
}
  • UGC photos and stories # TODO consider adding audios and videos
    • object_id and tree_id are required strings
    • person_id, referrer, and locale are optional
{
  "object_id": "object_id",
  "tree_id": "tree_id",
  "person_id": "person_id",
  "referrer": {
    "client": "web", //web, iOS, android, or 3rd-party API token
    "page": "page" //any string
  },
  "locale": "locale" // see below
}
  • locale String or Windows codes (as strings or integers)
"en-US" : 1033
"en-CA" : 4105
"fr-CA" : 3084
"en-UK" : 2057
"sv-SE" : 1053
"it-IT" : 1040
"de-DE" : 1031
"fr-FR" : 1036

Response

We return JSON with sharable url and other helpful data.

{
  "url": "http:\/\/sharing.ancestry.com\/?h=ac091e",
  "title": "Discovered in the 1930 U.S. census",
  "caption": null,
  "category": "search_record",
  "sharer": {
    "first_name": "Sharer"
  },
  "subject": null, // nested "first_name" and "full_name" if there is a subject
  "image": {
    "thumbnail": "http:\/\/sharing.ancestry.com\/\/image.jpg?h=ac091e",
  }
}

Clone this wiki locally