Bandido Restful API - 1000Memories/Documentation GitHub Wiki
Bandido has a RESTful JSON API that supports both HTTP and HTTPS for sharing search records and UGC photos and stories.
URLs
- Dev: http://sharing.ancestrydev.com
- Stage: http://sharing.ancestrystage.com
- Production: http(s)://sharing.ancestry.com
Common to all requests
Header
CONTENT-TYPE: application/json- User authentication (choose 1)
X-ACOM-ATT: att_token_valueX-ACOM-USER-TOKEN: user_token_valueandX-ACOM-USER-ID: user-id(where user-id is the user id associated to the token, it looks like that: 000CCAB1-D004-0000-0000-000000000000)
POST / to share search records and UGC photos and stories
Body
- Search Records
collection_idandrecord_idare required stringstree_id,person_id,referrer, andlocaleare 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_idandtree_idare required stringsperson_id,referrer, andlocaleare 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
}
localeString 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
"en-AU" : 3081
Response
We return JSON with sharable url and other helpful data.
{
"id" => 1,
"url": "http:\/\/sharing.ancestry.com\/1?h=ac091e",
"title": "Discovered in the 1940 U.K. census",
"caption": null,
"category": "search_record",
"sharer": {
"first_name": "John",
"full_name" => "John Lennon",
},
"subject": {
"first_name" => "Paul",
"full_name" => "Paul McCartney",
},
"image": {
"thumbnail": "http:\/\/sharing.ancestry.com\/1\/image.jpg?h=ac091e",
},
"locale" : "en-UK"
}
GET /shares/:id/share-count to track shares
This endpoint increases the number of share count on a specific social network for a Bandido page.
No particular headers are required.
Required parameter:
type(string)
GET /shares/:id/email to send the Bandido page by email
This endpoint allows to share an existing Bandido share based given its ID.
Note: appropriate headers must be set as described above.
This endpoint is a GET endpoint with the pattern: /shares/:share_id/email. The URL must also include a few GET parameters.
Required parameters (should be URL encoded)
recipient_emailsender_emailsender_first_namepersonal_messagelocale
Example:
GET /shares/2139948/[email protected]&[email protected]&sender_first_name=Jane&personal_message=Check%20out%20%this%20document