Flow A: Order + image
For integrations where checkout or purchase happens first and MGE receives the DOT SKU plus customer image for production.
line_items[].asset_urlor asset_token from draft asset upload
Choose the API flow by the experience your B2B integration needs to provide.
Choose the user experience first, then choose how the order is submitted. Testing endpoints are dry-run tools during integration, not a separate product flow.
This choice decides what data goes into line_items[]. It does not decide whether you submit as a draft or direct order.
For integrations where checkout or purchase happens first and MGE receives the DOT SKU plus customer image for production.
line_items[].asset_urlFor richer storefronts where the user chooses from generated previews before checkout. More user experience, more integration work.
line_items[].preview_option_idAfter the line item is built from either source mode, submit it using one production path. Use test endpoints during integration checks.
Use when the integration is ready to create the order in one request.
Use when the integration needs a cart, review, asset upload, or checkout step before final submission.
{
"brand_id": 116,
"line_items": [
{
"sku": "DOT/VF/40X50/W/BLACK/STD",
"quantity": 1,
"asset_url": "https://cdn.example.com/customer-photo.jpg",
"asset_params": {
"source_width": 3000,
"source_height": 4000,
"crop_mode": "auto_allowed"
}
}
],
"shipping": {
"name": "Customer Name",
"email": "[email protected]",
"phone": "+65 0000 0000",
"street": "123 Example Street",
"city": "Singapore",
"zip": "000000",
"country": "SG"
}
}
{
"brand_id": 116,
"line_items": []
}
POST /api/v1/order-drafts/{id}/assets/ (multipart/form-data)
[email protected]
PATCH /api/v1/order-drafts/{id}/
{
"brand_id": 116,
"line_items": [
{
"sku": "DOT/VF/40X50/W/BLACK/STD",
"quantity": 1,
"asset_token": "22222222-2222-2222-2222-222222222222",
"asset_params": {
"source_width": 3000,
"source_height": 4000,
"crop_mode": "auto_allowed"
}
}
],
"shipping": {
"name": "Customer Name",
"email": "[email protected]",
"phone": "+65 0000 0000",
"street": "123 Example Street",
"city": "Singapore",
"zip": "000000",
"country": "SG"
}
}
brand_id=116
products=["DOT"]
comparison_count=1
auto_enhance=true
auto_crop=true
preferred_size="40X50"
preview_options={"DOT":[{"variant":"source"},{"variant":"drama"}]}
{
"preview_id": "00000000-0000-0000-0000-000000000000",
"purchase_options": [
{
"preview_option_id": "11111111-1111-1111-1111-111111111111",
"order_line": {
"sku": "DOT/VF/40X50/W/BLACK/STD",
"quantity": 1,
"preview_option_id": "11111111-1111-1111-1111-111111111111"
},
"unit_price": "0.00",
"currency": "EUR"
}
]
}
{
"brand_id": 116,
"line_items": [
{
"sku": "DOT/VF/40X50/W/BLACK/STD",
"quantity": 1,
"preview_option_id": "11111111-1111-1111-1111-111111111111"
}
],
"shipping": {
"name": "Customer Name",
"email": "[email protected]",
"phone": "+65 0000 0000",
"street": "123 Example Street",
"city": "Singapore",
"zip": "000000",
"country": "SG"
}
}
{
"brand_id": 116,
"line_items": [
{
"sku": "DOT/VF/40X50/W/BLACK/STD",
"quantity": 1,
"preview_option_id": "11111111-1111-1111-1111-111111111111"
}
],
"shipping": {
"name": "Customer Name",
"email": "[email protected]",
"phone": "+65 0000 0000",
"street": "123 Example Street",
"city": "Singapore",
"zip": "000000",
"country": "SG"
}
}
POST /api/v1/order-drafts/{id}/submit/
preview_option_id belongs inside the selected line item.
{
"brand_id": 116,
"preview_option_id": "1111...",
"line_items": [
{"sku": "DOT/VF/..."}
]
}{
"brand_id": 116,
"line_items": [
{
"sku": "DOT/VF/...",
"preview_option_id": "1111..."
}
]
}purchase_option_id. Copy the returned order_line.
{
"line_items": [
{"purchase_option_id": "po_123"}
]
}{
"line_items": [
{
"sku": "DOT/VF/...",
"quantity": 1,
"preview_option_id": "1111..."
}
]
}{
"shipping": {
"line1": "123 Example Street",
"postal_code": "000000"
}
}{
"shipping": {
"street": "123 Example Street",
"zip": "000000"
}
}{
"sku": "DOT/VF/...",
"asset_url": "https://cdn.example.com/photo.jpg",
"preview_option_id": "1111..."
}{
"sku": "DOT/VF/...",
"asset_url": "https://cdn.example.com/photo.jpg"
}This page is the visual DOT guide. Use Swagger for the full auto-updating endpoint schemas.