Lists the application form templates available to your team, so you can reference a template when creating a job.
Results include every template owned by your team or, if your team has a parent team, that parent team — regardless of who created the template. The API does not currently restrict results further by creator or by template-sharing settings: any caller authenticated for a team sees the full set of templates owned by that team and its parent team.
By default every matching template is returned in one response. To read them in pages instead, send limit and offset.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Here is the documentation to use this endpoint as library.
Examples
Each example lists the application form templates for one team. Replace 123456 with one of your team ids. Use a template's id when you create a job.
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.
Listing every template
Without limit or offset, every template your team can use comes back in one response. Most teams have few enough templates for this to be the simplest option.
# 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>"
curl -G https://partners.apploi.com/application-form-templates \
-H "X-Api-Key: $APPLOI_API_KEY" \
--data-urlencode "team_id=123456"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"]
response = requests.get(
"https://partners.apploi.com/application-form-templates",
headers={"X-Api-Key": API_KEY},
params={"team_id": 123456},
timeout=60,
)
response.raise_for_status()
for template in response.json()["data"]:
print(template["id"], template["name"], template["templateGroup"])// 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 params = new URLSearchParams({ team_id: "123456" });
const response = await fetch(`https://partners.apploi.com/application-form-templates?${params}`, {
headers: { "X-Api-Key": API_KEY },
});
if (!response.ok) {
throw new Error(`Request failed with status ${response.status}`);
}
const body = await response.json();
for (const template of body.data) {
console.log(template.id, template.name, template.templateGroup);
}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")
uri = URI("https://partners.apploi.com/application-form-templates")
uri.query = URI.encode_www_form(team_id: 123456)
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: 60) do |http|
http.request(request)
end
raise "Request failed with status #{response.code}" unless response.is_a?(Net::HTTPSuccess)
JSON.parse(response.body)["data"].each do |template|
puts [template["id"], template["name"], template["templateGroup"]].join(" ")
endTrimmed to a few fields, the response looks like this:
{
"data": [
{
"id": 12345,
"name": "Standard CNA Application",
"published": true,
"templateGroup": "First Stage",
"team_id": 456
}
]
}Results include templates owned by your team's parent team, so a template's team_id can differ from the team_id you sent.
Paging through templates
To keep each response small, send limit and offset. Templates are then ordered by id, and the response also returns the limit and offset that were applied. Add limit to offset on each request, and stop when a page holds fewer templates than limit.
limit must be between 1 and 2200, and offset must be between 0 and 2147483647. Any other value returns 400.
# 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>"
# Page 1
curl -G https://partners.apploi.com/application-form-templates \
-H "X-Api-Key: $APPLOI_API_KEY" \
--data-urlencode "team_id=123456" \
--data-urlencode "limit=50" \
--data-urlencode "offset=0"
# Page 2: offset increases by limit
curl -G https://partners.apploi.com/application-form-templates \
-H "X-Api-Key: $APPLOI_API_KEY" \
--data-urlencode "team_id=123456" \
--data-urlencode "limit=50" \
--data-urlencode "offset=50"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 fetch_all_templates(team_id, page_size=50):
templates = []
offset = 0
while True:
response = requests.get(
"https://partners.apploi.com/application-form-templates",
headers={"X-Api-Key": API_KEY},
params={"team_id": team_id, "limit": page_size, "offset": offset},
timeout=60,
)
response.raise_for_status()
page = response.json()
templates.extend(page["data"])
if len(page["data"]) < page["limit"]:
return templates
offset += page["limit"]
templates = fetch_all_templates(123456)// 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 fetchAllTemplates(teamId: string, pageSize = 50): Promise<any[]> {
const templates: any[] = [];
let offset = 0;
while (true) {
const params = new URLSearchParams({
team_id: teamId,
limit: String(pageSize),
offset: String(offset),
});
const response = await fetch(`https://partners.apploi.com/application-form-templates?${params}`, {
headers: { "X-Api-Key": API_KEY },
});
if (!response.ok) {
throw new Error(`Request failed with status ${response.status}`);
}
const page = await response.json();
templates.push(...page.data);
if (page.data.length < page.limit) {
return templates;
}
offset += page.limit;
}
}
const templates = await fetchAllTemplates("123456");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 fetch_all_templates(team_id, page_size = 50)
templates = []
offset = 0
loop do
uri = URI("https://partners.apploi.com/application-form-templates")
uri.query = URI.encode_www_form(team_id: team_id, limit: page_size, offset: offset)
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: 60) do |http|
http.request(request)
end
raise "Request failed with status #{response.code}" unless response.is_a?(Net::HTTPSuccess)
page = JSON.parse(response.body)
templates.concat(page["data"])
return templates if page["data"].length < page["limit"]
offset += page["limit"]
end
end
templates = fetch_all_templates(123456)A page looks like this:
{
"data": [
{
"id": 12345,
"name": "Standard CNA Application",
"published": true,
"templateGroup": "First Stage",
"team_id": 456
}
],
"offset": 0,
"limit": 50
}A new template has a higher id than every existing one, so it shows up on the last page. A template deleted or archived while you page moves the ones after it up one place, so one template can be skipped. If that matters, read the list again, or read it in one request without limit.
400400 response
403Invalid Token

