Skip to main content

Your First Product Deployment

This tutorial will walk you through deploying your first product to an e-commerce platform using the Dodgeprint API.

What You'll Learn

By the end of this tutorial, you'll know how to:

  • Authenticate with the API
  • Gather required data from various endpoints
  • Submit a product deployment request
  • Verify deployment success

Prerequisites

Before starting, make sure you have:

  • ✅ Dodgeprint account
  • ✅ At least one connected e-commerce platform (Etsy, TikTok Shop, or Amazon)
  • ✅ At least one product in your Dodgeprint catalog
  • ✅ Basic knowledge of REST APIs and cURL

Time Required: ~15 minutes


Step 1: Get Your API Token

If you haven't already, get your API credentials:

  1. Log in to https://app.dodgeprint.com
  2. Go to SettingsAPI Access
  3. Click Generate New Token
  4. Name it "Tutorial Token"
  5. Copy and save the token

Need detailed instructions? See Authentication Guide


Step 2: Set Up Environment Variables

Store your credentials in environment variables for easy reuse:

export DODGEPRINT_TOKEN="your-token-here"
export DODGEPRINT_WORKSPACE_ID="your-workspace-id"
export DODGEPRINT_API="https://api.dodgeprint.com/api/v1"

Step 3: Test Your Connection

Verify your credentials work:

curl -X GET "$DODGEPRINT_API/user" \
-H "Authorization: Bearer $DODGEPRINT_TOKEN" \
-H "X-Workspace-Id: $DODGEPRINT_WORKSPACE_ID"

Expected Response:

{
"success": true,
"data": {
"id": 10062,
"email": "[email protected]",
"name": "Your Name"
}
}

Success! Your credentials are working.


Step 4: Find Your Site

Get the list of your connected e-commerce sites:

Platform IDs
  • Etsy: platform_id=1
  • TikTok: platform_id=4
  • Amazon: platform_id=5
  • Shopify: platform_id=6
# Get Etsy sites (platform_id=1)
curl -X GET "$DODGEPRINT_API/sites?platform_id=1" \
-H "Authorization: Bearer $DODGEPRINT_TOKEN" \
-H "X-Workspace-Id: $DODGEPRINT_WORKSPACE_ID"

Response:

{
"success": true,
"data": [
{
"id": 6529,
"name": "My Etsy Shop",
"platform_id": 1,
"platform_name": "Etsy",
"shop_id": "12345678",
"is_active": true
}
]
}

📝 Note down your site_id: 6529

No Sites?

If you don't have any sites, connect one first:

  1. Go to Dashboard
  2. Navigate to SitesConnect New Site
  3. Follow the OAuth flow to connect your platform

Step 5: Get Your Product

Find a product to deploy:

curl -X GET "$DODGEPRINT_API/products?limit=5" \
-H "Authorization: Bearer $DODGEPRINT_TOKEN" \
-H "X-Workspace-Id: $DODGEPRINT_WORKSPACE_ID"

Response:

{
"success": true,
"data": [
{
"id": 1635986,
"name": "Custom Canvas Print - Sunset Collection",
"sku": "CANVAS-SUNSET-001",
"status": "active"
}
]
}

📝 Note down your product_id: 1635986


Step 6: Get Variant Group Data

Retrieve the variant configuration for your product:

curl -X GET "$DODGEPRINT_API/group-variants/4028" \
-H "Authorization: Bearer $DODGEPRINT_TOKEN" \
-H "X-Workspace-Id: $DODGEPRINT_WORKSPACE_ID"

Response:

{
"success": true,
"data": {
"id": 4028,
"headers": [
{"key": "variant0", "name": "Size"},
{"key": "variant1", "name": "Frame Style"}
],
"childs": [
{
"id": 505660,
"variant0": "24x36 inch",
"variant1": "Black Frame",
"price": 45.99,
"quantity": 100
},
{
"id": 505661,
"variant0": "18x24 inch",
"variant1": "White Frame",
"price": 35.99,
"quantity": 150
}
],
"category": {
"id": 2197,
"taxonomy_id": "1027"
}
}
}

📋 Save this entire data object - you'll need it in the next step.


Step 7: Get Content Template (Optional)

When Do I Need This?
  • TikTok Shop: ✅ Required
  • Etsy: Optional
  • Amazon: Optional

