Adding an author to a submission created through the REST API

Describe the issue or problem
Hi everyone,

We’re hoping to create a script that will help us import backlogs of existing articles from outside OJS into the system through the API. However, while scouting through the documentation, we could not identify a way to give add authors to a submission through the API. Are we overlooking anything?

What application are you using?
OJS 3.3, but if this was added in 3.4, be sure to let us know.

Additional information
Link to the documentation.

I don’t know if bumping is allowed, but I was wondering if there is truly nobody out there who knows the answer to this? Or who can confirm that this option does not exist?

Hi @KayWP,

You can POST to http://.../index.php/[journal path]/api/v1/submissions/[submission ID]/publications/[publication ID]/contributors where…

  • [journal path] is the path slug for your journal (get it from the URL)
  • [submission ID] is the article / submission ID (submission_id column in submissions table)
  • [publication ID] is the publication ID (generally you’ll want currentPublicationId in the submission GET response / current_publication_id in the submission table, unless you are dealing with multiple versions of a submission)

You can POST data like this:

{
	"givenName[en]": "given name in English",
	"familyName[en]": "family name in English",
	"preferredPublicName[en]": "preferred public name in English",
	"email": "someone@mailinator.com",
	"country": "AU",
	"url": "http://mywebsite.com",
	"orcid": "https://orcid.org/xxxxx",
	"biography[en]": "biography text in English",
	"affiliation[en]": "affiliation text in English",
	"userGroupId": "14",
	"includeInBrowse": "true"
}

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you Alec! We’ll give it a shot.

This topic was automatically closed after 6 days. New replies are no longer allowed.