Mark as manuscript referee Webhook

Overview

mark_as_proposal_referee webhook is triggered when a user marks or unmarks a candidate as a referee for a manuscript in Prophy. This webhook allows you to automatically update referee selections in your system, ensuring consistency between Prophy and your platform.

Triggering

This webhook is sent in the following scenarios:

  • When a user marks an author as a referee for a manuscript using the Prophy user interface.
  • When a user unmarks an author as a referee for a manuscript using the Prophy user interface.

Webhook payload

The payload contains info about the list of marked referees after the action is performed.

Field Description
version
integer
Payload version number for tracking changes in the payload structure
manuscript_id
integer
Manuscript ID in the Prophy database
origin_id
nullable string
Client-side ID of the manuscript
candidates
array of objects
List of marked candidates
authors_groups_settings
nullable object
Authors Groups settings according to the folder's Referee Finder settings
candidates
Field Description
name
string
Author's full name
first_name
string
Author's first name
last_name
string
Author's last name
middle_name
nullable string
Author's middle name
suffix
nullable string
Name suffix like jr, sr
author_id
integer
Author's ID in the Prophy database
email
nullable string
Author's email
orcid
nullable string
Author's ORCID
affiliation
nullable string
Author's most recent affiliation
articlesCount
integer
Number of articles published by the author
citationsCount
integer
Number of citations for the author's articles
hIndex
integer
Author's h-index
score
float
Relevance score for this candidate (higher is more relevant). Since the candidate's score may change depending on the filters, here will be the score when the candidate was marked for the first time.
url
string
URL to the author's profile in Prophy
authors_groups
array of objects
List of Authors Groups that contain this author, according to folder's Referee Finder settings
marked
boolean
Indicates if the candidate is marked as a referee. Always true because webhook returns only marked candidates.
marked_by
string
Email of a user who marked the candidate
candidates.authors_groups

This field indicates the Authors Groups the candidate belongs to, according to the folder's Referee Finder settings. If the settings do not specify Authors Groups, the field will contain an empty list.

Field Description
group_id
integer
Authors Group ID in the Prophy database
client_id
nullable string
Client-side author ID inside the Authors Group
authors_groups_settings

If the folder's Referee Finder settings specify the Authors Groups, then this field will indicate the Authors Groups and their effect on the search results.

Field Description
authors_groups
array of objects
A list of Authors Groups for the candidates
effect
string
highlight to indicate that the authors belong to the Authors Group. limit_to to search candidates only in Authors Groups.
authors_groups_settings.authors_groups
Field Description
id
integer
Authors Group ID in the Prophy database
name
string
Authors Group name
label
nullable string
Authors Group label

Example webhook

Here's an example of a complete webhook body when a user marks a candidate as a referee:

{
  "action": "mark_as_proposal_referee",
  "timestamp": 1665565152,
  "order": 186,
  "api_key": "test000",
  "payload": {
    "version": 4,
    "manuscript_id": 1,
    "origin_id": "pr-0156",
    "authors_groups_settings": {
      "authors_groups": [
        {
          "id": 35,
          "label": "winter-experts",
          "name": "2023-winter-experts"
        },
        {
          "id": 55,
          "label": "summer-experts",
          "name": "2023-summer-experts"
        }
      ],
      "effect": "highlight"
    },
    "candidates": [
      {
        "url": "https://www.prophy.ai/author/1/martin-dotson",
        "author_id": 1,
        "name": "Martin von Dotson",
        "first_name": "Martin",
        "middle_name": null,
        "last_name": "von Dotson",
        "suffix": null,
        "email": "[email protected]",
        "orcid": "0000-0000-0000-0001",
        "hIndex": 85,
        "articlesCount": 329,
        "citationsCount": 22858,
        "score": 4.95,
        "marked": true,
        "affiliation": "University of Lisbon, Lisbon, Portugal",
        "authors_groups": [
          {
            "client_id": "EX001",
            "group_id": 35
          },
          {
            "client_id": "EX001",
            "group_id": 55
          }
        ],
        "marked_by": "[email protected]"
      },
      {
        "url": "https://www.prophy.ai/author/2/mea-walton",
        "author_id": 2,
        "name": "Mea Cynthia Walton",
        "first_name": "Mea",
        "middle_name": "Cynhtia",
        "last_name": "Walton",
        "suffix": null,
        "email": "[email protected]",
        "orcid": "0000-0000-0000-0002",
        "hIndex": 69,
        "articlesCount": 258,
        "citationsCount": 13608,
        "score": 3.86,
        "marked": true,
        "affiliation": "National Institute for Nuclear Physics, Rome, Italy",
        "authors_groups": [
          {
            "client_id": "EX002",
            "group_id": 35
          }
        ],
        "marked_by": "[email protected]"
      },
      {
        "url": "https://www.prophy.ai/author/3/cristiano-fuentes",
        "author_id": 3,
        "name": "Cristiano Fuentes Jr.",
        "first_name": "Cristiano",
        "middle_name": null,
        "last_name": "Fuentes",
        "suffix": "Jr.",
        "email": "[email protected]",
        "orcid": "0000-0000-0000-0003",
        "hIndex": 77,
        "articlesCount": 227,
        "citationsCount": 19614,
        "score": 0.67,
        "marked": true,
        "affiliation": "National Research Council, Rome, Italy",
        "authors_groups": [
          {
            "client_id": "EX003",
            "group_id": 35
          }
        ],
        "marked_by": "[email protected]"
      }
    ]
  }
}

