curl --request POST \
--url http://localhost/mogl/mogl-backend/api/add-job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isEdit": 0,
"id": 1,
"jobType": "short-term",
"jobFor": "All",
"name": "Test skl",
"fbp": "fb.1.1771826224285.758247182288672553",
"require_proof_of_work": true,
"dueDateUpdateOnly": "No",
"addTitleAndDescription": {
"jobName": "Test job dev 002",
"jobDescription": "<p>Test job description</p>",
"levelOfExperience": "",
"skillsAndExpertise": [],
"additionalSkills": [],
"is_exclusive": "N",
"specifics_exclusive_deal": "",
"totalCompensation": "10.00",
"numberOfPeopleNeedForJob": "More",
"jobCategoryName": [
false,
true,
true,
true,
false,
false,
true,
true,
false,
false,
false,
false,
false,
false,
false,
false
],
"jobCategoryNames": [],
"jobCategoriesSelected": [
14,
15,
35,
17,
37
],
"deliverableList": [],
"additionalAttachment": [],
"removedImg": []
},
"addDetails": {
"projectType": "1",
"screeningQuestions": [],
"questionsAsked": [
{
"questions": "What shipping address should we use if you are hired?",
"question_type": "shipping_address",
"metadata": {
"country": "United States",
"country_code": "US",
"required": true
}
},
{
"questions": "What is your t-shirt size?",
"question_type": "text"
}
],
"additionalAttachment": [],
"require_proof_of_work": true
},
"addExpertise": {
"skillsAndExpertise": [],
"additionalSkills": [],
"jobCategoriesSelected": [
14,
15
]
},
"addLocation": {
"talentLeague": null,
"talentState": "Los Angeles, CA, USA",
"poc_name": "Test user",
"poc_email": "testpartner@gmail.com",
"location_utc_offset": "{}",
"university": [
1,
222
],
"universityName": "Example University",
"division": [
123
],
"conference": [
123
],
"sports": [
24,
18,
10,
30
],
"skills": [
123
],
"gender": [
"Male",
"Female"
],
"instagram_min": 123,
"instagram_max": 123,
"tiktok_min": 123,
"tiktok_max": 123,
"x_min": 123,
"x_max": 123
},
"addBudgetaddTitle": {
"paymentTypePreference": "Fixed",
"estimateBudget": "notDef",
"hourlyRateFrom": "10.00",
"hourlyRateTo": 0,
"monthlyPaymentPreference": "lessThan1"
},
"addVisiblity": {
"jobViewPreference": "All MOGL Athletes",
"numberOfPeopleNeedForJob": "More",
"preferPersonOrteam": [],
"preferTalent": "",
"talentPreference": []
},
"remainimage": []
}
'import requests
url = "http://localhost/mogl/mogl-backend/api/add-job"
payload = {
"isEdit": 0,
"id": 1,
"jobType": "short-term",
"jobFor": "All",
"name": "Test skl",
"fbp": "fb.1.1771826224285.758247182288672553",
"require_proof_of_work": True,
"dueDateUpdateOnly": "No",
"addTitleAndDescription": {
"jobName": "Test job dev 002",
"jobDescription": "<p>Test job description</p>",
"levelOfExperience": "",
"skillsAndExpertise": [],
"additionalSkills": [],
"is_exclusive": "N",
"specifics_exclusive_deal": "",
"totalCompensation": "10.00",
"numberOfPeopleNeedForJob": "More",
"jobCategoryName": [False, True, True, True, False, False, True, True, False, False, False, False, False, False, False, False],
"jobCategoryNames": [],
"jobCategoriesSelected": [14, 15, 35, 17, 37],
"deliverableList": [],
"additionalAttachment": [],
"removedImg": []
},
"addDetails": {
"projectType": "1",
"screeningQuestions": [],
"questionsAsked": [
{
"questions": "What shipping address should we use if you are hired?",
"question_type": "shipping_address",
"metadata": {
"country": "United States",
"country_code": "US",
"required": True
}
},
{
"questions": "What is your t-shirt size?",
"question_type": "text"
}
],
"additionalAttachment": [],
"require_proof_of_work": True
},
"addExpertise": {
"skillsAndExpertise": [],
"additionalSkills": [],
"jobCategoriesSelected": [14, 15]
},
"addLocation": {
"talentLeague": None,
"talentState": "Los Angeles, CA, USA",
"poc_name": "Test user",
"poc_email": "testpartner@gmail.com",
"location_utc_offset": "{}",
"university": [1, 222],
"universityName": "Example University",
"division": [123],
"conference": [123],
"sports": [24, 18, 10, 30],
"skills": [123],
"gender": ["Male", "Female"],
"instagram_min": 123,
"instagram_max": 123,
"tiktok_min": 123,
"tiktok_max": 123,
"x_min": 123,
"x_max": 123
},
"addBudgetaddTitle": {
"paymentTypePreference": "Fixed",
"estimateBudget": "notDef",
"hourlyRateFrom": "10.00",
"hourlyRateTo": 0,
"monthlyPaymentPreference": "lessThan1"
},
"addVisiblity": {
"jobViewPreference": "All MOGL Athletes",
"numberOfPeopleNeedForJob": "More",
"preferPersonOrteam": [],
"preferTalent": "",
"talentPreference": []
},
"remainimage": []
}
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({
isEdit: 0,
id: 1,
jobType: 'short-term',
jobFor: 'All',
name: 'Test skl',
fbp: 'fb.1.1771826224285.758247182288672553',
require_proof_of_work: true,
dueDateUpdateOnly: 'No',
addTitleAndDescription: {
jobName: 'Test job dev 002',
jobDescription: '<p>Test job description</p>',
levelOfExperience: '',
skillsAndExpertise: [],
additionalSkills: [],
is_exclusive: 'N',
specifics_exclusive_deal: '',
totalCompensation: '10.00',
numberOfPeopleNeedForJob: 'More',
jobCategoryName: [
false,
true,
true,
true,
false,
false,
true,
true,
false,
false,
false,
false,
false,
false,
false,
false
],
jobCategoryNames: [],
jobCategoriesSelected: [14, 15, 35, 17, 37],
deliverableList: [],
additionalAttachment: [],
removedImg: []
},
addDetails: {
projectType: '1',
screeningQuestions: [],
questionsAsked: [
{
questions: 'What shipping address should we use if you are hired?',
question_type: 'shipping_address',
metadata: {country: 'United States', country_code: 'US', required: true}
},
{questions: 'What is your t-shirt size?', question_type: 'text'}
],
additionalAttachment: [],
require_proof_of_work: true
},
addExpertise: {skillsAndExpertise: [], additionalSkills: [], jobCategoriesSelected: [14, 15]},
addLocation: {
talentLeague: null,
talentState: 'Los Angeles, CA, USA',
poc_name: 'Test user',
poc_email: 'testpartner@gmail.com',
location_utc_offset: '{}',
university: [1, 222],
universityName: 'Example University',
division: [123],
conference: [123],
sports: [24, 18, 10, 30],
skills: [123],
gender: ['Male', 'Female'],
instagram_min: 123,
instagram_max: 123,
tiktok_min: 123,
tiktok_max: 123,
x_min: 123,
x_max: 123
},
addBudgetaddTitle: {
paymentTypePreference: 'Fixed',
estimateBudget: 'notDef',
hourlyRateFrom: '10.00',
hourlyRateTo: 0,
monthlyPaymentPreference: 'lessThan1'
},
addVisiblity: {
jobViewPreference: 'All MOGL Athletes',
numberOfPeopleNeedForJob: 'More',
preferPersonOrteam: [],
preferTalent: '',
talentPreference: []
},
remainimage: []
})
};
fetch('http://localhost/mogl/mogl-backend/api/add-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/add-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([
'isEdit' => 0,
'id' => 1,
'jobType' => 'short-term',
'jobFor' => 'All',
'name' => 'Test skl',
'fbp' => 'fb.1.1771826224285.758247182288672553',
'require_proof_of_work' => true,
'dueDateUpdateOnly' => 'No',
'addTitleAndDescription' => [
'jobName' => 'Test job dev 002',
'jobDescription' => '<p>Test job description</p>',
'levelOfExperience' => '',
'skillsAndExpertise' => [
],
'additionalSkills' => [
],
'is_exclusive' => 'N',
'specifics_exclusive_deal' => '',
'totalCompensation' => '10.00',
'numberOfPeopleNeedForJob' => 'More',
'jobCategoryName' => [
false,
true,
true,
true,
false,
false,
true,
true,
false,
false,
false,
false,
false,
false,
false,
false
],
'jobCategoryNames' => [
],
'jobCategoriesSelected' => [
14,
15,
35,
17,
37
],
'deliverableList' => [
],
'additionalAttachment' => [
],
'removedImg' => [
]
],
'addDetails' => [
'projectType' => '1',
'screeningQuestions' => [
],
'questionsAsked' => [
[
'questions' => 'What shipping address should we use if you are hired?',
'question_type' => 'shipping_address',
'metadata' => [
'country' => 'United States',
'country_code' => 'US',
'required' => true
]
],
[
'questions' => 'What is your t-shirt size?',
'question_type' => 'text'
]
],
'additionalAttachment' => [
],
'require_proof_of_work' => true
],
'addExpertise' => [
'skillsAndExpertise' => [
],
'additionalSkills' => [
],
'jobCategoriesSelected' => [
14,
15
]
],
'addLocation' => [
'talentLeague' => null,
'talentState' => 'Los Angeles, CA, USA',
'poc_name' => 'Test user',
'poc_email' => 'testpartner@gmail.com',
'location_utc_offset' => '{}',
'university' => [
1,
222
],
'universityName' => 'Example University',
'division' => [
123
],
'conference' => [
123
],
'sports' => [
24,
18,
10,
30
],
'skills' => [
123
],
'gender' => [
'Male',
'Female'
],
'instagram_min' => 123,
'instagram_max' => 123,
'tiktok_min' => 123,
'tiktok_max' => 123,
'x_min' => 123,
'x_max' => 123
],
'addBudgetaddTitle' => [
'paymentTypePreference' => 'Fixed',
'estimateBudget' => 'notDef',
'hourlyRateFrom' => '10.00',
'hourlyRateTo' => 0,
'monthlyPaymentPreference' => 'lessThan1'
],
'addVisiblity' => [
'jobViewPreference' => 'All MOGL Athletes',
'numberOfPeopleNeedForJob' => 'More',
'preferPersonOrteam' => [
],
'preferTalent' => '',
'talentPreference' => [
]
],
'remainimage' => [
]
]),
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/add-job"
payload := strings.NewReader("{\n \"isEdit\": 0,\n \"id\": 1,\n \"jobType\": \"short-term\",\n \"jobFor\": \"All\",\n \"name\": \"Test skl\",\n \"fbp\": \"fb.1.1771826224285.758247182288672553\",\n \"require_proof_of_work\": true,\n \"dueDateUpdateOnly\": \"No\",\n \"addTitleAndDescription\": {\n \"jobName\": \"Test job dev 002\",\n \"jobDescription\": \"<p>Test job description</p>\",\n \"levelOfExperience\": \"\",\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"is_exclusive\": \"N\",\n \"specifics_exclusive_deal\": \"\",\n \"totalCompensation\": \"10.00\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"jobCategoryName\": [\n false,\n true,\n true,\n true,\n false,\n false,\n true,\n true,\n false,\n false,\n false,\n false,\n false,\n false,\n false,\n false\n ],\n \"jobCategoryNames\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15,\n 35,\n 17,\n 37\n ],\n \"deliverableList\": [],\n \"additionalAttachment\": [],\n \"removedImg\": []\n },\n \"addDetails\": {\n \"projectType\": \"1\",\n \"screeningQuestions\": [],\n \"questionsAsked\": [\n {\n \"questions\": \"What shipping address should we use if you are hired?\",\n \"question_type\": \"shipping_address\",\n \"metadata\": {\n \"country\": \"United States\",\n \"country_code\": \"US\",\n \"required\": true\n }\n },\n {\n \"questions\": \"What is your t-shirt size?\",\n \"question_type\": \"text\"\n }\n ],\n \"additionalAttachment\": [],\n \"require_proof_of_work\": true\n },\n \"addExpertise\": {\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15\n ]\n },\n \"addLocation\": {\n \"talentLeague\": null,\n \"talentState\": \"Los Angeles, CA, USA\",\n \"poc_name\": \"Test user\",\n \"poc_email\": \"testpartner@gmail.com\",\n \"location_utc_offset\": \"{}\",\n \"university\": [\n 1,\n 222\n ],\n \"universityName\": \"Example University\",\n \"division\": [\n 123\n ],\n \"conference\": [\n 123\n ],\n \"sports\": [\n 24,\n 18,\n 10,\n 30\n ],\n \"skills\": [\n 123\n ],\n \"gender\": [\n \"Male\",\n \"Female\"\n ],\n \"instagram_min\": 123,\n \"instagram_max\": 123,\n \"tiktok_min\": 123,\n \"tiktok_max\": 123,\n \"x_min\": 123,\n \"x_max\": 123\n },\n \"addBudgetaddTitle\": {\n \"paymentTypePreference\": \"Fixed\",\n \"estimateBudget\": \"notDef\",\n \"hourlyRateFrom\": \"10.00\",\n \"hourlyRateTo\": 0,\n \"monthlyPaymentPreference\": \"lessThan1\"\n },\n \"addVisiblity\": {\n \"jobViewPreference\": \"All MOGL Athletes\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"preferPersonOrteam\": [],\n \"preferTalent\": \"\",\n \"talentPreference\": []\n },\n \"remainimage\": []\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/add-job")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isEdit\": 0,\n \"id\": 1,\n \"jobType\": \"short-term\",\n \"jobFor\": \"All\",\n \"name\": \"Test skl\",\n \"fbp\": \"fb.1.1771826224285.758247182288672553\",\n \"require_proof_of_work\": true,\n \"dueDateUpdateOnly\": \"No\",\n \"addTitleAndDescription\": {\n \"jobName\": \"Test job dev 002\",\n \"jobDescription\": \"<p>Test job description</p>\",\n \"levelOfExperience\": \"\",\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"is_exclusive\": \"N\",\n \"specifics_exclusive_deal\": \"\",\n \"totalCompensation\": \"10.00\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"jobCategoryName\": [\n false,\n true,\n true,\n true,\n false,\n false,\n true,\n true,\n false,\n false,\n false,\n false,\n false,\n false,\n false,\n false\n ],\n \"jobCategoryNames\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15,\n 35,\n 17,\n 37\n ],\n \"deliverableList\": [],\n \"additionalAttachment\": [],\n \"removedImg\": []\n },\n \"addDetails\": {\n \"projectType\": \"1\",\n \"screeningQuestions\": [],\n \"questionsAsked\": [\n {\n \"questions\": \"What shipping address should we use if you are hired?\",\n \"question_type\": \"shipping_address\",\n \"metadata\": {\n \"country\": \"United States\",\n \"country_code\": \"US\",\n \"required\": true\n }\n },\n {\n \"questions\": \"What is your t-shirt size?\",\n \"question_type\": \"text\"\n }\n ],\n \"additionalAttachment\": [],\n \"require_proof_of_work\": true\n },\n \"addExpertise\": {\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15\n ]\n },\n \"addLocation\": {\n \"talentLeague\": null,\n \"talentState\": \"Los Angeles, CA, USA\",\n \"poc_name\": \"Test user\",\n \"poc_email\": \"testpartner@gmail.com\",\n \"location_utc_offset\": \"{}\",\n \"university\": [\n 1,\n 222\n ],\n \"universityName\": \"Example University\",\n \"division\": [\n 123\n ],\n \"conference\": [\n 123\n ],\n \"sports\": [\n 24,\n 18,\n 10,\n 30\n ],\n \"skills\": [\n 123\n ],\n \"gender\": [\n \"Male\",\n \"Female\"\n ],\n \"instagram_min\": 123,\n \"instagram_max\": 123,\n \"tiktok_min\": 123,\n \"tiktok_max\": 123,\n \"x_min\": 123,\n \"x_max\": 123\n },\n \"addBudgetaddTitle\": {\n \"paymentTypePreference\": \"Fixed\",\n \"estimateBudget\": \"notDef\",\n \"hourlyRateFrom\": \"10.00\",\n \"hourlyRateTo\": 0,\n \"monthlyPaymentPreference\": \"lessThan1\"\n },\n \"addVisiblity\": {\n \"jobViewPreference\": \"All MOGL Athletes\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"preferPersonOrteam\": [],\n \"preferTalent\": \"\",\n \"talentPreference\": []\n },\n \"remainimage\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-backend/api/add-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 \"isEdit\": 0,\n \"id\": 1,\n \"jobType\": \"short-term\",\n \"jobFor\": \"All\",\n \"name\": \"Test skl\",\n \"fbp\": \"fb.1.1771826224285.758247182288672553\",\n \"require_proof_of_work\": true,\n \"dueDateUpdateOnly\": \"No\",\n \"addTitleAndDescription\": {\n \"jobName\": \"Test job dev 002\",\n \"jobDescription\": \"<p>Test job description</p>\",\n \"levelOfExperience\": \"\",\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"is_exclusive\": \"N\",\n \"specifics_exclusive_deal\": \"\",\n \"totalCompensation\": \"10.00\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"jobCategoryName\": [\n false,\n true,\n true,\n true,\n false,\n false,\n true,\n true,\n false,\n false,\n false,\n false,\n false,\n false,\n false,\n false\n ],\n \"jobCategoryNames\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15,\n 35,\n 17,\n 37\n ],\n \"deliverableList\": [],\n \"additionalAttachment\": [],\n \"removedImg\": []\n },\n \"addDetails\": {\n \"projectType\": \"1\",\n \"screeningQuestions\": [],\n \"questionsAsked\": [\n {\n \"questions\": \"What shipping address should we use if you are hired?\",\n \"question_type\": \"shipping_address\",\n \"metadata\": {\n \"country\": \"United States\",\n \"country_code\": \"US\",\n \"required\": true\n }\n },\n {\n \"questions\": \"What is your t-shirt size?\",\n \"question_type\": \"text\"\n }\n ],\n \"additionalAttachment\": [],\n \"require_proof_of_work\": true\n },\n \"addExpertise\": {\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15\n ]\n },\n \"addLocation\": {\n \"talentLeague\": null,\n \"talentState\": \"Los Angeles, CA, USA\",\n \"poc_name\": \"Test user\",\n \"poc_email\": \"testpartner@gmail.com\",\n \"location_utc_offset\": \"{}\",\n \"university\": [\n 1,\n 222\n ],\n \"universityName\": \"Example University\",\n \"division\": [\n 123\n ],\n \"conference\": [\n 123\n ],\n \"sports\": [\n 24,\n 18,\n 10,\n 30\n ],\n \"skills\": [\n 123\n ],\n \"gender\": [\n \"Male\",\n \"Female\"\n ],\n \"instagram_min\": 123,\n \"instagram_max\": 123,\n \"tiktok_min\": 123,\n \"tiktok_max\": 123,\n \"x_min\": 123,\n \"x_max\": 123\n },\n \"addBudgetaddTitle\": {\n \"paymentTypePreference\": \"Fixed\",\n \"estimateBudget\": \"notDef\",\n \"hourlyRateFrom\": \"10.00\",\n \"hourlyRateTo\": 0,\n \"monthlyPaymentPreference\": \"lessThan1\"\n },\n \"addVisiblity\": {\n \"jobViewPreference\": \"All MOGL Athletes\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"preferPersonOrteam\": [],\n \"preferTalent\": \"\",\n \"talentPreference\": []\n },\n \"remainimage\": []\n}"
response = http.request(request)
puts response.read_bodyCreate or edit a job/deal
Create (isEdit=0) or edit (isEdit=1) a job. Uses nested objects for different sections of the job form. If editing a job with hired athletes, only deliverable due dates are updated. Screening questions in addDetails.questionsAsked[] can collect a structured US shipping address by setting question_type=‘shipping_address’ — only one such question is allowed per job (duplicates are rejected), it is always required, and it is US-only.
curl --request POST \
--url http://localhost/mogl/mogl-backend/api/add-job \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isEdit": 0,
"id": 1,
"jobType": "short-term",
"jobFor": "All",
"name": "Test skl",
"fbp": "fb.1.1771826224285.758247182288672553",
"require_proof_of_work": true,
"dueDateUpdateOnly": "No",
"addTitleAndDescription": {
"jobName": "Test job dev 002",
"jobDescription": "<p>Test job description</p>",
"levelOfExperience": "",
"skillsAndExpertise": [],
"additionalSkills": [],
"is_exclusive": "N",
"specifics_exclusive_deal": "",
"totalCompensation": "10.00",
"numberOfPeopleNeedForJob": "More",
"jobCategoryName": [
false,
true,
true,
true,
false,
false,
true,
true,
false,
false,
false,
false,
false,
false,
false,
false
],
"jobCategoryNames": [],
"jobCategoriesSelected": [
14,
15,
35,
17,
37
],
"deliverableList": [],
"additionalAttachment": [],
"removedImg": []
},
"addDetails": {
"projectType": "1",
"screeningQuestions": [],
"questionsAsked": [
{
"questions": "What shipping address should we use if you are hired?",
"question_type": "shipping_address",
"metadata": {
"country": "United States",
"country_code": "US",
"required": true
}
},
{
"questions": "What is your t-shirt size?",
"question_type": "text"
}
],
"additionalAttachment": [],
"require_proof_of_work": true
},
"addExpertise": {
"skillsAndExpertise": [],
"additionalSkills": [],
"jobCategoriesSelected": [
14,
15
]
},
"addLocation": {
"talentLeague": null,
"talentState": "Los Angeles, CA, USA",
"poc_name": "Test user",
"poc_email": "testpartner@gmail.com",
"location_utc_offset": "{}",
"university": [
1,
222
],
"universityName": "Example University",
"division": [
123
],
"conference": [
123
],
"sports": [
24,
18,
10,
30
],
"skills": [
123
],
"gender": [
"Male",
"Female"
],
"instagram_min": 123,
"instagram_max": 123,
"tiktok_min": 123,
"tiktok_max": 123,
"x_min": 123,
"x_max": 123
},
"addBudgetaddTitle": {
"paymentTypePreference": "Fixed",
"estimateBudget": "notDef",
"hourlyRateFrom": "10.00",
"hourlyRateTo": 0,
"monthlyPaymentPreference": "lessThan1"
},
"addVisiblity": {
"jobViewPreference": "All MOGL Athletes",
"numberOfPeopleNeedForJob": "More",
"preferPersonOrteam": [],
"preferTalent": "",
"talentPreference": []
},
"remainimage": []
}
'import requests
url = "http://localhost/mogl/mogl-backend/api/add-job"
payload = {
"isEdit": 0,
"id": 1,
"jobType": "short-term",
"jobFor": "All",
"name": "Test skl",
"fbp": "fb.1.1771826224285.758247182288672553",
"require_proof_of_work": True,
"dueDateUpdateOnly": "No",
"addTitleAndDescription": {
"jobName": "Test job dev 002",
"jobDescription": "<p>Test job description</p>",
"levelOfExperience": "",
"skillsAndExpertise": [],
"additionalSkills": [],
"is_exclusive": "N",
"specifics_exclusive_deal": "",
"totalCompensation": "10.00",
"numberOfPeopleNeedForJob": "More",
"jobCategoryName": [False, True, True, True, False, False, True, True, False, False, False, False, False, False, False, False],
"jobCategoryNames": [],
"jobCategoriesSelected": [14, 15, 35, 17, 37],
"deliverableList": [],
"additionalAttachment": [],
"removedImg": []
},
"addDetails": {
"projectType": "1",
"screeningQuestions": [],
"questionsAsked": [
{
"questions": "What shipping address should we use if you are hired?",
"question_type": "shipping_address",
"metadata": {
"country": "United States",
"country_code": "US",
"required": True
}
},
{
"questions": "What is your t-shirt size?",
"question_type": "text"
}
],
"additionalAttachment": [],
"require_proof_of_work": True
},
"addExpertise": {
"skillsAndExpertise": [],
"additionalSkills": [],
"jobCategoriesSelected": [14, 15]
},
"addLocation": {
"talentLeague": None,
"talentState": "Los Angeles, CA, USA",
"poc_name": "Test user",
"poc_email": "testpartner@gmail.com",
"location_utc_offset": "{}",
"university": [1, 222],
"universityName": "Example University",
"division": [123],
"conference": [123],
"sports": [24, 18, 10, 30],
"skills": [123],
"gender": ["Male", "Female"],
"instagram_min": 123,
"instagram_max": 123,
"tiktok_min": 123,
"tiktok_max": 123,
"x_min": 123,
"x_max": 123
},
"addBudgetaddTitle": {
"paymentTypePreference": "Fixed",
"estimateBudget": "notDef",
"hourlyRateFrom": "10.00",
"hourlyRateTo": 0,
"monthlyPaymentPreference": "lessThan1"
},
"addVisiblity": {
"jobViewPreference": "All MOGL Athletes",
"numberOfPeopleNeedForJob": "More",
"preferPersonOrteam": [],
"preferTalent": "",
"talentPreference": []
},
"remainimage": []
}
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({
isEdit: 0,
id: 1,
jobType: 'short-term',
jobFor: 'All',
name: 'Test skl',
fbp: 'fb.1.1771826224285.758247182288672553',
require_proof_of_work: true,
dueDateUpdateOnly: 'No',
addTitleAndDescription: {
jobName: 'Test job dev 002',
jobDescription: '<p>Test job description</p>',
levelOfExperience: '',
skillsAndExpertise: [],
additionalSkills: [],
is_exclusive: 'N',
specifics_exclusive_deal: '',
totalCompensation: '10.00',
numberOfPeopleNeedForJob: 'More',
jobCategoryName: [
false,
true,
true,
true,
false,
false,
true,
true,
false,
false,
false,
false,
false,
false,
false,
false
],
jobCategoryNames: [],
jobCategoriesSelected: [14, 15, 35, 17, 37],
deliverableList: [],
additionalAttachment: [],
removedImg: []
},
addDetails: {
projectType: '1',
screeningQuestions: [],
questionsAsked: [
{
questions: 'What shipping address should we use if you are hired?',
question_type: 'shipping_address',
metadata: {country: 'United States', country_code: 'US', required: true}
},
{questions: 'What is your t-shirt size?', question_type: 'text'}
],
additionalAttachment: [],
require_proof_of_work: true
},
addExpertise: {skillsAndExpertise: [], additionalSkills: [], jobCategoriesSelected: [14, 15]},
addLocation: {
talentLeague: null,
talentState: 'Los Angeles, CA, USA',
poc_name: 'Test user',
poc_email: 'testpartner@gmail.com',
location_utc_offset: '{}',
university: [1, 222],
universityName: 'Example University',
division: [123],
conference: [123],
sports: [24, 18, 10, 30],
skills: [123],
gender: ['Male', 'Female'],
instagram_min: 123,
instagram_max: 123,
tiktok_min: 123,
tiktok_max: 123,
x_min: 123,
x_max: 123
},
addBudgetaddTitle: {
paymentTypePreference: 'Fixed',
estimateBudget: 'notDef',
hourlyRateFrom: '10.00',
hourlyRateTo: 0,
monthlyPaymentPreference: 'lessThan1'
},
addVisiblity: {
jobViewPreference: 'All MOGL Athletes',
numberOfPeopleNeedForJob: 'More',
preferPersonOrteam: [],
preferTalent: '',
talentPreference: []
},
remainimage: []
})
};
fetch('http://localhost/mogl/mogl-backend/api/add-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/add-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([
'isEdit' => 0,
'id' => 1,
'jobType' => 'short-term',
'jobFor' => 'All',
'name' => 'Test skl',
'fbp' => 'fb.1.1771826224285.758247182288672553',
'require_proof_of_work' => true,
'dueDateUpdateOnly' => 'No',
'addTitleAndDescription' => [
'jobName' => 'Test job dev 002',
'jobDescription' => '<p>Test job description</p>',
'levelOfExperience' => '',
'skillsAndExpertise' => [
],
'additionalSkills' => [
],
'is_exclusive' => 'N',
'specifics_exclusive_deal' => '',
'totalCompensation' => '10.00',
'numberOfPeopleNeedForJob' => 'More',
'jobCategoryName' => [
false,
true,
true,
true,
false,
false,
true,
true,
false,
false,
false,
false,
false,
false,
false,
false
],
'jobCategoryNames' => [
],
'jobCategoriesSelected' => [
14,
15,
35,
17,
37
],
'deliverableList' => [
],
'additionalAttachment' => [
],
'removedImg' => [
]
],
'addDetails' => [
'projectType' => '1',
'screeningQuestions' => [
],
'questionsAsked' => [
[
'questions' => 'What shipping address should we use if you are hired?',
'question_type' => 'shipping_address',
'metadata' => [
'country' => 'United States',
'country_code' => 'US',
'required' => true
]
],
[
'questions' => 'What is your t-shirt size?',
'question_type' => 'text'
]
],
'additionalAttachment' => [
],
'require_proof_of_work' => true
],
'addExpertise' => [
'skillsAndExpertise' => [
],
'additionalSkills' => [
],
'jobCategoriesSelected' => [
14,
15
]
],
'addLocation' => [
'talentLeague' => null,
'talentState' => 'Los Angeles, CA, USA',
'poc_name' => 'Test user',
'poc_email' => 'testpartner@gmail.com',
'location_utc_offset' => '{}',
'university' => [
1,
222
],
'universityName' => 'Example University',
'division' => [
123
],
'conference' => [
123
],
'sports' => [
24,
18,
10,
30
],
'skills' => [
123
],
'gender' => [
'Male',
'Female'
],
'instagram_min' => 123,
'instagram_max' => 123,
'tiktok_min' => 123,
'tiktok_max' => 123,
'x_min' => 123,
'x_max' => 123
],
'addBudgetaddTitle' => [
'paymentTypePreference' => 'Fixed',
'estimateBudget' => 'notDef',
'hourlyRateFrom' => '10.00',
'hourlyRateTo' => 0,
'monthlyPaymentPreference' => 'lessThan1'
],
'addVisiblity' => [
'jobViewPreference' => 'All MOGL Athletes',
'numberOfPeopleNeedForJob' => 'More',
'preferPersonOrteam' => [
],
'preferTalent' => '',
'talentPreference' => [
]
],
'remainimage' => [
]
]),
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/add-job"
payload := strings.NewReader("{\n \"isEdit\": 0,\n \"id\": 1,\n \"jobType\": \"short-term\",\n \"jobFor\": \"All\",\n \"name\": \"Test skl\",\n \"fbp\": \"fb.1.1771826224285.758247182288672553\",\n \"require_proof_of_work\": true,\n \"dueDateUpdateOnly\": \"No\",\n \"addTitleAndDescription\": {\n \"jobName\": \"Test job dev 002\",\n \"jobDescription\": \"<p>Test job description</p>\",\n \"levelOfExperience\": \"\",\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"is_exclusive\": \"N\",\n \"specifics_exclusive_deal\": \"\",\n \"totalCompensation\": \"10.00\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"jobCategoryName\": [\n false,\n true,\n true,\n true,\n false,\n false,\n true,\n true,\n false,\n false,\n false,\n false,\n false,\n false,\n false,\n false\n ],\n \"jobCategoryNames\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15,\n 35,\n 17,\n 37\n ],\n \"deliverableList\": [],\n \"additionalAttachment\": [],\n \"removedImg\": []\n },\n \"addDetails\": {\n \"projectType\": \"1\",\n \"screeningQuestions\": [],\n \"questionsAsked\": [\n {\n \"questions\": \"What shipping address should we use if you are hired?\",\n \"question_type\": \"shipping_address\",\n \"metadata\": {\n \"country\": \"United States\",\n \"country_code\": \"US\",\n \"required\": true\n }\n },\n {\n \"questions\": \"What is your t-shirt size?\",\n \"question_type\": \"text\"\n }\n ],\n \"additionalAttachment\": [],\n \"require_proof_of_work\": true\n },\n \"addExpertise\": {\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15\n ]\n },\n \"addLocation\": {\n \"talentLeague\": null,\n \"talentState\": \"Los Angeles, CA, USA\",\n \"poc_name\": \"Test user\",\n \"poc_email\": \"testpartner@gmail.com\",\n \"location_utc_offset\": \"{}\",\n \"university\": [\n 1,\n 222\n ],\n \"universityName\": \"Example University\",\n \"division\": [\n 123\n ],\n \"conference\": [\n 123\n ],\n \"sports\": [\n 24,\n 18,\n 10,\n 30\n ],\n \"skills\": [\n 123\n ],\n \"gender\": [\n \"Male\",\n \"Female\"\n ],\n \"instagram_min\": 123,\n \"instagram_max\": 123,\n \"tiktok_min\": 123,\n \"tiktok_max\": 123,\n \"x_min\": 123,\n \"x_max\": 123\n },\n \"addBudgetaddTitle\": {\n \"paymentTypePreference\": \"Fixed\",\n \"estimateBudget\": \"notDef\",\n \"hourlyRateFrom\": \"10.00\",\n \"hourlyRateTo\": 0,\n \"monthlyPaymentPreference\": \"lessThan1\"\n },\n \"addVisiblity\": {\n \"jobViewPreference\": \"All MOGL Athletes\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"preferPersonOrteam\": [],\n \"preferTalent\": \"\",\n \"talentPreference\": []\n },\n \"remainimage\": []\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/add-job")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isEdit\": 0,\n \"id\": 1,\n \"jobType\": \"short-term\",\n \"jobFor\": \"All\",\n \"name\": \"Test skl\",\n \"fbp\": \"fb.1.1771826224285.758247182288672553\",\n \"require_proof_of_work\": true,\n \"dueDateUpdateOnly\": \"No\",\n \"addTitleAndDescription\": {\n \"jobName\": \"Test job dev 002\",\n \"jobDescription\": \"<p>Test job description</p>\",\n \"levelOfExperience\": \"\",\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"is_exclusive\": \"N\",\n \"specifics_exclusive_deal\": \"\",\n \"totalCompensation\": \"10.00\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"jobCategoryName\": [\n false,\n true,\n true,\n true,\n false,\n false,\n true,\n true,\n false,\n false,\n false,\n false,\n false,\n false,\n false,\n false\n ],\n \"jobCategoryNames\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15,\n 35,\n 17,\n 37\n ],\n \"deliverableList\": [],\n \"additionalAttachment\": [],\n \"removedImg\": []\n },\n \"addDetails\": {\n \"projectType\": \"1\",\n \"screeningQuestions\": [],\n \"questionsAsked\": [\n {\n \"questions\": \"What shipping address should we use if you are hired?\",\n \"question_type\": \"shipping_address\",\n \"metadata\": {\n \"country\": \"United States\",\n \"country_code\": \"US\",\n \"required\": true\n }\n },\n {\n \"questions\": \"What is your t-shirt size?\",\n \"question_type\": \"text\"\n }\n ],\n \"additionalAttachment\": [],\n \"require_proof_of_work\": true\n },\n \"addExpertise\": {\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15\n ]\n },\n \"addLocation\": {\n \"talentLeague\": null,\n \"talentState\": \"Los Angeles, CA, USA\",\n \"poc_name\": \"Test user\",\n \"poc_email\": \"testpartner@gmail.com\",\n \"location_utc_offset\": \"{}\",\n \"university\": [\n 1,\n 222\n ],\n \"universityName\": \"Example University\",\n \"division\": [\n 123\n ],\n \"conference\": [\n 123\n ],\n \"sports\": [\n 24,\n 18,\n 10,\n 30\n ],\n \"skills\": [\n 123\n ],\n \"gender\": [\n \"Male\",\n \"Female\"\n ],\n \"instagram_min\": 123,\n \"instagram_max\": 123,\n \"tiktok_min\": 123,\n \"tiktok_max\": 123,\n \"x_min\": 123,\n \"x_max\": 123\n },\n \"addBudgetaddTitle\": {\n \"paymentTypePreference\": \"Fixed\",\n \"estimateBudget\": \"notDef\",\n \"hourlyRateFrom\": \"10.00\",\n \"hourlyRateTo\": 0,\n \"monthlyPaymentPreference\": \"lessThan1\"\n },\n \"addVisiblity\": {\n \"jobViewPreference\": \"All MOGL Athletes\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"preferPersonOrteam\": [],\n \"preferTalent\": \"\",\n \"talentPreference\": []\n },\n \"remainimage\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-backend/api/add-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 \"isEdit\": 0,\n \"id\": 1,\n \"jobType\": \"short-term\",\n \"jobFor\": \"All\",\n \"name\": \"Test skl\",\n \"fbp\": \"fb.1.1771826224285.758247182288672553\",\n \"require_proof_of_work\": true,\n \"dueDateUpdateOnly\": \"No\",\n \"addTitleAndDescription\": {\n \"jobName\": \"Test job dev 002\",\n \"jobDescription\": \"<p>Test job description</p>\",\n \"levelOfExperience\": \"\",\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"is_exclusive\": \"N\",\n \"specifics_exclusive_deal\": \"\",\n \"totalCompensation\": \"10.00\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"jobCategoryName\": [\n false,\n true,\n true,\n true,\n false,\n false,\n true,\n true,\n false,\n false,\n false,\n false,\n false,\n false,\n false,\n false\n ],\n \"jobCategoryNames\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15,\n 35,\n 17,\n 37\n ],\n \"deliverableList\": [],\n \"additionalAttachment\": [],\n \"removedImg\": []\n },\n \"addDetails\": {\n \"projectType\": \"1\",\n \"screeningQuestions\": [],\n \"questionsAsked\": [\n {\n \"questions\": \"What shipping address should we use if you are hired?\",\n \"question_type\": \"shipping_address\",\n \"metadata\": {\n \"country\": \"United States\",\n \"country_code\": \"US\",\n \"required\": true\n }\n },\n {\n \"questions\": \"What is your t-shirt size?\",\n \"question_type\": \"text\"\n }\n ],\n \"additionalAttachment\": [],\n \"require_proof_of_work\": true\n },\n \"addExpertise\": {\n \"skillsAndExpertise\": [],\n \"additionalSkills\": [],\n \"jobCategoriesSelected\": [\n 14,\n 15\n ]\n },\n \"addLocation\": {\n \"talentLeague\": null,\n \"talentState\": \"Los Angeles, CA, USA\",\n \"poc_name\": \"Test user\",\n \"poc_email\": \"testpartner@gmail.com\",\n \"location_utc_offset\": \"{}\",\n \"university\": [\n 1,\n 222\n ],\n \"universityName\": \"Example University\",\n \"division\": [\n 123\n ],\n \"conference\": [\n 123\n ],\n \"sports\": [\n 24,\n 18,\n 10,\n 30\n ],\n \"skills\": [\n 123\n ],\n \"gender\": [\n \"Male\",\n \"Female\"\n ],\n \"instagram_min\": 123,\n \"instagram_max\": 123,\n \"tiktok_min\": 123,\n \"tiktok_max\": 123,\n \"x_min\": 123,\n \"x_max\": 123\n },\n \"addBudgetaddTitle\": {\n \"paymentTypePreference\": \"Fixed\",\n \"estimateBudget\": \"notDef\",\n \"hourlyRateFrom\": \"10.00\",\n \"hourlyRateTo\": 0,\n \"monthlyPaymentPreference\": \"lessThan1\"\n },\n \"addVisiblity\": {\n \"jobViewPreference\": \"All MOGL Athletes\",\n \"numberOfPeopleNeedForJob\": \"More\",\n \"preferPersonOrteam\": [],\n \"preferTalent\": \"\",\n \"talentPreference\": []\n },\n \"remainimage\": []\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
JWT Bearer token authentication. Use the /api/login endpoint to obtain a token.
Body
0 = create, 1 = edit
0
Job ID (required for edit)
1
Job type identifier
"short-term"
Target audience: 'All' or 'Univ'
"All"
Agreement signer name (create only)
"Test skl"
Facebook browser ID (frontend)
"fb.1.1771826224285.758247182288672553"
Require proof of work
true
Frontend hint for due-date-only edits
Yes, No "No"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Job categories and skills (backend reads skillsAndExpertise and additionalSkills from here)
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Edit only: document IDs to delete
[]
Response
Job created/updated