Skip to main content

Production Deployment

This guide explains how to move from development testing to production deployment with the Marketiger API.

Development vs Production Environments​

Marketiger provides two separate environments for development and production:

Development Environment​

Use the development environment for testing and integration development:

  • API Base URL: https://devapi.marketiger3d.com/v2
  • Hub URL: https://devhub.marketiger3d.com

The development environment allows you to:

  • Test API integrations without affecting production data
  • Experiment with different configurations
  • Validate your integration before going live
  • Note: Orders placed in the development environment are for testing purposes only

Production Environment​

Use the production environment for live operations:

  • API Base URL: https://api.marketiger3d.com/v2
  • Hub URL: https://hub.marketiger3d.com

The production environment is where you:

  • Upload actual models for production
  • Place real orders that will be fulfilled
  • Manage live customer orders
  • Access production data and analytics

Switching from Development to Production​

Step 1: Update Your API Base URL​

To move from development to production, simply change your API base URL in your application configuration:

Development:

const baseUrl = 'https://devapi.marketiger3d.com/v2';

Production:

const baseUrl = 'https://api.marketiger3d.com/v2';

Example in code:

// Configuration
const config = {
development: {
apiUrl: 'https://devapi.marketiger3d.com/v2',
hubUrl: 'https://devhub.marketiger3d.com'
},
production: {
apiUrl: 'https://api.marketiger3d.com/v2',
hubUrl: 'https://hub.marketiger3d.com'
}
};

// Use environment variable to switch
const environment = process.env.NODE_ENV || 'development';
const baseUrl = config[environment].apiUrl;

Step 2: Update All API Calls​

Make sure all your API calls use the production base URL:

# Development
curl -X GET "https://devapi.marketiger3d.com/v2/Project/GetProjects" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

# Production
curl -X GET "https://api.marketiger3d.com/v2/Project/GetProjects" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Account Management​

Separate Accounts Required​

Important: Development and production environments maintain separate user accounts. This means:

  1. You must create a separate account on each environment:

  2. Your credentials are independent:

    • Development credentials work only on devapi.marketiger3d.com/v2 and devhub.marketiger3d.com
    • Production credentials work only on api.marketiger3d.com/v2 and hub.marketiger3d.com
  3. You'll need to authenticate separately:

    # Development authentication
    curl -X POST "https://devapi.marketiger3d.com/v2/Auth/Login" \
    -H "Content-Type: application/json" \
    -d '{"email": "dev-email@example.com", "password": "dev-password"}'

    # Production authentication
    curl -X POST "https://api.marketiger3d.com/v2/Auth/Login" \
    -H "Content-Type: application/json" \
    -d '{"email": "prod-email@example.com", "password": "prod-password"}'

Project Management​

Projects Are Environment-Specific​

Projects are assigned to user accounts, and these assignments are separate for development and production:

  1. Project Assignment:

    • Projects must be assigned to your account on both environments
    • A project assigned to your account in development does NOT automatically appear in production
    • You need to request project access separately for each environment
  2. Project ID Consistency:

    • Important: The Project ID (GUID) is the same for both development and production environments
    • This means you can use the same Project ID in your code regardless of which environment you're targeting
    • Example: If your Project ID is 123e4567-e89b-12d3-a456-426614174000, it will be the same in both dev and production

Example Workflow​

// Your Project ID remains constant across environments
const PROJECT_ID = '123e4567-e89b-12d3-a456-426614174000';

// Development
const devBaseUrl = 'https://devapi.marketiger3d.com/v2';
const devToken = 'your-dev-token';

// Production
const prodBaseUrl = 'https://api.marketiger3d.com/v2';
const prodToken = 'your-prod-token';

// Same Project ID works in both environments
async function getFolders(environment = 'dev') {
const baseUrl = environment === 'dev' ? devBaseUrl : prodBaseUrl;
const token = environment === 'dev' ? devToken : prodToken;

const response = await fetch(
`${baseUrl}/Folder/GetFolders?projectId=${PROJECT_ID}`,
{
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
}
}
);

return response.json();
}

Best Practices​

1. Test Thoroughly in Development​

Before switching to production:

  • Test all API endpoints in the development environment
  • Verify authentication and authorization flows
  • Test order creation workflows
  • Validate error handling

2. Use Environment Variables​

Store your API URLs and credentials in environment variables:

# .env.development
API_BASE_URL=https://devapi.marketiger3d.com/v2
HUB_URL=https://devhub.marketiger3d.com

# .env.production
API_BASE_URL=https://api.marketiger3d.com/v2
HUB_URL=https://hub.marketiger3d.com

3. Verify Project Access​

Before deploying to production:

  • Confirm your account has access to the required projects
  • Verify project assignments with Marketiger
  • Test API calls with your production credentials

4. Monitor Both Environments​

Keep track of:

  • API usage in both environments
  • Any differences in behavior between dev and production
  • Project assignments and access permissions

Summary​

  • Development: Use devapi.marketiger3d.com/v2 and devhub.marketiger3d.com for testing
  • Production: Use api.marketiger3d.com and hub.marketiger3d.com for live operations
  • Accounts: Create separate accounts on both environments
  • Projects: Projects must be assigned separately on each environment
  • Project IDs: The same Project ID (GUID) works in both environments
  • Switching: Simply change your API base URL to move from dev to production

Need Help?​

If you need assistance with production deployment:

  • Contact Marketiger to ensure proper project assignments
  • Verify your account has the necessary permissions
  • Review the Getting Started guide for API basics
  • Check the Authentication documentation for credential management