| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Here is the documentation to use this endpoint as library.
Examples
Each example fetches one job by its id. Use the id of a job from a /jobs/search result. Other identifiers, such as reference_number or external_id, are not accepted here.
The examples read your API key from an environment variable named APPLOI_API_KEY. Before running them, set APPLOI_API_KEY in your own environment to the Partner API key you received from Apploi. The examples do not set it for you, and the key should never be written into your code.
The API key on this endpoint
This endpoint does not require an API key. A published job that hasn't been archived is returned to anyone. Send your key anyway. When the key's user is a member of the job's own team (membership of a parent team is not enough), the response also covers:
- Jobs that are unpublished or archived. Without membership of the job's team, these return
403. - The contact details of the person who created the job.
A missing or wrong key is not rejected here. It gets the same response as no key at all, so an unexpected 403 can mean your key is wrong.
Fetching a job from a search result
Search for jobs, then fetch the first result by its id:
# APPLOI_API_KEY must hold the Partner API key you received from Apploi.
# These examples do not set it for you: set it yourself, in your own
# environment, before running them. For example, in your shell:
# export APPLOI_API_KEY="<the API key you received from Apploi>"
# Take the id of the first search result (this line uses jq: https://jqlang.org).
# With no results, jq prints "null", so stop rather than request /jobs/null.
JOB_ID=$(curl -sG https://partners.apploi.com/jobs/search \
-H "X-Api-Key: $APPLOI_API_KEY" \
--data-urlencode "searchbar=nurse" \
--data-urlencode "size=1" \
--data-urlencode "source=your_partner_name" | jq -r '.data[0].id')
[ "$JOB_ID" != "null" ] || { echo "No jobs matched the search" >&2; exit 1; }
curl "https://partners.apploi.com/jobs/$JOB_ID" \
-H "X-Api-Key: $APPLOI_API_KEY"import os
import requests
# APPLOI_API_KEY must hold the Partner API key you received from Apploi.
# These examples do not set it for you: set it yourself, in your own
# environment, before running them. For example, in your shell:
# export APPLOI_API_KEY="<the API key you received from Apploi>"
API_KEY = os.environ["APPLOI_API_KEY"]
search = requests.get(
"https://partners.apploi.com/jobs/search",
headers={"X-Api-Key": API_KEY},
params={"searchbar": "nurse", "size": 1, "source": "your_partner_name"},
timeout=30,
)
search.raise_for_status()
job_id = search.json()["data"][0]["id"]
response = requests.get(
f"https://partners.apploi.com/jobs/{job_id}",
headers={"X-Api-Key": API_KEY},
timeout=30,
)
response.raise_for_status()
job = response.json()["data"]
print(job["id"], job["name"], job["city"], job["state"])// APPLOI_API_KEY must hold the Partner API key you received from Apploi.
// These examples do not set it for you: set it yourself, in your own
// environment, before running them. For example, in your shell:
// export APPLOI_API_KEY="<the API key you received from Apploi>"
if (!process.env.APPLOI_API_KEY) {
throw new Error("Set APPLOI_API_KEY to the Partner API key you received from Apploi");
}
const API_KEY: string = process.env.APPLOI_API_KEY;
const searchParams = new URLSearchParams({
searchbar: "nurse",
size: "1",
source: "your_partner_name",
});
const search = await fetch(`https://partners.apploi.com/jobs/search?${searchParams}`, {
headers: { "X-Api-Key": API_KEY },
});
if (!search.ok) {
throw new Error(`Search failed with status ${search.status}`);
}
const jobId: string = (await search.json()).data[0].id;
const response = await fetch(`https://partners.apploi.com/jobs/${encodeURIComponent(jobId)}`, {
headers: { "X-Api-Key": API_KEY },
});
if (!response.ok) {
throw new Error(`Request failed with status ${response.status}`);
}
const job = (await response.json()).data;
console.log(job.id, job.name, job.city, job.state);require "json"
require "net/http"
require "uri"
# APPLOI_API_KEY must hold the Partner API key you received from Apploi.
# These examples do not set it for you: set it yourself, in your own
# environment, before running them. For example, in your shell:
# export APPLOI_API_KEY="<the API key you received from Apploi>"
API_KEY = ENV.fetch("APPLOI_API_KEY")
def get_json(uri)
request = Net::HTTP::Get.new(uri)
request["X-Api-Key"] = API_KEY
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true, read_timeout: 30) do |http|
http.request(request)
end
raise "Request failed with status #{response.code}" unless response.is_a?(Net::HTTPSuccess)
JSON.parse(response.body)
end
search_uri = URI("https://partners.apploi.com/jobs/search")
search_uri.query = URI.encode_www_form(searchbar: "nurse", size: 1, source: "your_partner_name")
job_id = get_json(search_uri)["data"][0]["id"]
job = get_json(URI("https://partners.apploi.com/jobs/#{job_id}"))["data"]
puts [job["id"], job["name"], job["city"], job["state"]].join(" ")The job is in data. Its id is a string, as in search results, and description is HTML. Trimmed to a few fields, the response looks like this:
{
"data": {
"id": "468003",
"name": "Registered Nurse",
"team_id": 123456,
"city": "Queens",
"state": "NY",
"zipcode": "11369",
"published": true,
"archived": false,
"description": "<p>Join our nursing team...</p>"
}
}When the job isn't returned
A job that can't be returned comes back as one of two errors, each with a developer_message:
404when no job has that id, including a job that has been removed. Send the id exactly as/jobs/searchreturns it: any other value is not a job id.403when the job is unpublished or archived and your API key's user is not a member of the job's team (see "The API key on this endpoint" above).
{
"developer_message": "Object Not Found",
"extra": null
}A job that has been unpublished or archived returns 403, not 404, unless your key's user is a member of its team. Treat both as "this job is no longer available to apply to". The examples below return nothing for a 404 and stop with an error for a 403:
# APPLOI_API_KEY must hold the Partner API key you received from Apploi.
# These examples do not set it for you: set it yourself, in your own
# environment, before running them. For example, in your shell:
# export APPLOI_API_KEY="<the API key you received from Apploi>"
# -i prints the status line, so a 404 or 403 is easy to spot
curl -i https://partners.apploi.com/jobs/999999999 \
-H "X-Api-Key: $APPLOI_API_KEY"
# HTTP/2 404
# ...
# {"developer_message":"Object Not Found","extra":null}import os
import requests
# APPLOI_API_KEY must hold the Partner API key you received from Apploi.
# These examples do not set it for you: set it yourself, in your own
# environment, before running them. For example, in your shell:
# export APPLOI_API_KEY="<the API key you received from Apploi>"
API_KEY = os.environ["APPLOI_API_KEY"]
def get_job(job_id):
response = requests.get(
f"https://partners.apploi.com/jobs/{job_id}",
headers={"X-Api-Key": API_KEY},
timeout=30,
)
if response.status_code == 404:
return None # no job has this id
if response.status_code == 403:
raise PermissionError(
f"Job {job_id} is unpublished or archived, and this API key's user is not on its team"
)
response.raise_for_status()
return response.json()["data"]
job = get_job("999999999") # None// APPLOI_API_KEY must hold the Partner API key you received from Apploi.
// These examples do not set it for you: set it yourself, in your own
// environment, before running them. For example, in your shell:
// export APPLOI_API_KEY="<the API key you received from Apploi>"
if (!process.env.APPLOI_API_KEY) {
throw new Error("Set APPLOI_API_KEY to the Partner API key you received from Apploi");
}
const API_KEY: string = process.env.APPLOI_API_KEY;
async function getJob(jobId: string): Promise<any | null> {
const response = await fetch(`https://partners.apploi.com/jobs/${encodeURIComponent(jobId)}`, {
headers: { "X-Api-Key": API_KEY },
});
if (response.status === 404) {
return null; // no job has this id
}
if (response.status === 403) {
throw new Error(
`Job ${jobId} is unpublished or archived, and this API key's user is not on its team`,
);
}
if (!response.ok) {
throw new Error(`Request failed with status ${response.status}`);
}
return (await response.json()).data;
}
const job = await getJob("999999999"); // nullrequire "json"
require "net/http"
require "uri"
# APPLOI_API_KEY must hold the Partner API key you received from Apploi.
# These examples do not set it for you: set it yourself, in your own
# environment, before running them. For example, in your shell:
# export APPLOI_API_KEY="<the API key you received from Apploi>"
API_KEY = ENV.fetch("APPLOI_API_KEY")
def get_job(job_id)
uri = URI("https://partners.apploi.com/jobs/#{URI.encode_www_form_component(job_id)}")
request = Net::HTTP::Get.new(uri)
request["X-Api-Key"] = API_KEY
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true, read_timeout: 30) do |http|
http.request(request)
end
return nil if response.code == "404" # no job has this id
if response.code == "403"
raise "Job #{job_id} is unpublished or archived, and this API key's user is not on its team"
end
raise "Request failed with status #{response.code}" unless response.is_a?(Net::HTTPSuccess)
JSON.parse(response.body)["data"]
end
job = get_job("999999999") # nil
