Skip to main content
SmartRecruiters

Problem solving examples - Application API FAQ

 

Q: Certain question types have validations. Based on our investigations, it appears that text, text area, currency questions accept any characters, and allow a maximum of 4000 characters. Are there any other validations that we should be aware of?

In general, each answer must not exceed 4000 characters. 

 

Q: There is also another limitation on the number of records used in repeatable answers like languages or work shifts. there can be up to 100 records. If it's unclear what record is please take a look at examples for Languages and Work Shifts at GET/candidates/{id}/jobs/{jobId}/screening-answers

Currency is in fact regular text field in the backend - for backward compatibility with previously entered data. But please use numerical validation if you can. So for newly entered data we use numerical validation but on UI only. We plan to fix it by creating a numerical question type somewhere in the future.

 

Q: There is an "additional attachments" type question, however, when added to the currently active question set, it does not appear in the list of fetched using application API. Should we ignore this?

Please ignore on questions form. At the moment it's only a kind of flag and attachments are uploaded elsewhere but still controlled by this question "flag". It's backward compatibility but we had plans to make it fully operational file upload question somewhere in future.

 

Q: We're unable to submit a few applications due to email validation errors. Can you help us understand how emails are validated by SmartRecruiters?
We use this regexp (Java) for email validation:

String EMAIL = "^[a-zA-Z0-9#._%'+-]+@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,63}$";

We are aware that it doesn't cover email specifications.

 

Q: For work experience description, there is a cap of 4000 characters. In some cases, we noticed that the validation occurs on the number of bytes instead of characters. Can you please confirm if the validation is based on characters or bytes?

It's 4000 bytes.

 

Q: When using Application API, does the candidate need a SmartRecruiters Candidate Portal account? Does he have a way to see and follow its applications on SmartRecruiters?

No, the Candidate Portal account will be created once the candidate pushed to the customer’s Smartrecruiters account using Application API [https://dev.smartrecruiters.com/marketplace-api/live-docs/application-api/#!/Application_API/createCandidate]

The candidate applying for a job will receive an email that their application is being reviewed. Using the link in the email, they can create the account and follow the application.

NOTICE, to create the candidate using Application API some data fields are mandatory:

"firstName": "string",

  "lastName": "string",

  "email": "string",

  "phoneNumber": "12345678",

sourceDetails": {

    "sourceTypeId": "DIRECT_SOURCING",

    "sourceSubTypeId": "DIRECT_SOURCING",

    "sourceId": "string" //JOBPAL

  },

 

Q: I am sending in a value for the answer, however, the API error that comes back says: Cannot find field definition for field: value for answer:

F8e18196-9522-4460-955d-2cf9ad932677

 

"answers": [

{

// Simple question answer

"id": "firstName#21124141",

"records": [

{

"fields": {

"value": ["John"]

}

}

]

},

{

// Simple single select question answer

"id": "custom#51202421",

"records": [

{

"fields": {

"value": ["20194214124"] // option identifier

}

}

]

},

{

// Simple multi select question answer

"id": "custom#51202421"

"records": [

"fields": {

"value": ["20194214124", "429412049124",

"93193012312"] // option identifier

}

]

},

 

I am not sure where the option identifiers come from? They are not available in the response that comes back (especially for radio buttons).
What do they mean?

 

A: 

 

Additional info:

 

In Application API in GET /postings/{uuid}/configuration [Marketplace API] the Customer API token also works.



 

Attachment in Apply API

Attachment can be added in Apply API via the endpoint: POST /postings/{uuid}/candidates

  • Maximum size of this attachment is: 2MB

  • The format of the attachment is: base64 (documents transferred into characters line)

 

Due to above it means that adding attachment via this endpoint is slightly different than by one-click on the job (where another technology is used). This is the reason why via the one-click the candidate can add the larger attachment (presumably up to 10MB) than partner via the Apply API. 

 

Q: How do screening questions work in API?

A:

1. each job has it’s own screening questions (or groups of them, set by the customer), obtain the uuid of a posting you’d like to get the screening questions for using: GET/v1/companies/{companyIdentifier}/postings

 

2. use the uuid of the posting to obtain the screening questions using 

GET /postings/{uuid}/configuration //the correctly made call should return the following:

 

"id": "9254df4f-e2cf-4809-9356-cdb6c255923c",

      "label": "Do checkboxes work?",

      "repeatable": false,

      "fields": [

        {

          "id": "confirm",

          "label": "Do checkboxes work?",

          "type": "CHECKBOX",

          "required": false,

          "complianceType": null,

          "values": [

            {

              "id": "1",

              "label": "Confirmed"

 

Each screening question has its own id and label (name)

 

3. The candidate fills the answers and you can now push them along with their data to the account using POST /postings/{uuid}/candidates

 

NOTICE: the request body form depends on the screening question type: https://dev.smartrecruiters.com/marketplace-api/application-api/post-an-application/

 

Example of checkbox (from above):

 

{

 "firstName": "test",

 "lastName": "testovich",

 "email": "testorovichov@test.com",

 "phoneNumber": "555555555",

 "location": {

   "country": "Poland",

   "countryCode": "PL",

   "region": "EU",

   "regionCode": "EUR",

   "city": "Krakow",

   "lat": 0,

   "lng": 0

 },

 "sourceDetails": {

   "sourceTypeId": "DIRECT_SOURCING",

   "sourceSubTypeId": "DIRECT_SOURCING",

   "sourceId": "JOBPAL"

 },

 "answers": [

     {

     "id": "9254df4f-e2cf-4809-9356-cdb6c255923c",

     "records": [

       {

         "fields": {

           "confirm": [

             "1"

           ]

         }

       }

     ]

 ],

 "messageToHiringManager": "nothing more to say",

 "consent": true

}

 

For the “amount” type of questions:

 

{

    "firstName": "test",

    "lastName": "testovich",

    "email": "testorovichov@test.com",

    "phoneNumber": "555555555",

    "location": {

        "country": "Poland",

        "countryCode": "PL",

        "region": "EU",

        "regionCode": "EUR",

        "city": "Krakow",

        "lat": 0,

        "lng": 0

    },

    "sourceDetails": {

        "sourceTypeId": "DIRECT_SOURCING",

        "sourceSubTypeId": "DIRECT_SOURCING",

        "sourceId": "JOBPAL"

    },

    "answers": [

        {

            "id": "0214e61b-cb34-483d-9020-2f1543692d5d",

            "records": [

                {

                    "fields": {

                        "amount": [

                            "3300"

                        ]

                    }

                }

            ]

        }

    ],

    "messageToHiringManager": "nothing more to say",

    "consent": true

}

 

Make sure the currency is stated in the screening question in the UI, otherwise the sole number will be pushed.