CreateOrder
API Playground
Create an order for 3D printed models. Orders can optionally be created before model processing finishes when the project allows it and no immediate payment flow requires final processed pricing.
Your authentication token will be sent as: Authorization: Bearer <token>
Customer's first name
Customer's last name
Street address
Postal/ZIP code
Phone number
Email address
City
Country code (2-3 characters, ISO format)
State or province (optional)
JSON array of models. Example: [{"modelId":"123e4567-e89b-12d3-a456-426614174000","quantity":1}]
Shipping method ID. See Shipping Methods for available IDs. Use GetShippingMethods to get methods by country.
Endpoint
POST https://devapi.marketiger3d.com/v2/Order/CreateOrder
Authentication
This endpoint requires a Bearer token. Include the token in the Authorization header:
Authorization: Bearer <your_access_token>
Request Body
{
"firstName": "string",
"lastName": "string",
"streetAddress": "string",
"postal": "string",
"phoneNumber": "string",
"email": "string",
"city": "string",
"country": "string",
"countryState": "string",
"models": [
{
"modelId": "123e4567-e89b-12d3-a456-426614174000",
"quantity": 1
}
],
"shippingMethod": 0
}
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
| firstName | string | Yes | Customer's first name |
| lastName | string | Yes | Customer's last name |
| streetAddress | string | Yes | Street address |
| postal | string | Yes | Postal/ZIP code |
| phoneNumber | string | Yes | Phone number |
| string | Yes | Email address | |
| city | string | Yes | City |
| country | string | Yes | Country code (2-3 characters, ISO format) |
| countryState | string | No | State or province (optional) |
| models | array | Yes | Array of model orders |
| models[].modelId | string | Yes | UUID of the model to order |
| models[].quantity | number | Yes | Quantity of this model to order (minimum 1) |
| shippingMethod | number | Yes | Shipping method ID. See Shipping Methods for available IDs. Use GetShippingMethods to get methods by country. |
Processing Requirements
Orders can now be created before model processing has finished, but only in specific project configurations.
- Some projects allow the API to accept orders for models that are still processing.
- Other projects reject orders that contain unprocessed models.
- Projects that use immediate payment flows such as Stripe Checkout or AfterPay still require final processed pricing, so pending models remain blocked in those flows.
This means pending-model ordering is intended for deferred payment or non-immediate payment workflows.
Example Request
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",
"countryState": "NY",
"models": [
{
"modelId": "123e4567-e89b-12d3-a456-426614174000",
"quantity": 2
},
{
"modelId": "223e4567-e89b-12d3-a456-426614174000",
"quantity": 1
}
],
"shippingMethod": 2503
}'
fetch('https://devapi.marketiger3d.com/v2/Order/CreateOrder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
},
body: JSON.stringify({
firstName: 'John',
lastName: 'Doe',
streetAddress: '123 Main St',
postal: '10001',
phoneNumber: '+1234567890',
email: 'customer@example.com',
city: 'New York',
country: 'US',
countryState: 'NY',
models: [
{
modelId: '123e4567-e89b-12d3-a456-426614174000',
quantity: 2
},
{
modelId: '223e4567-e89b-12d3-a456-426614174000',
quantity: 1
}
],
shippingMethod: 2503
})
})
.then(response => response.json())
.then(data => {
if (data.success) {
const orderId = data.data.orderId;
console.log('Order created:', orderId);
}
})
.catch(error => console.error('Error:', error));
var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "YOUR_ACCESS_TOKEN");
var orderRequest = new {
firstName = "John",
lastName = "Doe",
streetAddress = "123 Main St",
postal = "10001",
phoneNumber = "+1234567890",
email = "customer@example.com",
city = "New York",
country = "US",
countryState = "NY",
models = new[] {
new { modelId = "123e4567-e89b-12d3-a456-426614174000", quantity = 2 },
new { modelId = "223e4567-e89b-12d3-a456-426614174000", quantity = 1 }
},
shippingMethod = 2503
};
var request = new HttpRequestMessage(HttpMethod.Post, "https://devapi.marketiger3d.com/v2/Order/CreateOrder");
request.Content = new StringContent(JsonSerializer.Serialize(orderRequest), Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var responseContent = await response.Content.ReadAsStringAsync();
var result = JsonSerializer.Deserialize<APIResponse<CreateOrderResponse>>(responseContent);
if (result.Success)
{
var orderId = result.Data.OrderId;
}
Response
Success Response (200 OK)
{
"success": true,
"data": {
"message": "Successfully ordered items",
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"paymentUrl": "https://checkout.stripe.com/pay/cs_test_123"
}
}
Response Schema
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the request succeeded |
| data | object | Response data |
| data.message | string | Success message |
| data.orderId | string | Unique identifier (GUID) of the created order |
| data.paymentUrl | string | Payment URL when Stripe Checkout is enabled; omitted otherwise |
Error Response (400 Bad Request)
{
"success": false,
"error": {
"type": "AUTHENTICATION",
"message": "User email not found"
}
}
{
"success": false,
"error": {
"type": "AUTHENTICATION",
"message": "User not found"
}
}
{
"success": false,
"error": {
"type": "INCORRECT_PARAMETERS",
"message": "OrderDetails are missing"
}
}
{
"success": false,
"error": {
"type": "INCORRECT_PARAMETERS",
"message": "No firstName specified"
}
}
{
"success": false,
"error": {
"type": "INCORRECT_PARAMETERS",
"message": "No models provided in the order."
}
}
{
"success": false,
"error": {
"type": "OPERATION_FAILED",
"message": "Order not found after creation."
}
}
{
"success": false,
"error": {
"type": "OPERATION_FAILED",
"message": "Model not found"
}
}
{
"success": false,
"error": {
"type": "OPERATION_FAILED",
"message": "Models belong to different projects"
}
}
{
"success": false,
"error": {
"type": "OPERATION_FAILED",
"message": "Email not confirmed, confirm your email before creating a order"
}
}
Error Response (No permission)
When receiving this error contact us so we can give your project permission to place orders.
{
"success": false,
"error": {
"type": "NO_PERMISSION",
"message": "This project is not setup for creating orders with the api contact us."
}
}
Error Codes
| Error Type | Status | Description |
|---|---|---|
| AUTHENTICATION | 400 | User not found or email not confirmed |
| INCORRECT_PARAMETERS | 400 | Missing required fields or invalid values |
| OPERATION_FAILED | 400 | Model not found, models from different projects, or other operation errors |
| NO_PERMISSION | 400 | Project doesn't allow API orders |
Notes
- Email confirmation: The user's email must be confirmed before creating orders
- Model requirements: All models in each order must belong to the same project - you cannot mix models from different projects in a single order
- Pending model orders: Some projects allow models that are still processing to be ordered, while others reject them
- Immediate payment flows: Stripe Checkout and AfterPay still block orders for pending models because final processed pricing is required
- Country codes: Use ISO country codes (2-3 characters, e.g., "US", "GB", "NL")
- Shipping method: You must provide a valid shipping method ID. See the Shipping Methods page for available IDs, or use GetShippingMethods to get methods by country
- Payment URL:
paymentUrlis returned only when Stripe Checkout is enabled for the project; otherwise the field is omitted from the response
Best Practices
- Validate input: Validate all required fields before sending the request
- Get shipping methods: See the Shipping Methods page for available shipping method IDs, or call GetShippingMethods to retrieve available shipping methods for the destination country before creating an order
- Check model availability: Verify models exist before ordering, and only rely on pending-model orders in projects where that flow is supported
- Handle errors: Implement comprehensive error handling for all error types
- Store order ID: Save the returned order ID for tracking and reference
- Email confirmation: Ensure user email is confirmed before allowing order creation
- Model validation: Ensure all models belong to the same project - mixing models from different projects in a single order will result in an error