Recruit (applicant worflow



We received this question in our inbox:

Hello,

I’m running into an issue attempting to search on the applicantworkflow endpoint. I checked the forum and there wasn’t any place for endpoint discussions… I’m trying to filter based on a ‘relation’ field and it’s kicking back the following error:

{'errors': [{'errorMessage': 'The following filter is either not valid or hidden: applicantworkflow.job', 'errorCode': 5}]}

I get this error when trying to access:

urlvar = 'https://api.icims.com/customers/' + customerID + '/search/applicantworkflows?searchJson=' + str(filter)

with the filter (v and i are variables… for the first iteration, v=’C22089’ and i=1907):

filter = {
"filters": [
{
"name": "applicantworkflow.status",
"value": [
v
],
"operator": "="
},
{
"name": "applicantworkflow.job",
"value": [
i
],
"operator": "="
}
]
}

This approach works perfectly when I’m only attempting to filter on applicantworkflow.status but when I add in applicantworkflow.job it kicks back the above error. Any suggestions for how to filter the search results by what is essentially job.jobid?

Answer:
It looks like you are missing the proper job variable in your POST. Here are the logs we saw in your platform -
Payload: {
"filters": [
{
"name": "applicantworkflow.status",
"value": [
"C22089"
],
"operator": "="
},
{
"name": "applicantworkflow.job",
"value": [
5034
],
"operator": "="
}
]
}

Without knowing the name of exact workflow status, here is an example of how the payload should be formatted:
{"filters":[{"name":"applicantworkflow.job.id","value":["5034"],"operator":"="},{"name":"applicantworkflow.status","value":["D10103"],"operator":"="}],"operator":"&"}

Thank you,
iCIMS UNIFI Team