Projects
Projects are the core organizational unit in the Marketiger API. They serve as containers for your 3D models, folders, and orders, allowing you to organize and manage your 3D printing operations.
What are Projects?
A Project in the Marketiger API is a workspace that:
- Organizes your 3D models - All 3D model files you upload are associated with a specific project
- Manages your orders - Orders are created within the context of a project
- Defines settings and permissions - Each project has its own configuration, including:
- Supported file formats for model uploads
- Order creation permissions
- Model sharing settings
- Order confirmation email settings
- Configurator availability
Projects allow you to separate different product lines, clients, or business units within a single Marketiger account. For example, you might have separate projects for different product categories, customer segments, or internal vs. external orders.
Project Assignment
Projects are created and assigned by Marketiger to your Marketiger Hub account. You cannot create projects yourself - they must be assigned to your account by Marketiger.
Important: While you can use the Marketiger API with just an account, to upload models and place orders, you must have a project assigned to your account. Once a project has been assigned to your account, you can use it with the API to upload models, create orders, and manage your 3D printing operations.
Getting Your Project ID
When Marketiger assigns a project to your account, you will receive a GUID (Globally Unique Identifier) Project ID. This is a unique identifier that looks like:
123e4567-e89b-12d3-a456-426614174000
You can retrieve all projects assigned to your account using the GetProjects endpoint:
curl -X GET "https://devapi.marketiger3d.com/v2/Project/GetProjects" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
The response will include all projects you have access to, each with their unique project ID.
Using Project IDs in API Calls
The project ID is used in several API endpoints. You must include it when:
1. Uploading Model Files
When uploading a 3D model file using the UploadModelFile endpoint, you must provide the projectId parameter:
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"
Important: The projectId is a required parameter. Without it, the upload will fail.
2. Creating API Orders
When creating an order using the CreateOrder endpoint, the project is automatically determined from the models you include in the order. All models in the order must belong to the same project.
curl -X POST "https://devapi.marketiger3d.com/v2/Order/CreateOrder" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"firstName": "John",
"lastName": "Doe",
"streetAddress": "123 Main St",
"postal": "10001",
"phoneNumber": "+1234567890",
"email": "customer@example.com",
"city": "New York",
"country": "US",
"models": [
{
"modelId": "123e4567-e89b-12d3-a456-426614174000",
"quantity": 1
}
],
"shippingMethod": 2503
}'
Important:
- The project is automatically determined from the models in the order
- All models in each order must belong to the same project - you cannot mix models from different projects in a single order
Project Configuration
Each project has specific settings that control its behavior:
- Supported File Formats - Determines which 3D model file types can be uploaded:
obj,wrl,vrml,zip,fbx - Model Sharing - Whether models are shared across users in the project
- Order Confirmation - Whether confirmation emails are sent for orders
- Configurator - Whether the 3D configurator feature is enabled
These settings are configured by your Marketiger administrator and cannot be changed via the API.
Best Practices
- Store Project IDs Securely - Save project IDs in your application configuration or database for easy access
- Validate Project Access - Use
GetProjectsto verify you have access to a project before attempting operations - Use Consistent Project IDs - Ensure all models and orders for a given workflow use the same project ID
- Same Project Requirement - When creating orders, ensure all models belong to the same project. Mixing models from different projects in a single order will result in an error
- Handle Project-Specific Errors - If you receive errors about project access or permissions, verify the project ID and your access rights
Common Use Cases
Multi-Project Workflow
If you manage multiple projects:
// Get all available projects
const projects = await getProjects();
// Select a project for your workflow
const projectId = projects.find(p => p.projectName === "Production").id;
// Upload model to selected project
await uploadModelFile(projectId, modelFile);
Project-Specific Order Processing
// Create order - project is determined from the models
// All models must belong to the same project
const order = await createOrder({
firstName: "John",
lastName: "Doe",
streetAddress: "123 Main St",
postal: "10001",
phoneNumber: "+1234567890",
email: "customer@example.com",
city: "New York",
country: "US",
models: [
{
modelId: "123e4567-e89b-12d3-a456-426614174000", // Model from your project
quantity: 1
}
]
});
Related Documentation
- GetProjects - Retrieve all projects you have access to
- UploadModelFile - Upload models to a project
- CreateOrder - Create orders within a project