Before you start working with the Byner REST API make sure you first:
- enable the Byner REST API (opening this link is only possible as Byner administrators)
Introduction
The Byner REST API has two purposes. Depending on your scenario, as explained in this article about website integration scenarios, you will use one or more of the below methods:
- Scenario 1 and 2
- Retrieve published job information
- Only for scenario 2
- Creating a Contact (Professional) and an (open) application
Please do not hard-code any URL's or parameters as they are subject to change and most likely will differ if different environments are in use like PRODUCTION and TEST. It is recommended that these urls and parameters can be adjusted easily.
The Byner Administrator can provide you with a standard yaml file that can be loaded into a tool of your choice to test / build the integration, such as inspector.swagger.io or Postman. There is no support for tooling.
Authentication
Starting januari 2025, Byner supports authentication via an api key via a url parameter, instead of the previously used OAUTH2 protocol.
Byner is an app that runs on the Salesforce platform. To securely request data, an api key is required to use the Byner REST API. A Byner Administrator can provide you with an example URL to access the JSON feed.
The example URL can be retrieved (including the api key) as a Byner Administrator via Byner Setup > Feature configuration > Applicant tracking > Byner Website REST Api documentation > View output
This will result in a URL that is built up like the following example, where the apiKey parameter is key in all the requests you will do.
Example URL: https://yoursitename.my.salesforce-sites.com/services/apexrest/byner/BYNER_WEBSITE_REST_API/v2/getJobs?internal_channel=Company+website&start=0&apiKey=abcdefg
Retrieve jobs via the Byner REST API
Endpoint
GET /services/apexrest/byner/BYNER_WEBSITE_REST_API/v2/getJobs
Description
Retrieves all jobs based on specified query parameters. Jobs are returned only if they have a Status ‘Open’ and if the request is done within the publication start- and end date. Jobs should be stored on the website and taken offline if the webservice response does not contain the vacancy anymore.
Parameters
Parameter | Required | Description | Example |
internal_channel | yes | Required name of the internal channel the job is posted to | Company+website |
apiKey | yes | Required unique environment-specific apiKey | abcdefg |
start | no | Optional offset for pagination purposes | 100 |
Example
https://yoursitename.my.salesforce-sites.com/services/apexrest/byner/BYNER_WEBSITE_REST_API/v2/getJobs?internal_channel=Company+website&start=0&apiKey=abcdefg
Above example returns all open (currently published) jobs for job post channel 'Company website' using api key 'abcdefg'.
Response
The result of the GET request will be a response in json format. The format is predefined, but please know that a Byner Administrator can help you with setting up possible custom fields if needed.
Create Contacts (Professionals) and (open) applications
Endpoint
POST /services/apexrest/byner/BYNER_WEBSITE_REST_API/v1/postCandidate
Description
Contacts (Professionals), (open) applications and files related to the application can be created via this method.
Parameters
Parameter | Required | Description | Example |
apiKey | yes | Required unique environment-specific apiKey | abcdefg |
Example
https://yoursitename.my.salesforce-sites.com/services/apexrest/byner/BYNER_WEBSITE_REST_API/v1/postCandidate?apiKey=abcdefg
Above example creates or updates a contact based on the request body and creates a candidate in workflow record based on the request body.
Request body
The format of the body of the POST request is predefined, but please know that your Byner Administrator can help you with setting up possible custom fields if needed. We have included some examples below.
Example 1.1: Request body to create a Professional and an Open Application
{ "jobId": "", "data": { "byner__Candidate_in_workflow__c": { "byner__UTM_Campaign__c": "Campaign1", "byner__UTM_Content__c": "Content1", "byner__UTM_Medium__c": "Medium1", "byner__UTM_Source__c": "Source1", "byner__UTM_Term__c": "Term1" }, "Contact": { "LastName": "Boom", "FirstName": "Michael", "Email": "michael@example.com", "MobilePhone": "+31612345678", "Phone": "+31101234567" } } }
Example 1.2: Request body to create a Professional and an Application for a specified Job
{ "jobId": "a158d000000ENbCAAW", "data": { "byner__Candidate_in_workflow__c": { "byner__UTM_Campaign__c": "Campaign1", "byner__UTM_Content__c": "Content1", "byner__UTM_Medium__c": "Medium1", "byner__UTM_Source__c": "Source1", "byner__UTM_Term__c": "Term1" }, "Contact": { "LastName": "Boom", "FirstName": "Michael", "Email": "michael@example.com", "MobilePhone": "+31612345678", "Phone": "+31101234567" } } }
Example 1.3: Request body to create a Professional and an Application for a specified Job with two custom fields
{ "jobId": "a158d000000ENbCAAW", "data": { "byner__Candidate_in_workflow__c": { "byner__UTM_Campaign__c": "Campaign1", "byner__UTM_Content__c": "Content1", "byner__UTM_Medium__c": "Medium1", "byner__UTM_Source__c": "Source1", "byner__UTM_Term__c": "Term1", "custom_field1__c": "x" }, "Contact": { "LastName": "Boom", "FirstName": "Michael", "Email": "michael@example.com", "MobilePhone": "+31612345678", "Phone": "+31101234567", "custom_field2__c": "y" } } }
Response
The result of the POST request will be a response in json format.
Example response for requests 1.1, 1.2, 1.3
{ "sessionId": "aabbccddeeffgg", "candidateInWorkflowId": "a108d000000569sAAA", "contactId": "0038d000005ExIWAA0" }
Upload a document
Endpoint
POST /services/apexrest/byner/BYNER_WEBSITE_REST_API/v1/uploadDocument
Description
This method can be used to add documents to the (open) application you've created with the previous request.
Parameters
Parameter | Required | Description | Example |
apiKey | yes | Required unique environment-specific apiKey | abcdefg |
Headers
In this request the following headers are required to add.
- SessionId: use the sessionId retrieved in the response of the request above
- DocumentName: the name of the document
- DocumentType: CV, Letter, Diploma, Photo, Portfolio or possibly a custom DocumentType
- Content-Type: application/octet-stream
Example
https://yoursitename.my.salesforce-sites.com/services/apexrest/byner/BYNER_WEBSITE_REST_API/v1/uploadDocument?apiKey=abcdefg
Above example uploads a document based on the request body to the candidate in workflow as specified via the SessionId header.
Request body
The body of the request should be the document you want to add.
Comments
0 comments
Please sign in to leave a comment.