If deploying to TikTok Shop, get a content template:

curl -X GET "$DODGEPRINT_API/contents" \
-H "Authorization: Bearer $DODGEPRINT_TOKEN" \
-H "X-Workspace-Id: $DODGEPRINT_WORKSPACE_ID"

Response:

{
"data": [
{
"id": 2414,
"name": "Standard Product Description",
"content": "<p>High quality product...</p>"
}
]
}

📝 Note down content_id: 2414


Step 8: Get Platform-Specific Requirements

For Etsy deployments, you need shipping and return policy IDs:

Shipping Profile

curl -X GET "$DODGEPRINT_API/shipping-profiles?site_id=6529" \
-H "Authorization: Bearer $DODGEPRINT_TOKEN" \
-H "X-Workspace-Id: $DODGEPRINT_WORKSPACE_ID"

Response:

{
"data": [
{
"id": 6811,
"name": "Standard Shipping"
}
]
}

📝 Note down shipping_profile_id: 6811

Return Policy

curl -X GET "$DODGEPRINT_API/return-policies?site_id=6529" \
-H "Authorization: Bearer $DODGEPRINT_TOKEN" \
-H "X-Workspace-Id: $DODGEPRINT_WORKSPACE_ID"

Response:

{
"data": [
{
"id": 5,
"accepts_returns": true
}
]
}

📝 Note down return_policy_id: 5


Step 9: Deploy Your Product!

Now put it all together and deploy:

Create deployment.json

{
"type": "insert",
"site_id": 6529,
"content_id": 2414,
"selected": [1635986],
"variants": {
"id": 4028,
"headers": [
{"key": "variant0", "name": "Size"},
{"key": "variant1", "name": "Frame Style"}
],
"childs": [
{
"id": 505660,
"variant0": "24x36 inch",
"variant1": "Black Frame",
"price": 45.99,
"quantity": 100
},
{
"id": 505661,
"variant0": "18x24 inch",
"variant1": "White Frame",
"price": 35.99,
"quantity": 150
}
],
"category": {
"id": 2197,
"taxonomy_id": "1027"
}
},
"shipping_profile_id": 6811,
"return_policy_id": 5,
"tags": ["Canvas Print", "Wall Art", "Sunset"],
"when_made": "made_to_order",
"who_made": "i_did",
"is_supply": false
}

Submit Deployment

curl -X POST "$DODGEPRINT_API/deploy-product" \
-H "Authorization: Bearer $DODGEPRINT_TOKEN" \
-H "X-Workspace-Id: $DODGEPRINT_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d @deployment.json

Success Response:

{
"success": true,
"message": "Product deployment initiated successfully",
"data": {
"product_on_site_id": 123456,
"status": "pending",
"estimated_time": "5-15 seconds"
}
}

🎉 Congratulations! Your product is being deployed.


Step 10: Verify Deployment

Wait 5-15 seconds, then check your platform:

  1. Go to your Etsy shop admin (or respective platform)
  2. Navigate to Listings
  3. Look for your new listing

You should see your product with:

  • ✅ Product title and description
  • ✅ Variants (sizes, colors, etc.)
  • ✅ Pricing
  • ✅ Images
  • ✅ Inventory quantities

Troubleshooting

Error: 400 - Validation Error

Possible causes:

  • Missing required fields for your platform
  • Invalid variant structure
  • Incorrect ID values

Solution: Review the platform-specific requirements in the Deployment Guide for your platform.

Error: 403 - Access Denied

Possible causes:

  • Invalid X-Workspace-Id
  • Site doesn't belong to your workspace

Solution: Verify your workspace ID and site ownership.

Error: 500 - Server Error

Possible causes:

  • Platform API is down
  • Temporary connectivity issue

Solution: Wait 5 minutes and retry. If persists, contact support.


What's Next?

Now that you've deployed your first product, try:

  1. Update deployment: Change prices or inventory

    {
    "type": "update_partial",
    ...
    }
  2. Deploy to multiple platforms: Repeat for TikTok Shop or Amazon

  3. Bulk deploy: Deploy multiple products at once

    {
    "selected": [1001, 1002, 1003],
    ...
    }
  4. Explore automation: Build workflows for automated deployments


Additional Resources


Need Help?

If you get stuck:


Congratulations on completing your first deployment! 🎉