Skip to main content

UploadModelFile

API Playground

Upload a 3D model file to a project. Optional estimate fields can be included so pricing can be determined before processing finishes.

Your authentication token will be sent as: Authorization: Bearer <token>
UUID of the project to upload the model to
UUID of the folder to place the model in (optional)
Estimated model bounds in millimeters, formatted as x:50 y:60 z:70
Estimated model volume in cm3
The 3D model file to upload (supported formats: obj, wrl, vrml, zip, fbx, max 1GB)

Endpoint​

POST https://devapi.marketiger3d.com/v2/Model3D/UploadModelFile

Authentication​

This endpoint requires a Bearer token. Include the token in the Authorization header:

Authorization: Bearer <your_access_token>

Request Format​

This endpoint uses multipart/form-data for file uploads.

Parameters​

NameTypeLocationRequiredDescription
projectIdstringformYesUUID of the project to upload the model to
folderstringformNoUUID of the folder to place the model in (optional)
estimatedBoundsstringformNoEstimated model bounds in millimeters, format x:50 y:60 z:70
estimatedVolumenumberformNoEstimated model volume in cm3
model3DfileformYesThe 3D model file to upload

Parameter Details​

projectId​

  • Type: string (GUID)
  • Required: Yes
  • Description: The project ID where the model will be uploaded

folder​

  • Type: string (GUID)
  • Required: No
  • Description: The folder ID where the model should be placed. If not provided, the model will be placed in the root of the project.

estimatedBounds​

  • Type: string
  • Required: No
  • Description: Estimated model bounds in millimeters. Use the format x:50 y:60 z:70.
  • Usage: Used for early pricing before processing has finished.

estimatedVolume​

  • Type: float
  • Required: No
  • Description: Estimated model volume in cm3.
  • Usage: Used for early pricing before processing has finished.

model3D​

  • Type: file
  • Required: Yes
  • Description: The 3D model file to upload
  • Supported formats: obj, wrl, vrml, zip, fbx
  • Max size: 1GB

Example Request​

Basic Upload​

curl -X POST "https://devapi.marketiger3d.com/v2/Model3D/UploadModelFile" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-F "projectId=123e4567-e89b-12d3-a456-426614174000" \
-F "model3D=@/path/to/model.stl"

Upload with Folder​

curl -X POST "https://devapi.marketiger3d.com/v2/Model3D/UploadModelFile" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-F "projectId=123e4567-e89b-12d3-a456-426614174000" \
-F "folder=123e4567-e89b-12d3-a456-426614174001" \
-F "model3D=@/path/to/model.stl"

Upload with Pricing Estimates​

curl -X POST "https://devapi.marketiger3d.com/v2/Model3D/UploadModelFile" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-F "projectId=123e4567-e89b-12d3-a456-426614174000" \
-F "estimatedBounds=x:50 y:60 z:70" \
-F "estimatedVolume=21.5" \
-F "model3D=@/path/to/model.stl"

JavaScript Example​

const formData = new FormData();
formData.append('projectId', '123e4567-e89b-12d3-a456-426614174000');
formData.append('estimatedBounds', 'x:50 y:60 z:70');
formData.append('estimatedVolume', '21.5');
formData.append('model3D', fileInput.files[0]);

fetch('https://devapi.marketiger3d.com/v2/Model3D/UploadModelFile', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
},
body: formData
})
.then(response => response.json())
.then(data => {
if (data.success) {
const modelId = data.data.modelId;
console.log('Model uploaded:', modelId);
}
})
.catch(error => console.error('Error:', error));

C# Example​

using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "YOUR_ACCESS_TOKEN");

using (var formData = new MultipartFormDataContent())
{
formData.Add(new StringContent("123e4567-e89b-12d3-a456-426614174000"), "projectId");

var fileContent = new ByteArrayContent(File.ReadAllBytes("path/to/model.stl"));
fileContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
formData.Add(fileContent, "model3D", "model.stl");

var response = await client.PostAsync("https://devapi.marketiger3d.com/v2/Model3D/UploadModelFile", formData);
var responseContent = await response.Content.ReadAsStringAsync();
var result = JsonSerializer.Deserialize<APIResponse>(responseContent);
}
}

Response​

Success Response (200 OK)​

{
"success": true,
"data": {
"modelId": "123e4567-e89b-12d3-a456-426614174000",
"message": "Model Uploaded"
}
}

Response Schema​

FieldTypeDescription
successbooleanIndicates if the request succeeded
dataobjectResponse data
data.modelIdstringUnique identifier (GUID) of the uploaded model
data.messagestringSuccess message

Error Response (400 Bad Request)​

{
"success": false,
"error": {
"type": "AUTHENTICATION",
"message": "User not found"
}
}
{
"success": false,
"error": {
"type": "NOT_FOUND",
"message": "Project not found are you using the right id?"
}
}
{
"success": false,
"error": {
"type": "INCORRECT_PARAMETERS",
"message": "No model to upload"
}
}
{
"success": false,
"error": {
"type": "INCORRECT_PARAMETERS",
"message": "Filetype not supported supported types: .obj,.wrl,.vrml,.zip,.fbx"
}
}

Note: Supported file types are obj, wrl, vrml, zip, and fbx.

Error Codes​

Error TypeStatusDescription
AUTHENTICATION400User not found or no project access
NOT_FOUND400Project not found
INCORRECT_PARAMETERS400Missing file, invalid file type, or missing required fields
OPERATION_FAILED400File upload or processing failed

Notes​

  • File size limit: Maximum file size is 1GB
  • Supported formats: obj, wrl, vrml, zip, fbx
  • Processing time: Models are processed asynchronously. Use GetModelData to check processing status
  • Early pricing: estimatedBounds and estimatedVolume can be supplied so pricing can be determined before processing completes. Calculated prices are in EUR and exclude VAT/tax.
  • Estimate overwrite: After processing finishes, the real processed values overwrite the uploaded estimates
  • Unsupported field: estimatedSupportVolume is not supported by this endpoint
  • Model status: Newly uploaded models start with status "Failed" and are processed automatically

Best Practices​

  1. Validate file format: Check file type before uploading
  2. Handle large files: Implement progress indicators for large file uploads
  3. Check model status: Poll GetModelData endpoint to check when processing is complete
  4. Error handling: Handle file type and size errors gracefully
  5. Project permissions: Verify the target project supports your upload flow before attempting