curl --request POST \
--url http://localhost/mogl/mogl-backend/api/prepare-job-duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"job_id": 2740
}'import requests
url = "http://localhost/mogl/mogl-backend/api/prepare-job-duplicate"
payload = { "job_id": 2740 }
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: 2740})
};
fetch('http://localhost/mogl/mogl-backend/api/prepare-job-duplicate', 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/prepare-job-duplicate",
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' => 2740
]),
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/prepare-job-duplicate"
payload := strings.NewReader("{\n \"job_id\": 2740\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/prepare-job-duplicate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"job_id\": 2740\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-backend/api/prepare-job-duplicate")
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\": 2740\n}"
response = http.request(request)
puts response.read_body{
"schema_version": 1,
"jobName": "<string>",
"require_proof_of_work": true,
"jobType": "short-term",
"jobViewPreference": "All MOGL Athletes",
"job_for": "All",
"questions": [
{
"questions": "<string>",
"question_type": "<string>",
"metadata": {}
}
],
"categoryData": [
{
"categoryId": "Social Media Campaigns",
"skill_id": "Content Creation"
}
],
"SkillsData": [
{
"label": "<string>"
}
],
"milestones": [
{
"deliverable_type_id": 18,
"due_date": null,
"beginning_date": null,
"when_deliverable_due": "specific_date",
"deliverable_type": {
"id": 123,
"name": "<string>",
"helper_message": "<string>"
}
}
],
"attachments": [
{
"token": "<string>",
"name": "<string>",
"type": "title"
}
],
"warnings": [
{
"code": "ATTACHMENT_COPY_FAILED",
"file_name": "<string>",
"message": "<string>"
}
]
}Prepare a Partner Web deal duplicate
Builds a create-mode Deal Creation DTO from an owned source deal. Does not create a partner_jobs row. Copies deliverable_type_id, require_proof_of_work, jobViewPreference, job_for (including University Partners), and jobType as short-term or long-term. Resolves deliverable type helper text from current milestone_categories. Clears specific due_date and beginning_date values. Missing or illegal jobType defaults to short-term.
curl --request POST \
--url http://localhost/mogl/mogl-backend/api/prepare-job-duplicate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"job_id": 2740
}'import requests
url = "http://localhost/mogl/mogl-backend/api/prepare-job-duplicate"
payload = { "job_id": 2740 }
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: 2740})
};
fetch('http://localhost/mogl/mogl-backend/api/prepare-job-duplicate', 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/prepare-job-duplicate",
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' => 2740
]),
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/prepare-job-duplicate"
payload := strings.NewReader("{\n \"job_id\": 2740\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/prepare-job-duplicate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"job_id\": 2740\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-backend/api/prepare-job-duplicate")
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\": 2740\n}"
response = http.request(request)
puts response.read_body{
"schema_version": 1,
"jobName": "<string>",
"require_proof_of_work": true,
"jobType": "short-term",
"jobViewPreference": "All MOGL Athletes",
"job_for": "All",
"questions": [
{
"questions": "<string>",
"question_type": "<string>",
"metadata": {}
}
],
"categoryData": [
{
"categoryId": "Social Media Campaigns",
"skill_id": "Content Creation"
}
],
"SkillsData": [
{
"label": "<string>"
}
],
"milestones": [
{
"deliverable_type_id": 18,
"due_date": null,
"beginning_date": null,
"when_deliverable_due": "specific_date",
"deliverable_type": {
"id": 123,
"name": "<string>",
"helper_message": "<string>"
}
}
],
"attachments": [
{
"token": "<string>",
"name": "<string>",
"type": "title"
}
],
"warnings": [
{
"code": "ATTACHMENT_COPY_FAILED",
"file_name": "<string>",
"message": "<string>"
}
]
}Authorizations
JWT Bearer token authentication. Use the /api/login endpoint to obtain a token.
Body
2740
Response
Prepared duplicate DTO
1
short-term, long-term "short-term"
"All MOGL Athletes"
"All"
Show child attributes
Show child attributes
Copy-safe category rows. categoryId and skill_id are names, matching getSelectedJob hydration, not numeric FKs.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes