curl --request POST \
--url http://localhost/mogl/mogl-backend/api/deal-folder/files/{file}/replace/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": 512,
"parts": [
{
"part_number": 1,
"etag": "\"9bb58f26192e4ba00f01e2e7b136bbd8\""
}
]
}
'import requests
url = "http://localhost/mogl/mogl-backend/api/deal-folder/files/{file}/replace/complete"
payload = {
"session_id": 512,
"parts": [
{
"part_number": 1,
"etag": "\"9bb58f26192e4ba00f01e2e7b136bbd8\""
}
]
}
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({
session_id: 512,
parts: [{part_number: 1, etag: '"9bb58f26192e4ba00f01e2e7b136bbd8"'}]
})
};
fetch('http://localhost/mogl/mogl-backend/api/deal-folder/files/{file}/replace/complete', 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/deal-folder/files/{file}/replace/complete",
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([
'session_id' => 512,
'parts' => [
[
'part_number' => 1,
'etag' => '"9bb58f26192e4ba00f01e2e7b136bbd8"'
]
]
]),
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/deal-folder/files/{file}/replace/complete"
payload := strings.NewReader("{\n \"session_id\": 512,\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"\\\"9bb58f26192e4ba00f01e2e7b136bbd8\\\"\"\n }\n ]\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/deal-folder/files/{file}/replace/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": 512,\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"\\\"9bb58f26192e4ba00f01e2e7b136bbd8\\\"\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-backend/api/deal-folder/files/{file}/replace/complete")
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 \"session_id\": 512,\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"\\\"9bb58f26192e4ba00f01e2e7b136bbd8\\\"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "File replaced successfully.",
"data": {
"id": 5,
"deal_folder_id": 12,
"milestone_athlete_rel_id": 88,
"slot_number": 1,
"status": 1,
"status_label": "Needs Approval",
"uploaded_by_user_id": 42,
"current_version": {
"id": 11,
"deal_folder_file_id": 5,
"file_path": "deal-folders/12/slot-1/v1/foo.mp4",
"file_name": "foo.mp4",
"file_size": 8421376,
"file_mime_type": "video/mp4",
"thumbnail_path": null,
"version_number": 1,
"is_current": true,
"uploaded_by_user_id": 42,
"created_at": "2026-04-01T12:00:00Z",
"updated_at": "2026-04-01T12:00:00Z"
},
"created_at": "2026-04-01T12:00:00Z",
"updated_at": "2026-04-01T12:05:00Z",
"deleted_at": null
}
}{
"message": "Unauthenticated."
}{
"status": "error",
"message": "Upload session not found."
}{
"message": "The given data was invalid.",
"errors": {}
}{
"status": "error",
"message": "Something went wrong while saving your file. Please try again."
}iOS — Complete direct-to-S3 multipart upload (replace existing slot)
iOS-only. Step 2 of 2 for replacing an existing file slot. Finalises the multipart upload, marks existing versions not-current, creates the new DealFolderFileVersion, resets the slot status to NEEDS_APPROVAL, and fires the same notifications as the web replace endpoint (notification type: deal-folder-file-replaced). The session_id must be the one returned from /replace/initiate for this same file slot.
curl --request POST \
--url http://localhost/mogl/mogl-backend/api/deal-folder/files/{file}/replace/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": 512,
"parts": [
{
"part_number": 1,
"etag": "\"9bb58f26192e4ba00f01e2e7b136bbd8\""
}
]
}
'import requests
url = "http://localhost/mogl/mogl-backend/api/deal-folder/files/{file}/replace/complete"
payload = {
"session_id": 512,
"parts": [
{
"part_number": 1,
"etag": "\"9bb58f26192e4ba00f01e2e7b136bbd8\""
}
]
}
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({
session_id: 512,
parts: [{part_number: 1, etag: '"9bb58f26192e4ba00f01e2e7b136bbd8"'}]
})
};
fetch('http://localhost/mogl/mogl-backend/api/deal-folder/files/{file}/replace/complete', 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/deal-folder/files/{file}/replace/complete",
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([
'session_id' => 512,
'parts' => [
[
'part_number' => 1,
'etag' => '"9bb58f26192e4ba00f01e2e7b136bbd8"'
]
]
]),
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/deal-folder/files/{file}/replace/complete"
payload := strings.NewReader("{\n \"session_id\": 512,\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"\\\"9bb58f26192e4ba00f01e2e7b136bbd8\\\"\"\n }\n ]\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/deal-folder/files/{file}/replace/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": 512,\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"\\\"9bb58f26192e4ba00f01e2e7b136bbd8\\\"\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/mogl/mogl-backend/api/deal-folder/files/{file}/replace/complete")
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 \"session_id\": 512,\n \"parts\": [\n {\n \"part_number\": 1,\n \"etag\": \"\\\"9bb58f26192e4ba00f01e2e7b136bbd8\\\"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "File replaced successfully.",
"data": {
"id": 5,
"deal_folder_id": 12,
"milestone_athlete_rel_id": 88,
"slot_number": 1,
"status": 1,
"status_label": "Needs Approval",
"uploaded_by_user_id": 42,
"current_version": {
"id": 11,
"deal_folder_file_id": 5,
"file_path": "deal-folders/12/slot-1/v1/foo.mp4",
"file_name": "foo.mp4",
"file_size": 8421376,
"file_mime_type": "video/mp4",
"thumbnail_path": null,
"version_number": 1,
"is_current": true,
"uploaded_by_user_id": 42,
"created_at": "2026-04-01T12:00:00Z",
"updated_at": "2026-04-01T12:00:00Z"
},
"created_at": "2026-04-01T12:00:00Z",
"updated_at": "2026-04-01T12:05:00Z",
"deleted_at": null
}
}{
"message": "Unauthenticated."
}{
"status": "error",
"message": "Upload session not found."
}{
"message": "The given data was invalid.",
"errors": {}
}{
"status": "error",
"message": "Something went wrong while saving your file. Please try again."
}Authorizations
JWT Bearer token authentication. Use the /api/login endpoint to obtain a token.
Path Parameters
DealFolderFile ID (slot ID).
5
Body
Response
File slot replaced
"success"
"File replaced successfully."
A Deal Folder file slot (workflow unit). The integer status field and its rolled-up string equivalents (deal_folder_file_status at the milestone level, deal_folder_status at the folder level) all draw from the same App\Enums\DealFolderStatus values.
Show child attributes
Show child attributes