Skip to content

Draft orders

Draft orders. Every example sets SOOQUNA_TOKEN from the environment; see authentication. Responses are from a test store, cut to two items per list.

Endpoint Method Path
Price a draft order without saving it POST /draft-orders/calculate
Create a draft order POST /draft-orders
List draft orders GET /draft-orders
Get a draft order GET /draft-orders/{id}
Update a draft order PUT /draft-orders/{id}
Turn a draft into an order POST /draft-orders/{id}/complete
Delete a draft order DELETE /draft-orders/{id}

POST /draft-orders/calculate · Scope: write_draft_orders

Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/draft-orders/calculate" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "0193a1b2-c3d4-7e5f-8a6b-000000000007",
"lines": [
{
"variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014",
"quantity": 1
}
],
"shipping": {"title": "Doha delivery", "price": "15.00"}
}'
Response 200
{
"billing_address": null,
"completed_at": null,
"created_at": "2026-10-18T09:30:00Z",
"currency": "QAR",
"customer": {
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000007",
"name": "Noora Al-Kuwari",
"orders_count": 0,
"phone": "+97455123456"
},
"discount": null,
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000018",
"item_count": 1,
"lines": [
{
"available": 5,
"custom": false,
"discount": null,
"discount_amount": "0.00",
"image": "",
"missing": false,
"price": "450.00",
"product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005",
"quantity": 1,
"requires_shipping": true,
"sku": "ABY-LIN-M",
"taxable": true,
"title": "Embroidered linen abaya",
"total": "450.00",
"variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014",
"variant_title": "M"
}
],
"name": "#D0",
"note": "",
"order_discount": "0.00",
"order_id": null,
"order_name": "",
"phone": "+97455123456",
"shipping": {"price": "15.00", "title": "Doha delivery"},
"shipping_address": null,
"shipping_total": "15.00",
"status": "open",
"subtotal": "450.00",
"tags": [],
"tax": "0.00",
"tax_exempt": false,
"tax_lines": [],
"taxes_included": true,
"total": "465.00",
"updated_at": "2026-10-18T09:30:00Z",
"version": 0
}

POST /draft-orders · Scope: write_draft_orders · Needs an Idempotency-Key header

Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/draft-orders" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "0193a1b2-c3d4-7e5f-8a6b-000000000007",
"email": "[email protected]",
"lines": [
{
"variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014",
"quantity": 2
},
{
"custom": {
"title": "Gift wrapping",
"price": "20.00",
"taxable": false,
"requires_shipping": false
},
"quantity": 1
}
],
"shipping": {"title": "Doha delivery", "price": "15.00"},
"shipping_address": {
"first_name": "Noora",
"last_name": "Al-Kuwari",
"address1": "Zone 66, Street 801, Building 12",
"city": "Doha",
"country_code": "QA",
"phone": "+97455123456"
},
"note": "Phone order",
"tags": ["phone"]
}'
Response 201
{
"billing_address": null,
"completed_at": null,
"created_at": "2026-10-18T09:30:00Z",
"currency": "QAR",
"customer": {
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000007",
"name": "Noora Al-Kuwari",
"orders_count": 0,
"phone": "+97455123456"
},
"discount": null,
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000013",
"item_count": 3,
"lines": [
{
"available": 5,
"custom": false,
"discount": null,
"discount_amount": "0.00",
"image": "",
"missing": false,
"price": "450.00",
"product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005",
"quantity": 2,
"requires_shipping": true,
"sku": "ABY-LIN-M",
"taxable": true,
"title": "Embroidered linen abaya",
"total": "900.00",
"variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014",
"variant_title": "M"
},
{
"available": null,
"custom": true,
"discount": null,
"discount_amount": "0.00",
"image": "",
"missing": false,
"price": "20.00",
"product_id": null,
"quantity": 1,
"requires_shipping": false,
"sku": "",
"taxable": false,
"title": "Gift wrapping",
"total": "20.00",
"variant_id": null,
"variant_title": ""
}
],
"name": "#D1",
"note": "Phone order",
"order_discount": "0.00",
"order_id": null,
"order_name": "",
"phone": "+97455123456",
"shipping": {"price": "15.00", "title": "Doha delivery"},
"shipping_address": {
"address1": "Zone 66, Street 801, Building 12",
"address2": "",
"city": "Doha",
"company": "",
"country_code": "QA",
"extra": null,
"first_name": "Noora",
"last_name": "Al-Kuwari",
"latitude": null,
"longitude": null,
"phone": "+97455123456",
"province_code": "",
"zip": ""
},
"shipping_total": "15.00",
"status": "open",
"subtotal": "920.00",
"tags": ["phone"],
"tax": "0.00",
"tax_exempt": false,
"tax_lines": [],
"taxes_included": true,
"total": "935.00",
"updated_at": "2026-10-18T09:30:00Z",
"version": 1
}

