Apply athletes to job
curl --request POST \
--url http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"job_id": 1038,
"athlete_ids": [
132,
1181
],
"sign_agreement_upfront": true,
"agreement_signed_name": "Univ mm",
"athlete_{id}": [],
"will_disclose": "Y",
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."
}
'import requests
url = "http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job"
payload = {
"job_id": 1038,
"athlete_ids": [132, 1181],
"sign_agreement_upfront": True,
"agreement_signed_name": "Univ mm",
"athlete_{id}": [],
"will_disclose": "Y",
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
job_id: 1038,
athlete_ids: [132, 1181],
sign_agreement_upfront: true,
agreement_signed_name: 'Univ mm',
'athlete_{id}': [],
will_disclose: 'Y',
image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...'
})
};
fetch('http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'job_id' => 1038,
'athlete_ids' => [
132,
1181
],
'sign_agreement_upfront' => true,
'agreement_signed_name' => 'Univ mm',
'athlete_{id}' => [
],
'will_disclose' => 'Y',
'image' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job"
payload := strings.NewReader("{\n \"job_id\": 1038,\n \"athlete_ids\": [\n 132,\n 1181\n ],\n \"sign_agreement_upfront\": true,\n \"agreement_signed_name\": \"Univ mm\",\n \"athlete_{id}\": [],\n \"will_disclose\": \"Y\",\n \"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"job_id\": 1038,\n \"athlete_ids\": [\n 132,\n 1181\n ],\n \"sign_agreement_upfront\": true,\n \"agreement_signed_name\": \"Univ mm\",\n \"athlete_{id}\": [],\n \"will_disclose\": \"Y\",\n \"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"job_id\": 1038,\n \"athlete_ids\": [\n 132,\n 1181\n ],\n \"sign_agreement_upfront\": true,\n \"agreement_signed_name\": \"Univ mm\",\n \"athlete_{id}\": [],\n \"will_disclose\": \"Y\",\n \"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Athletes successfully Applied",
"errors": [],
"applied": []
}Apply athletes to job
Apply one or more athletes to a job. Requires agreement acceptance. Screening answers are sent as dynamic keys ‘athlete_’ (e.g. athlete_132, athlete_1181) — each is an array of objects with question_id, question, and answer.
POST
/
agent
/
apply-athletes-to-job
Apply athletes to job
curl --request POST \
--url http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"job_id": 1038,
"athlete_ids": [
132,
1181
],
"sign_agreement_upfront": true,
"agreement_signed_name": "Univ mm",
"athlete_{id}": [],
"will_disclose": "Y",
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."
}
'import requests
url = "http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job"
payload = {
"job_id": 1038,
"athlete_ids": [132, 1181],
"sign_agreement_upfront": True,
"agreement_signed_name": "Univ mm",
"athlete_{id}": [],
"will_disclose": "Y",
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
job_id: 1038,
athlete_ids: [132, 1181],
sign_agreement_upfront: true,
agreement_signed_name: 'Univ mm',
'athlete_{id}': [],
will_disclose: 'Y',
image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...'
})
};
fetch('http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'job_id' => 1038,
'athlete_ids' => [
132,
1181
],
'sign_agreement_upfront' => true,
'agreement_signed_name' => 'Univ mm',
'athlete_{id}' => [
],
'will_disclose' => 'Y',
'image' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job"
payload := strings.NewReader("{\n \"job_id\": 1038,\n \"athlete_ids\": [\n 132,\n 1181\n ],\n \"sign_agreement_upfront\": true,\n \"agreement_signed_name\": \"Univ mm\",\n \"athlete_{id}\": [],\n \"will_disclose\": \"Y\",\n \"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"job_id\": 1038,\n \"athlete_ids\": [\n 132,\n 1181\n ],\n \"sign_agreement_upfront\": true,\n \"agreement_signed_name\": \"Univ mm\",\n \"athlete_{id}\": [],\n \"will_disclose\": \"Y\",\n \"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-backend/api/agent/apply-athletes-to-job")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"job_id\": 1038,\n \"athlete_ids\": [\n 132,\n 1181\n ],\n \"sign_agreement_upfront\": true,\n \"agreement_signed_name\": \"Univ mm\",\n \"athlete_{id}\": [],\n \"will_disclose\": \"Y\",\n \"image\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Athletes successfully Applied",
"errors": [],
"applied": []
}Authorizations
JWT Bearer token authentication. Use the /api/login endpoint to obtain a token.
Body
application/json
Job ID to apply to
Example:
1038
Array of athlete user IDs
Example:
[132, 1181]
Must be true to proceed
Example:
true
Name used for agreement signing
Example:
"Univ mm"
Dynamic key per athlete (e.g. athlete_132). Array of screening question answers for that athlete.
Show child attributes
Show child attributes
Example:
[]
Will disclose (default Y)
Available options:
Y, N Example:
"Y"
Optional base64 image attachment
Example:
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUg..."