Pinner
URL
http://www.historypin.org/en/api/pin/save.json
Postdata
- id (integer, required when editing) - A value representing the Item Identification Number (ID)
- caption (string, required) - Item title
- description (string, required)
- date (string, required) - Date whent the item was taken/shot. Can be one of the following formats:
- YYYY - concrete year
- YYYY-YYYY - year range
- YYYY-MM-DD - concrete date
- license_key (string, required) - Can be one of the following values:
- copyright
- no-copyright
- public-domain
- open-government
- http://creativecommons.org/publicdomain/zero/1.0/
- http://creativecommons.org/licenses/by/3.0/
- http://creativecommons.org/licenses/by-sa/3.0/
- http://creativecommons.org/licenses/by-nd/2.0/
- http://creativecommons.org/licenses/by-nc/3.0/
- http://creativecommons.org/licenses/by-nc-sa/3.0/
- http://creativecommons.org/licenses/by-nc-nd/3.0/
- rights_statement (string) - Any extra details about who created this item or who to get in touch with for more information.
- link (string) - If this item is from another website, (eg. wikimedia, archive website, flickr), add the link.
- notes (string) -
Location Object
- location[lat] (float, required) - center lattitude
- location[lng] (float, required) - center longitude
- location[range] (int) - range in meters for the project area
- 0 for exact location
- greater than 0 for range location
- location[raw] (string) - Text location (Example: Coventry, West Midlands)
- location[geo_tags] (string) - (Example: 49 Stoney Rd, Coventry, West Midlands CV3 6HH, UK)
Tags Object
This is an array of objects. These objects can consists of just a tag text. This can be selected from autocomplete.
Example:
- tags[0][text] = blitzcollection
- tags[1][text] = bombing
Projects Object
This is an array of objects. These objects can consists of just a project id.
At least one project have to send
Example:
- repinned_projects[0][id] = 782
- repinned_projects[1][id] = 345
Remote object
For the remote to be saved at least a remote ID and provider ID must be sent.
Please ask the Historypin Team for the remote provider ID value
Example:
- remote[id] = /1234567/tracks_12345678
- remote[provider_id] = 1234567890
Additional Data
Additional data to be send when creating new pin
- pinner_type (string, required) - Can be one of the following values:
- photo
- media
- text
Photo
For creating a photo type pin one of the following have to sent
- image (file, required if no image_url is sent)
or
- image_url (url, required if no image file is sent)
Media
For creating a media type pin.
- display[content] (url) - Media url. Following media providers are supported:
- Youtube
- Vimeo
- Soundcloud
Text
For creating a text type pin
- display[content] (text) - The text for the pin
Example Response
{
"success" : true,
"id" : "1000",
"new_project" : "",
"errors" :
[
]
}