# Mining a Batch of Job Posts

See Mining a Job Post for more information on the mining process.

This endpoint is to be used when there is a batch of job posts to mine (we suggest 1000+) or when integrating with a new employer/ATS. Using this endpoint allows UBIO to have improved performance and reliability as job post batches are isolated from the usual queue and can be monitored and paused if the employer website encounters issues from the increased load. We recommend using the same employer/ATS in each batch.

This process requires sending an HTTPS request to the UBIO API with a list of job posts in a CSV format.

Once a batch has been submitted, the status if the batch can be checked using the Get Batch Status endpoint.


# API Endpoint

To submit a batch of job posts for mining, use the following API endpoint:

POST /v1/recruitment/job-posts/batch/mine/

# Batch Data Structures

There are a number of different ways to provide the batch of job posts to the API, depending on the Content-Type of the request. CSV files are currently supported, provided the columns match the required properties of the schema defined in the Mining a Job Post endpoint.

  1. application/json

    We recommend including a link to a static hosted file in your request. This allows processing of batches of up to 70,000 job posts.

    { "fileUrl": "https://example.com/job-posts.csv" }
    
  2. text/csv

    The request body should include CSV data, including column headers as per the schema defined for the Mining a Job Post endpoint. This allows processing of batches up to 30,000 job posts.

    jobPostId,url,employer,jobTitle
    example123,https://careers.employer.com/jobs/EXAMPLE,Company ABC,Software Engineer
    
  3. application/octet-stream

    The body should be a binary file (CSV) containing a list of job posts as per the above criteria, each with the same structure as the Mining a Job Post endpoint.

# Headers

Name Type Required Description
Authorization string See Authentication
Content-Type string Media type of the request. See above for supported options.

# Code Samples

POST /v1/recruitment/job-posts/mine/batch

When using the application/json content type, the request body should include a link to a static hosted file.

curl -X POST 'https://services.automation.cloud/v1/recruitment/job-posts/mine/batch' \
    -H 'Authorization: Basic <credentials>' \
    -H 'Content-Type: application/json' \
    -L \
    -d '{
  "fileUrl": "https://example.com/job-posts.csv"
}'

When using the text/csv content type, the request body should include CSV data, including column headers as per the schema defined for the Mining a Job Post endpoint.

curl -X POST 'https://services.automation.cloud/v1/recruitment/job-posts/mine/batch' \
    -H 'Authorization: Basic <credentials>' \
    -H 'Content-Type: text/csv' \
    -L \
    -d 'jobPostId,url,employer,jobTitle
    example123,https://careers.employer.com/jobs/EXAMPLE,Company ABC,Software Engineer'

# Success Responses

If the request is successful, the API returns a 200 OK status with a response like this:

{
	"batchId": "98378fc8-ab58-4912-b55a-aa70296e7a6a",
	"jobsCount": 10000
}

☝️ The batchId and jobsCount of the related batch are confirmed in the response.

The batchId can be used to check the status of the batch using the Get Batch Status endpoint.

# Error Handling

  • 401 Unauthorized – Invalid or missing API key.
  • 400 Bad Request – Invalid request body, please ensure job post data has the required properties in the required structure for the Content-Type of the request.
  • 500 Internal Server Error – UBIO system error, try again later.