Test the Webhook

Run the following curl request to verify that your webhook endpoint is accepting the data that the Prophy will send. Replace <webhook-url> with the URL you want to send webhook to.

  curl -X POST <webhook-url> \
  -H "Content-Type: application/json" \
  -d '{
    "test": true,
    "action": "mark_as_proposal_referee",
    "timestamp": 1665565152,
    "order": 186,
    "api_key": "test000",
    "payload": {
        "version": 4,
        "manuscript_id": 1,
        "origin_id": "pr-0156",
        "authors_groups_settings": {
            "authors_groups": [
                {
                    "id": 35,
                    "label": "winter-experts",
                    "name": "2023-winter-experts"
                },
                {
                    "id": 55,
                    "label": "summer-experts",
                    "name": "2023-summer-experts"
                }
            ],
            "effect": "highlight"
        },
        "candidates": [
            {
                "url": "https://www.prophy.ai/author/1/martin-dotson",
                "author_id": 1,
                "name": "Martin von Dotson",
                "first_name": "Martin",
                "middle_name": null,
                "last_name": "von Dotson",
                "suffix": null,
                "email": "[email protected]",
                "orcid": "0000-0000-0000-0001",
                "hIndex": 85,
                "articlesCount": 329,
                "citationsCount": 22858,
                "score": 4.95,
                "marked": true,
                "affiliation": "University of Lisbon, Lisbon, Portugal",
                "authors_groups": [
                    {
                        "client_id": "EX001",
                        "group_id": 35
                    },
                    {
                        "client_id": "EX001",
                        "group_id": 55
                    }
                ],
                "marked_by": "[email protected]"
            },
            {
                "url": "https://www.prophy.ai/author/2/mea-walton",
                "author_id": 2,
                "name": "Mea Cynthia Walton",
                "first_name": "Mea",
                "middle_name": "Cynhtia",
                "last_name": "Walton",
                "suffix": null,
                "email": "[email protected]",
                "orcid": "0000-0000-0000-0002",
                "hIndex": 69,
                "articlesCount": 258,
                "citationsCount": 13608,
                "score": 3.86,
                "marked": true,
                "affiliation": "National Institute for Nuclear Physics, Rome, Italy",
                "authors_groups": [
                    {
                        "client_id": "EX002",
                        "group_id": 35
                    }
                ],
                "marked_by": "[email protected]"
            },
            {
                "url": "https://www.prophy.ai/author/3/cristiano-fuentes",
                "author_id": 3,
                "name": "Cristiano Fuentes Jr.",
                "first_name": "Cristiano",
                "middle_name": null,
                "last_name": "Fuentes",
                "suffix": "Jr.",
                "email": "[email protected]",
                "orcid": "0000-0000-0000-0003",
                "hIndex": 77,
                "articlesCount": 227,
                "citationsCount": 19614,
                "score": 0.67,
                "marked": true,
                "affiliation": "National Research Council, Rome, Italy",
                "authors_groups": [
                    {
                        "client_id": "EX003",
                        "group_id": 35
                    }
                ],
                "marked_by": "[email protected]"
            }
        ]
    }
}'