No longer required since Oct-2017. Now ORCID can be added directly under the
Authorssection of the metadata on the deposit web interface.
In order to access the API you need to create a personal token. To do that you need to:
- Go to
Home > Account > Applicationsand + New token in thePersonal access tokenssection. - Provide a name for the
tokento find it later - Add Scopes
deposit:actionsanddesposit:write - Click Create
- Write down carefully the token which could not be retrieve later! (only the
Scopesand theNamecan be edited) - Click the Save to save you token.
Go to your Upload section to have access to the list of your depositions id, or you can make a GET request directly on:
curl 'https://zenodo.org/api/deposit/depositions?access_token=<YOUR_PERSONAL_TOKEN>' > depositions.jsonIf you don't have created the depositions.json before you can get the metadata information with the following line:
curl 'https://zenodo.org/api/deposit/depositions/<YOUR_DEPOSITION_ID>?access_token=<YOUR_PERSONAL_TOKEN>' > deposition.jsonThen remove all the tags except metadata object in the deposition you want to edit.
In the metadata object you should have a creators object with name and affiliation. You could the add orcid to the different creators, then your deposition.json file should looks like:
{
"metadata": {
...
"creators": [
{
"name": "Last, First Mid.",
"affiliation": "Laboratory 1",
"orcid": "<ADD_YOUR_ORCID_HERE>"
},
{
"name": "Last2, First2 Mid2.",
"affiliation": "Laboratory 2"
}
],
...
}
}The trick now is to put the deposit record into edit mode BEFORE sending the new metadata, send publish it.
curl -X POST 'https://zenodo.org/api/deposit/depositions/<YOUR_DEPOSITION_ID>/actions/edit?access_token=<YOUR_PERSONAL_TOKEN>'
curl -X PUT 'https://zenodo.org/api/deposit/depositions/<YOUR_DEPOSITION_ID>?access_token=<YOUR_PERSONAL_TOKEN>' -H "Content-Type: application/json" -d @deposition.json
curl -X POST 'https://zenodo.org/api/deposit/depositions/<YOUR_DEPOSITION_ID>/actions/publish?access_token=<YOUR_PERSONAL_TOKEN>'And you should know see your badge in: https://zenodo.org/record/<YOUR_DEPOSITION_ID>.