GET /draft-orders · Scope: read_draft_orders

Parameter In Description
status query For example open.
limit query For example 10.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/draft-orders?status=open&limit=10" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"data": [
{
"currency": "QAR",
"customer": {
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000007",
"name": "Noora Al-Kuwari",
"orders_count": 0,
"phone": "+97455123456"
},
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000013",
"item_count": 3,
"name": "#D1",
"order_id": null,
"order_name": "",
"status": "open",
"total": "935.00",
"updated_at": "2026-10-18T09:30:00Z"
}
],
"total": 1
}

GET /draft-orders/{id} · Scope: read_draft_orders

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/draft-orders/0193a1b2-c3d4-7e5f-8a6b-000000000013" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{
"billing_address": null,
"completed_at": null,
"created_at": "2026-10-18T09:30:00Z",
"currency": "QAR",
"customer": {
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000007",
"name": "Noora Al-Kuwari",
"orders_count": 0,
"phone": "+97455123456"
},
"discount": null,
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000013",
"item_count": 3,
"lines": [
{
"available": 5,
"custom": false,
"discount": null,
"discount_amount": "0.00",
"image": "",
"missing": false,
"price": "450.00",
"product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005",
"quantity": 2,
"requires_shipping": true,
"sku": "ABY-LIN-M",
"taxable": true,
"title": "Embroidered linen abaya",
"total": "900.00",
"variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014",
"variant_title": "M"
},
{
"available": null,
"custom": true,
"discount": null,
"discount_amount": "0.00",
"image": "",
"missing": false,
"price": "20.00",
"product_id": null,
"quantity": 1,
"requires_shipping": false,
"sku": "",
"taxable": false,
"title": "Gift wrapping",
"total": "20.00",
"variant_id": null,
"variant_title": ""
}
],
"name": "#D1",
"note": "Phone order",
"order_discount": "0.00",
"order_id": null,
"order_name": "",
"phone": "+97455123456",
"shipping": {"price": "15.00", "title": "Doha delivery"},
"shipping_address": {
"address1": "Zone 66, Street 801, Building 12",
"address2": "",
"city": "Doha",
"company": "",
"country_code": "QA",
"extra": null,
"first_name": "Noora",
"last_name": "Al-Kuwari",
"latitude": null,
"longitude": null,
"phone": "+97455123456",
"province_code": "",
"zip": ""
},
"shipping_total": "15.00",
"status": "open",
"subtotal": "920.00",
"tags": ["phone"],
"tax": "0.00",
"tax_exempt": false,
"tax_lines": [],
"taxes_included": true,
"total": "935.00",
"updated_at": "2026-10-18T09:30:00Z",
"version": 1
}

PUT /draft-orders/{id} · Scope: write_draft_orders

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/draft-orders/0193a1b2-c3d4-7e5f-8a6b-000000000013" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"customer_id": "0193a1b2-c3d4-7e5f-8a6b-000000000007",
"email": "[email protected]",
"lines": [
{
"variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014",
"quantity": 1
}
],
"shipping": {"title": "Doha delivery", "price": "15.00"},
"discount": {"type": "percentage", "value": "10", "title": "Loyal customer"},
"version": 1
}'
Response 200
{
"billing_address": null,
"completed_at": null,
"created_at": "2026-10-18T09:30:00Z",
"currency": "QAR",
"customer": {
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000007",
"name": "Noora Al-Kuwari",
"orders_count": 0,
"phone": "+97455123456"
},
"discount": {"title": "Loyal customer", "type": "percentage", "value": "10"},
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000013",
"item_count": 1,
"lines": [
{
"available": 5,
"custom": false,
"discount": null,
"discount_amount": "0.00",
"image": "",
"missing": false,
"price": "450.00",
"product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005",
"quantity": 1,
"requires_shipping": true,
"sku": "ABY-LIN-M",
"taxable": true,
"title": "Embroidered linen abaya",
"total": "450.00",
"variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014",
"variant_title": "M"
}
],
"name": "#D1",
"note": "",
"order_discount": "45.00",
"order_id": null,
"order_name": "",
"phone": "+97455123456",
"shipping": {"price": "15.00", "title": "Doha delivery"},
"shipping_address": null,
"shipping_total": "15.00",
"status": "open",
"subtotal": "450.00",
"tags": [],
"tax": "0.00",
"tax_exempt": false,
"tax_lines": [],
"taxes_included": true,
"total": "420.00",
"updated_at": "2026-10-18T09:30:00Z",
"version": 2
}

