Shipping rule management, tax configuration, and fulfillment optimization using direct Wix REST API calls.
From wix-ecom-coworknpx claudepluginhub itayher/wix-ecom-cowork --plugin wix-ecom-coworkThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Shipping rule management, tax configuration, and fulfillment optimization using direct Wix REST API calls.
df7c18eb-009b-4868-9891-15e19dddbe67${API_KEY}${SITE_ID}Endpoint: POST https://www.wixapis.com/ecom/v1/shipping-rates/query
API Call:
curl -X POST "https://www.wixapis.com/ecom/v1/shipping-rates/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"paging": {
"limit": 50,
"offset": 0
}
}
}'
Response:
{
"shippingRates": [
{
"id": "rate-123",
"name": "Standard Shipping",
"code": "STANDARD",
"logistics": {
"deliveryTimeMin": 3,
"deliveryTimeMax": 5,
"deliveryTimeUnit": "DAYS"
},
"cost": {
"price": "9.99",
"currency": "USD"
},
"region": {
"countryCode": "US"
}
},
{
"id": "rate-456",
"name": "Express Shipping",
"code": "EXPRESS",
"logistics": {
"deliveryTimeMin": 1,
"deliveryTimeMax": 2,
"deliveryTimeUnit": "DAYS"
},
"cost": {
"price": "24.99",
"currency": "USD"
},
"region": {
"countryCode": "US"
}
}
],
"metadata": {
"count": 2,
"total": 2
}
}
Endpoint: GET https://www.wixapis.com/ecom/v1/shipping-rates/{rateId}
curl -X GET "https://www.wixapis.com/ecom/v1/shipping-rates/${RATE_ID}" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Accept: application/json"
Endpoint: POST https://www.wixapis.com/ecom/v1/shipping-rates
Standard Shipping:
curl -X POST "https://www.wixapis.com/ecom/v1/shipping-rates" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"shippingRate": {
"name": "Standard Shipping",
"code": "STANDARD",
"logistics": {
"deliveryTimeMin": 3,
"deliveryTimeMax": 5,
"deliveryTimeUnit": "DAYS"
},
"cost": {
"price": "9.99",
"currency": "USD"
},
"region": {
"countryCode": "US"
}
}
}'
Free Shipping (Over $50):
curl -X POST "https://www.wixapis.com/ecom/v1/shipping-rates" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"shippingRate": {
"name": "Free Shipping",
"code": "FREE",
"logistics": {
"deliveryTimeMin": 3,
"deliveryTimeMax": 7,
"deliveryTimeUnit": "DAYS"
},
"cost": {
"price": "0.00",
"currency": "USD"
},
"region": {
"countryCode": "US"
},
"conditions": {
"minSubtotal": "50.00"
}
}
}'
International Shipping:
curl -X POST "https://www.wixapis.com/ecom/v1/shipping-rates" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"shippingRate": {
"name": "International Shipping",
"code": "INTL",
"logistics": {
"deliveryTimeMin": 7,
"deliveryTimeMax": 14,
"deliveryTimeUnit": "DAYS"
},
"cost": {
"price": "29.99",
"currency": "USD"
},
"region": {
"countryCode": "CA"
}
}
}'
Endpoint: PATCH https://www.wixapis.com/ecom/v1/shipping-rates/{rateId}
curl -X PATCH "https://www.wixapis.com/ecom/v1/shipping-rates/${RATE_ID}" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"shippingRate": {
"cost": {
"price": "12.99"
}
}
}'
Endpoint: DELETE https://www.wixapis.com/ecom/v1/shipping-rates/{rateId}
curl -X DELETE "https://www.wixapis.com/ecom/v1/shipping-rates/${RATE_ID}" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}"
#!/bin/bash
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": "{\"paymentStatus\": \"PAID\"}",
"paging": {"limit": 1000}
}
}')
total_shipping=$(echo "$orders" | jq '[.orders[].priceSummary.shipping | tonumber] | add // 0')
order_count=$(echo "$orders" | jq '.orders | length')
avg_shipping=$(echo "$orders" | jq '[.orders[].priceSummary.shipping | tonumber] | add / length // 0')
echo "Shipping Cost Analysis"
echo "====================="
echo "Total Orders: $order_count"
echo "Total Shipping Collected: \$$total_shipping"
echo "Average Shipping per Order: \$$avg_shipping"
#!/bin/bash
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": "{\"paymentStatus\": \"PAID\"}",
"paging": {"limit": 1000}
}
}')
echo "Shipping Method Distribution"
echo "==========================="
echo ""
echo "$orders" | jq -r '
[.orders[] | {
method: (.shippingInfo.logistics.shippingOption.title // "Unknown"),
cost: (.priceSummary.shipping | tonumber)
}] |
group_by(.method) |
map({
method: .[0].method,
count: length,
total_revenue: ([.[].cost] | add)
}) |
sort_by(-.count) |
.[] |
"\(.method): \(.count) orders | Revenue: $\(.total_revenue)"
'
#!/bin/bash
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": "{\"paymentStatus\": \"PAID\"}",
"paging": {"limit": 1000}
}
}')
total_orders=$(echo "$orders" | jq '.orders | length')
free_shipping=$(echo "$orders" | jq '[.orders[] | select((.priceSummary.shipping | tonumber) == 0)] | length')
free_shipping_rate=$(echo "scale=2; $free_shipping / $total_orders * 100" | bc)
echo "Free Shipping Usage"
echo "==================="
echo "Total Orders: $total_orders"
echo "Free Shipping Orders: $free_shipping ($free_shipping_rate%)"
Endpoint: POST https://www.wixapis.com/tax-regions/v1/regions/query
curl -X POST "https://www.wixapis.com/tax-regions/v1/regions/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"paging": {
"limit": 50
}
}
}'
Response:
{
"taxRegions": [
{
"id": "region-123",
"country": "US",
"subdivision": "CA",
"name": "California",
"rate": 9.5,
"includeInPrice": false
}
]
}
#!/bin/bash
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": "{\"paymentStatus\": \"PAID\"}",
"paging": {"limit": 1000}
}
}')
total_tax=$(echo "$orders" | jq '[.orders[].priceSummary.tax | tonumber] | add // 0')
total_revenue=$(echo "$orders" | jq '[.orders[].priceSummary.total | tonumber] | add // 0')
effective_rate=$(echo "scale=2; $total_tax / $total_revenue * 100" | bc)
echo "Tax Collection Summary"
echo "====================="
echo "Total Tax Collected: \$$total_tax"
echo "Total Revenue: \$$total_revenue"
echo "Effective Tax Rate: $effective_rate%"
#!/bin/bash
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": "{\"paymentStatus\": \"PAID\"}",
"paging": {"limit": 1000}
}
}')
echo "Tax Collected by Region"
echo "======================="
echo ""
echo "$orders" | jq -r '
[.orders[] | {
state: (.shippingInfo.logistics.shippingDestination.address.subdivision // "Unknown"),
tax: (.priceSummary.tax | tonumber),
subtotal: (.priceSummary.subtotal | tonumber)
}] |
group_by(.state) |
map({
state: .[0].state,
orders: length,
tax_collected: ([.[].tax] | add),
subtotal: ([.[].subtotal] | add),
effective_rate: ([.[].tax] | add) / ([.[].subtotal] | add) * 100
}) |
sort_by(-.tax_collected) |
.[] |
"\(.state): \(.orders) orders | Tax: $\(.tax_collected) | Rate: \(.effective_rate | floor)%"
'
Note: This is a placeholder. Wix may have different APIs for fulfillment centers.
curl -X GET "https://www.wixapis.com/stores/v1/fulfillment-centers" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Accept: application/json"
#!/bin/bash
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": "{\"paymentStatus\": \"PAID\"}",
"paging": {"limit": 1000}
}
}')
echo "Orders by Shipping Destination"
echo "=============================="
echo ""
echo "$orders" | jq -r '
[.orders[] | {
country: (.shippingInfo.logistics.shippingDestination.address.country // "Unknown"),
total: (.priceSummary.total | tonumber)
}] |
group_by(.country) |
map({
country: .[0].country,
orders: length,
revenue: ([.[].total] | add)
}) |
sort_by(-.orders) |
.[] |
"\(.country): \(.orders) orders | $\(.revenue) revenue"
'
#!/bin/bash
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": "{\"paymentStatus\": \"PAID\"}",
"paging": {"limit": 1000}
}
}')
avg_subtotal=$(echo "$orders" | jq '[.orders[].priceSummary.subtotal | tonumber] | add / length')
echo "Free Shipping Threshold Recommendation"
echo "======================================"
echo ""
echo "Current Average Subtotal: \$$avg_subtotal"
echo ""
echo "Recommended Thresholds:"
echo " Conservative (10% lift): \$$(echo "$avg_subtotal * 1.1" | bc | cut -d. -f1)"
echo " Moderate (20% lift): \$$(echo "$avg_subtotal * 1.2" | bc | cut -d. -f1)"
echo " Aggressive (30% lift): \$$(echo "$avg_subtotal * 1.3" | bc | cut -d. -f1)"
#!/bin/bash
THRESHOLD=50
# Get recent carts or orders
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": "{\"paymentStatus\": \"PAID\"}",
"paging": {"limit": 100}
}
}')
echo "Orders Within \$10 of Free Shipping Threshold (\$$THRESHOLD)"
echo "========================================================="
echo ""
echo "$orders" | jq -r --argjson threshold "$THRESHOLD" '
[.orders[] | {
number: .number,
email: .buyerInfo.email,
subtotal: (.priceSummary.subtotal | tonumber),
gap: ($threshold - (.priceSummary.subtotal | tonumber))
}] |
map(select(.subtotal < $threshold and .gap <= 10 and .gap > 0)) |
.[] |
"Order #\(.number) - \(.email) - $\(.subtotal) subtotal (add $\(.gap) for free shipping)"
'
#!/bin/bash
# US: $9.99
curl -s -X POST "https://www.wixapis.com/ecom/v1/shipping-rates" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"shippingRate": {
"name": "US Shipping",
"code": "US_FLAT",
"logistics": {"deliveryTimeMin": 3, "deliveryTimeMax": 5, "deliveryTimeUnit": "DAYS"},
"cost": {"price": "9.99", "currency": "USD"},
"region": {"countryCode": "US"}
}
}' > /dev/null
# Canada: $14.99
curl -s -X POST "https://www.wixapis.com/ecom/v1/shipping-rates" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"shippingRate": {
"name": "Canada Shipping",
"code": "CA_FLAT",
"logistics": {"deliveryTimeMin": 5, "deliveryTimeMax": 10, "deliveryTimeUnit": "DAYS"},
"cost": {"price": "14.99", "currency": "USD"},
"region": {"countryCode": "CA"}
}
}' > /dev/null
echo "✓ Created flat rate shipping for US and Canada"
#!/bin/bash
# Free shipping over $50
curl -s -X POST "https://www.wixapis.com/ecom/v1/shipping-rates" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"shippingRate": {
"name": "Free Shipping",
"code": "FREE_50",
"logistics": {"deliveryTimeMin": 3, "deliveryTimeMax": 7, "deliveryTimeUnit": "DAYS"},
"cost": {"price": "0.00", "currency": "USD"},
"region": {"countryCode": "US"},
"conditions": {"minSubtotal": "50.00"}
}
}' > /dev/null
# Standard shipping
curl -s -X POST "https://www.wixapis.com/ecom/v1/shipping-rates" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"shippingRate": {
"name": "Standard Shipping",
"code": "STANDARD",
"logistics": {"deliveryTimeMin": 3, "deliveryTimeMax": 7, "deliveryTimeUnit": "DAYS"},
"cost": {"price": "9.99", "currency": "USD"},
"region": {"countryCode": "US"}
}
}' > /dev/null
echo "✓ Created tiered shipping rates"
Domestic (US):
Canada:
International:
# Set free shipping threshold at 1.2× average order value
AVG_ORDER_VALUE=42.50
THRESHOLD=$(echo "$AVG_ORDER_VALUE * 1.2" | bc)
echo "Recommended free shipping threshold: \$$(echo "$THRESHOLD" | cut -d. -f1)"
#!/bin/bash
# Calculate shipping cost vs collected
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": "{\"paymentStatus\": \"PAID\"}",
"paging": {"limit": 1000}
}
}')
# Assume actual cost is $7 per order average
ACTUAL_COST_PER_ORDER=7.00
order_count=$(echo "$orders" | jq '.orders | length')
collected=$(echo "$orders" | jq '[.orders[].priceSummary.shipping | tonumber] | add // 0')
actual_cost=$(echo "$order_count * $ACTUAL_COST_PER_ORDER" | bc)
profit_loss=$(echo "$collected - $actual_cost" | bc)
echo "Shipping P&L"
echo "============"
echo "Orders: $order_count"
echo "Collected: \$$collected"
echo "Actual Cost: \$$actual_cost"
echo "Profit/Loss: \$$profit_loss"
Endpoint: POST https://www.wixapis.com/stores/v1/fulfillments/query
curl -X POST "https://www.wixapis.com/stores/v1/fulfillments/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": {
"orderId": "order-123"
},
"paging": {"limit": 100}
}
}'
{
"fulfillment": {
"id": "fulfillment-789",
"orderId": "order-123",
"lineItems": [
{
"id": "line-item-1",
"quantity": 2
}
],
"trackingInfo": {
"trackingNumber": "1Z999AA10123456784",
"shippingProvider": "UPS",
"trackingLink": "https://www.ups.com/track?tracknum=1Z999AA10123456784"
},
"status": "FULFILLED",
"createdDate": "2026-02-20T10:00:00.000Z"
}
}
Endpoint: POST https://www.wixapis.com/stores/v1/fulfillments
curl -X POST "https://www.wixapis.com/stores/v1/fulfillments" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"fulfillment": {
"orderId": "order-123",
"lineItems": [
{
"id": "line-item-1",
"quantity": 2
}
],
"trackingInfo": {
"trackingNumber": "1Z999AA10123456784",
"shippingProvider": "UPS"
}
}
}'
curl -X PATCH "https://www.wixapis.com/stores/v1/fulfillments/${FULFILLMENT_ID}" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"fulfillment": {
"trackingInfo": {
"trackingNumber": "NEW-TRACKING-NUMBER",
"shippingProvider": "FedEx"
}
}
}'
#!/bin/bash
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": {
"paymentStatus": "PAID",
"fulfillmentStatus": "NOT_FULFILLED"
},
"paging": {"limit": 100}
}
}')
count=$(echo "$orders" | jq '.orders | length')
total_value=$(echo "$orders" | jq '[.orders[].priceSummary.total | tonumber] | add // 0')
echo "=== ORDERS AWAITING FULFILLMENT ==="
echo "Count: $count orders"
echo "Total Value: \$$total_value"
echo ""
echo "$orders" | jq -r '.orders[] | "Order #\(.number) - \(.buyerInfo.email) - $\(.priceSummary.total)"'
#!/bin/bash
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": {
"paymentStatus": "PAID",
"fulfillmentStatus": "FULFILLED"
},
"paging": {"limit": 100}
}
}')
echo "=== FULFILLMENT TIME ANALYSIS ==="
echo ""
# Note: This requires fulfillment timestamps
echo "$orders" | jq -r '
[.orders[] | {
order_date: .dateCreated,
fulfilled_date: .fulfilledDate,
hours: (((.fulfilledDate | fromdateiso8601) - (.dateCreated | fromdateiso8601)) / 3600)
}] |
{
avg_hours: ([.[].hours] | add / length),
min_hours: ([.[].hours] | min),
max_hours: ([.[].hours] | max)
} |
"Average Fulfillment Time: \(.avg_hours | floor) hours\nFastest: \(.min_hours | floor) hours\nSlowest: \(.max_hours | floor) hours"
'
#!/bin/bash
fulfilled=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": {
"paymentStatus": "PAID",
"fulfillmentStatus": "FULFILLED"
},
"paging": {"limit": 100}
}
}')
total_fulfilled=$(echo "$fulfilled" | jq '.orders | length')
with_tracking=$(echo "$fulfilled" | jq '[.orders[] | select(.shippingInfo.trackingNumber != null)] | length')
without_tracking=$((total_fulfilled - with_tracking))
coverage=$(echo "scale=1; $with_tracking / $total_fulfilled * 100" | bc)
echo "=== TRACKING NUMBER COVERAGE ==="
echo "Total Fulfilled Orders: $total_fulfilled"
echo "With Tracking: $with_tracking (${coverage}%)"
echo "Without Tracking: $without_tracking"
echo ""
[ $without_tracking -gt 0 ] && echo "⚠ Add tracking numbers to $without_tracking orders"
#!/bin/bash
fulfillments=$(curl -s -X POST "https://www.wixapis.com/stores/v1/fulfillments/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{"query": {"paging": {"limit": 100}}}')
echo "=== SHIPPING PROVIDER DISTRIBUTION ==="
echo ""
echo "$fulfillments" | jq -r '
[.fulfillments[] | .trackingInfo.shippingProvider // "Unknown"] |
group_by(.) |
map({provider: .[0], count: length}) |
sort_by(-.count) |
.[] |
"\(.provider): \(.count) shipments"
'
#!/bin/bash
SLA_HOURS=24
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": {
"paymentStatus": "PAID",
"fulfillmentStatus": "NOT_FULFILLED"
},
"paging": {"limit": 100}
}
}')
now_epoch=$(date +%s)
echo "=== LATE FULFILLMENTS (>${SLA_HOURS}h) ==="
echo ""
echo "$orders" | jq -r --arg sla "$SLA_HOURS" --arg now "$now_epoch" '
[.orders[] | {
number: .number,
email: .buyerInfo.email,
date: .dateCreated,
hours: (($now | tonumber) - (.dateCreated | fromdateiso8601)) / 3600
}] |
map(select(.hours > ($sla | tonumber))) |
sort_by(-.hours) |
.[] |
"Order #\(.number) - \(.email) - \(.hours | floor) hours old"
' | head -20
# Fulfill only some items from an order
curl -X POST "https://www.wixapis.com/stores/v1/fulfillments" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"fulfillment": {
"orderId": "order-123",
"lineItems": [
{
"id": "line-item-1",
"quantity": 1
}
],
"trackingInfo": {
"trackingNumber": "TRACKING-1",
"shippingProvider": "UPS"
}
}
}'
#!/bin/bash
# Get all unfulfilled orders
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": {
"paymentStatus": "PAID",
"fulfillmentStatus": "NOT_FULFILLED"
},
"paging": {"limit": 10}
}
}')
# Process each order
echo "$orders" | jq -r '.orders[] | .id' | while read order_id; do
echo "Processing order: $order_id"
# Create fulfillment (you'd need actual tracking numbers)
curl -s -X POST "https://www.wixapis.com/stores/v1/fulfillments" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"fulfillment": {
"orderId": "'"$order_id"'",
"trackingInfo": {
"trackingNumber": "AUTO-'"$order_id"'",
"shippingProvider": "USPS"
}
}
}' > /dev/null
echo "✓ Fulfilled order $order_id"
done
Aim to fulfill orders within 24 hours of payment:
# Monitor unfulfilled orders older than 12 hours
orders=$(curl -s -X POST "https://www.wixapis.com/stores/v2/orders/query" \
-H "Authorization: ${API_KEY}" \
-H "wix-site-id: ${SITE_ID}" \
-H "Content-Type: application/json" \
-d '{
"query": {
"filter": {
"paymentStatus": "PAID",
"fulfillmentStatus": "NOT_FULFILLED"
}
}
}')
# Alert on orders > 12 hours old
echo "$orders" | jq -r '
[.orders[] | select(
(now - (.dateCreated | fromdateiso8601)) > 43200
)] |
length as $count |
if $count > 0 then
"⚠ ALERT: \($count) orders need immediate fulfillment"
else
"✓ All orders within fulfillment window"
end
'
Tracking numbers improve customer satisfaction by 40%:
1Z + 16 characters12-14 digits20-22 digits10-11 digitsWix automatically sends tracking emails when you add tracking numbers via API.