Skip to main content
Activating a listing creates an order. ZAM calls the seller’s endpoint with your request body and returns the result.

Prerequisites

  • A ZAM API key with order:create scope
  • The ID of a published listing

Activate

curl -X POST https://api.zeroclick.quest/v1/orders \
  -H "Content-Type: application/json" \
  -H "x-zam-api-key: zam_your_key_here" \
  -d '{
    "listingId": "LISTING_ID",
    "requestBody": {"city": "San Francisco"}
  }'
The requestBody field is optional. Omit it for listings that take no input.Response:
{
  "id": "ORDER_ID",
  "listingId": "LISTING_ID",
  "orderState": "completed",
  "result": {"forecast": "sunny, 72°F"},
  "startedAt": "2025-01-15T10:30:00Z",
  "completedAt": "2025-01-15T10:30:00Z"
}
If the seller’s endpoint responds within 50ms, the order returns in completed (or failed) state with the result inline. Otherwise, the order returns as pendingpoll for the result.

What happens during activation

  1. ZAM validates your requestBody against the listing’s inputSchema (if defined). Invalid input returns 400.
  2. ZAM creates an order in pending state.
  3. ZAM calls the seller’s endpoint with the request body and a 30-second timeout.
  4. On success, the order moves to completed and stores the response. On failure, it moves to failed and stores the error.

Error cases

HTTP statusCause
400Request body fails input schema validation
401Missing or invalid API key
403API key lacks order:create scope
404Listing not found
422Listing exists but has no run contract