POST /draft-orders/{id}/complete · Scope: write_draft_orders · Needs an Idempotency-Key header

payment_pending true creates an unpaid order (cash on delivery, bank transfer).

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/draft-orders/0193a1b2-c3d4-7e5f-8a6b-000000000013/complete" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"payment_pending": true}'
Response 200
{
"attributes": {},
"billing_address": null,
"buyer_accepts_marketing": false,
"cancel_reason": "",
"cancelled_at": null,
"checkout_id": null,
"closed_at": null,
"cod_status": "",
"created_at": "2026-10-18T09:30:00Z",
"currency": "QAR",
"customer": {
"email": "[email protected]",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000007",
"name": "Noora Al-Kuwari",
"orders_count": 1,
"phone": "+97455123456"
},
"delivery_method": "shipping",
"delivery_title": "Doha delivery",
"discount_applications": [],
"discount_codes": [],
"draft_order_id": "0193a1b2-c3d4-7e5f-8a6b-000000000013",
"email": "[email protected]",
"financial_status": "pending",
"fulfillment_orders": [
{
"delivery_method": "shipping",
"hold_reason": "",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000036",
"lines": [
{
"line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037",
"quantity": 1,
"remaining": 1
}
],
"location": {
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000023",
"name": "West Bay shop"
},
"status": "open"
}
],
"fulfillment_status": "unfulfilled",
"fulfillments": [],
"gift": false,
"gift_message": "",
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000035",
"item_count": 1,
"lines": [
{
"discount_allocations": [{"amount": 4500, "class": "order", "title": "Loyal customer"}],
"fulfilled_quantity": 0,
"gift_card": false,
"id": "0193a1b2-c3d4-7e5f-8a6b-000000000037",
"image": "",
"location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023",
"original_price": "520.00",
"price": "450.00",
"product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005",
"properties": {},
"quantity": 1,
"refunded_quantity": 0,
"requires_shipping": true,
"sku": "ABY-LIN-M",
"tax": "0.00",
"tax_lines": [],
"taxable": true,
"title": "Embroidered linen abaya",
"total": "405.00",
"total_discount": "45.00",
"variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014",
"variant_title": "M",
"vendor": "Layla",
"weight_grams": 0
}
],
"locale": "en",
"name": "#1001",
"net_payment": "0.00",
"note": "",
"number": 1001,
"order_discount": "45.00",
"payment_fee": "0.00",
"payment_method": "manual",
"phone": "+97455123456",
"processed_at": "2026-10-18T09:30:00Z",
"refunds": [],
"sample": false,
"shipping_address": null,
"shipping_line": {
"final": 1500,
"kind": "shipping",
"price": 1500,
"title": "Doha delivery"
},
"source": "draft",
"state": "open",
"status_url": "https://shop.sooquna.test/orders/01a14f9f314a7de682d35010a325f162",
"subtotal": "450.00",
"tags": [],
"tax_lines": [],
"taxes_included": true,
"tip": "0.00",
"token": "01a14f9f314a7de682d35010a325f162",
"total": "420.00",
"total_discounts": "45.00",
"total_outstanding": "420.00",
"total_received": "0.00",
"total_refunded": "0.00",
"total_shipping": "15.00",
"total_tax": "0.00",
"transactions": [],
"updated_at": "2026-10-18T09:30:00Z",
"version": 2
}

DELETE /draft-orders/{id} · Scope: write_draft_orders

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/draft-orders/0193a1b2-c3d4-7e5f-8a6b-000000000013" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

Was this page helpful?