Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue adding prospect #459

Open
HiveFiveKaran opened this issue Mar 7, 2022 · 1 comment
Open

Issue adding prospect #459

HiveFiveKaran opened this issue Mar 7, 2022 · 1 comment

Comments

@HiveFiveKaran
Copy link

Hello, I'm trying to add a prospect, based on the documentation provided here: https://developers.greenhouse.io/harvest.html#post-add-prospect and here: https://developers.greenhouse.io/harvest.html#the-application-object

I am able to add the prospect correctly, but the prospect does not get added the the prospect pool as I would have hoped. I have double checked IDs etc to make sure they're ok, but still can't see any obvious issue.

Below is the structure of the JSON request I'm making, with data redacted for security:

{
  "company": "REDACTED",
  "title": null,
  "tags": [
    "REDACTED"
  ],
  "application": {
    "prospect": true,
    "job_ids": [
      REDACTED
    ],
    "source_id": REDACTED,
    "prospect_pool_id": REDACTED,
    "prospect_pool_stage_id": REDACTED
  },
  "first_name": "REDACTED",
  "last_name": "REDACTED",
  "email_addresses": [
    {
      "value": "REDACTED",
      "type": "personal"
    }
  ],
  "social_media_addresses": [
    {
      "value": "linkedin.com/in/REDACTED"
    }
  ]
}

The API Key I use has access to add prospects - as far as I can tell, that should be all I need.

Is this a documentation problem?

As a side note, it would be VERY useful to list the permissions required by a given endpoint in the documentation directly.

@JackieKrkwd
Copy link

JackieKrkwd commented Mar 31, 2022

We are having the same issue. We are trying to add prospects and include them in specific pools/departments/offices. We started with this endpoint https://developers.greenhouse.io/harvest.html#post-add-prospect and realized it will not accept prospect_pool _id, prospective_department_id, or prospective_office_id as parameters. Now we're using this endpoint https://developers.greenhouse.io/harvest.html#post-add-candidate and getting a 422 Unprocessable Entity error message with the following response:

{
    "errors": [
        {
            "message": "Missing required field: job_id",
            "field": "job_id"
        },
        {
            "message": "A job with this id does not exist.",
            "field": "job_id"
        }
    ]
}

We are passing "prospect": "true" as the documentation states. Here is an example of the payload:

{
  "first_name": "Prospect-Test",
  "last_name": "Prospect-Test",
  "is_private": false,
  "phone_numbers": [
    {
      "value": "5555555555",
      "type": "mobile"
    }
  ],
  "email_addresses": [
    {
      "value": "[email protected]",
      "type": "personal"
    }
  ],
  "website_addresses": [
    {
      "value": "https://test.com",
      "type": "personal"
    }
  ],
  "social_media_addresses": [
    {
      "value": "https://linkedin.com/test"
    }
  ],
  "applications": [
      {
        "prospect": "true",
        "prospect_pool_id": 123456,
        "prospective_office_id": 123456,
        "prospective_department_id": 123456,
        "attachments": [
          {
            "filename": "Test.docx",
            "type": "resume",
            "content": "http://test.local/wp-content/uploads/2022/02/Test-13.docx",
            "content_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
          },
          {
            "filename": "Test.docx",
            "type": "cover_letter",
            "content": "http://test.local/wp-content/uploads/2022/02/Test-14.docx",
            "content_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
          }
        ]
      }
  ]
}

Alternatively, if we create the prospect using https://developers.greenhouse.io/harvest.html#post-add-prospect we are able to update the pool/department/office by using the https://developers.greenhouse.io/harvest.html#post-add-application-to-candidate-prospect however it seems like this should not have to be a 2 step process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants