Create a Reference

Once you’ve created a project, creating a reference is just a matter of building a citeproc JSON object, and posting it as JSON to /projects/PROJECT_ID/references. More information about the citeproc schema can be found in the CSL specification site

Example

  curl 'https://api.refme.com/api/user/projects/1237769/references' 
  -X POST 
  -H 'Authorization: Bearer ec4a4982d500feabd0629c4d71355f003b16b5a5c4d446974bdfxxxxxxx' 
  -H 'Content-Type: application/json' 
  -H 'Accept: application/vnd.refme-v1+json' 
  -d '{
      "author": [
        {
          "family": "Inc",
          "given": "Encyclopaedia Britannica",
          "parse-names": true
        }
      ],
      "publisher": "Sourcebooks",
      "title": "Encyclopaedia Britannica Almanac 2006  (Encyclopaedia Britannica Almanac)",
      "issued": {
        "year": 2005,
        "month": 11,
        "day": 19,
        "circa": false
      },
      "type": "book",
      "ISBN": "9781402206047"
    }'

Response

  {
    "data": {
        "ISBN": "9781402206047",
        "author": [
            {
                "family": "Inc",
                "given": "Encyclopaedia Britannica",
                "parse-names": true
            }
        ],
        "issued": {
            "circa": false,
            "day": 19,
            "month": 11,
            "year": 2005
        },
        "publisher": "Sourcebooks",
        "title": "Encyclopaedia Britannica Almanac 2006  (Encyclopaedia Britannica Almanac)",
        "type": "book"
    },
    "links": [
        {
            "href": "/api/user/references/REFERENCE_ID",
            "rel": "self"
        }
    ],
    "metadata": {
        "created_at": CREATED_AT,
        "id": REFERENCE_ID,
        "type": "reference",
        "updated_at": UPDATED_AT
    }
}

All done! Very very soon, you will be able to export those references as HTML, BibTex, Mendeley, etc through this API, to display them to your users.

To take a look at what else is possible with the API, head over here.