Zinc Universal Checkout
by @a5huynh
Place, list, and retrieve orders via the Zinc API (zinc.com). Use when the user wants to buy a product from an online retailer, check order status, list recent orders, or anything involving the Zinc e-commerce ordering API. Requires ZINC_API_KEY environment variable.
clawhub install universal-checkoutπ About This Skill
name: zinc-orders description: Place, list, and retrieve orders via the Zinc API (zinc.com). Use when the user wants to buy a product from an online retailer, check order status, list recent orders, or anything involving the Zinc e-commerce ordering API. Requires ZINC_API_KEY environment variable.
Zinc Orders
Place and manage orders on online retailers through the Zinc API (https://api.zinc.com).
Prerequisites
ZINC_API_KEY env var must be set. Get one from Authentication
All requests use Bearer token auth:
Authorization: Bearer $ZINC_API_KEY
Endpoints
Create Order β POST /orders
Place a new order. Orders process asynchronously.
Required fields:
products β array of { url, quantity?, variant? } objectsurl: direct product page URL on a supported retailer
- quantity: integer (default 1)
- variant: array of { label, value } for size/color/etc.
shipping_address β object with first_name, last_name, address_line1, address_line2, city, state (2-letter), postal_code, phone_number, country (ISO alpha-2, e.g. "US")max_price β integer, maximum price in centsOptional fields:
idempotency_key β string (max 36 chars) to prevent duplicatesretailer_credentials_id β short ID like zn_acct_XXXXXXXXmetadata β arbitrary key-value objectpo_number β purchase order number stringResponse: order object with id (UUID), status, items, shipping_address, created_at, tracking_numbers, etc.
Order statuses: pending β in_progress β order_placed | order_failed | cancelled
List Orders β GET /orders
Returns { orders: [...] } array of order objects.
Get Order β GET /orders/{id}
Retrieve a single order by UUID.
Example: Place an Order
curl -X POST https://api.zinc.com/orders \
-H "Authorization: Bearer $ZINC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"products": [{ "url": "https://example.com/product", "quantity": 1 }],
"max_price": 5000,
"shipping_address": {
"first_name": "Jane",
"last_name": "Doe",
"address_line1": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"phone_number": "5551234567",
"country": "US"
}
}'
Error Handling
See references/errors.md for the full error code reference.
Key points:
{ code, message, details }error_typemax_price_exceeded, product_out_of_stock, invalid_shipping_addressOrder Status Tracking
Orders process asynchronously and typically take 5β10 minutes. After placing an order:
1. Schedule a cron job to check the order status ~7 minutes after creation.
2. Use GET /orders/{id} to poll.
3. Report the result back to the user in the same channel.
4. If still pending/in_progress, schedule another check in 5 minutes.
Terminal statuses: order_placed, order_failed, cancelled β stop polling.
Non-terminal: pending, in_progress β schedule another check in 3β5 minutes.
Example cron job (isolated, announce back to the channel):
{
"name": "zinc-order-check-",
"schedule": { "kind": "at", "at": "" },
"payload": {
"kind": "agentTurn",
"message": "Check Zinc order via GET https://api.zinc.com/orders/"
},
"sessionTarget": "isolated",
"delivery": {
"mode": "announce",
"channel": "",
"to": ""
}
}
Safety
POST /orders). This spends real money.max_price is reasonable before submitting.βοΈ Configuration
ZINC_API_KEY env var must be set. Get one from