WaForgeDevelopers

Reference

Data feed reference

Data Feed v1: the manifest and the endpoints your website exposes. Paths are relative to base_url from your manifest. Machine-readable: openapi.yaml.

Capabilities at a glance #

Declare a capability in the manifest by giving its path; null or a missing key means "not offered". Only the core four are required for the feed checker (at least one of them).

CapabilityDefault pathUsed by the agentTested by the checker
catalog.searchGET /catalog/searchYes, search_catalogYes
product.getGET /products/{id}Yes, get_product and price totalsWith a sample product id
product.by_skuGET /products/by-sku/{sku}Yes, when product.get answers 404With a sample SKU
availabilityPOST /availabilityYes, check_availabilityWith a sample product id
order.statusPOST /orders/lookupYes, lookup_orderYes (an unknown order must give 404)
booking.slotsGET /booking/slotsYes, get_booking_slotsWith a sample service id
delivery.zonesGET /delivery/zonesYes, delivery options and fees in totalsYes
price.quotePOST /quoteNot yetWith a sample variant id
business.hours, faqsGET /business/hours, GET /faqsNot yet (hours and FAQs come from your agent setup)Yes
delivery.quote, booking.createPOST /delivery/quote, POST /bookingsNot yetNo

"Not yet" endpoints are part of the v1 format so you can build them now; the agent does not call them today. Totals are calculated by WaForge from product.get prices and the zone fee from delivery.zones.

Conventions #

  • HTTPS on port 443, on your verified domain or a subdomain. JSON in and out, UTF-8.
  • Every request is signed (Authentication). Answer 401 to a bad or old signature.
  • Answer within 2.5 s. You may set limits.timeout_ms between 1,000 and 5,000 in your manifest; other values are clamped.
  • Money is a decimal string ("49.50", "3.250"), never a float. Currency is ISO 4217.
  • Pagination is cursor-based: return an opaque next_cursor, null on the last page. limit max 50. The agent currently reads the first page only, with limit 10 or less.
  • Text fields are plain text. WaForge strips HTML and hidden control characters, and cuts descriptions at 4,000 characters. It treats your text as data, never as instructions.
  • Responses larger than 2 MB are refused. Redirects are followed at most 3 times, and only within your domain.

Envelope (every 2xx)

JSON
{ "data": { }, "as_of": "2026-11-06T10:15:00Z", "ttl": 60, "next_cursor": null }

as_of is when your system last knew the value was true (not when you built the response, if you serve from your own cache). ttl is how many seconds it can be trusted; WaForge applies its own lower caps (Freshness).

Errors

RFC 9457 problem
HTTP/1.1 404 Not Found
Content-Type: application/problem+json

{ "type": "https://waforge.online/developers/troubleshooting#not_found", "title": "Order not found",
  "status": 404, "code": "not_found", "detail": "No order matches", "retry_after": null }
codeHTTPAgent behaviour
not_found404Says it could not find it, may suggest alternatives. Not a failure.
invalid_request400 / 422Hands off to a person
unauthorized401Hands off; the checker shows the cause
rate_limited429Hands off (WaForge does not read Retry-After yet)
unavailable, internal503 / 500Hands off

Only the HTTP status matters to WaForge: 404 means "not found", any other non-2xx status is a failure. 5 failures in a row (timeouts included) pause calls to your feed for 60 seconds. The problem+json body is for your own logs and the feed checker.

Envelope rules checked on every 2xx
datarequiredAny JSON value
as_ofrequiredISO 8601 date-time string with Z or an offset
ttlrequiredInteger, 0 or more. "60" as a string fails.

Query: q (required, max 200 chars), category, lang, limit (1 to 50, default 20), cursor. Each item needs at least id and name; WaForge reads price, currency, url and the first image. WaForge may reuse a search for your ttl, at most 24 hours: search is for finding items, the price the agent states comes from product.get.

Request and response
GET /waforge/catalog/search?q=black%20shoes&limit=5

{ "data": { "items": [
    { "id": "p_1001", "name": "Black running shoe", "url": "https://shop.example/p/black-runner",
      "currency": "QAR", "price": "249.00", "images": ["https://shop.example/img/1001.jpg"],
      "variants": [ { "id": "v_42", "sku": "BR-42", "title": "Size 42", "options": { "size": "42" }, "price": "249.00", "available": true } ] }
  ] },
  "as_of": "2026-11-06T10:15:00Z", "ttl": 300, "next_cursor": "eyJpZCI6MTAwMX0" }

GET /products/{id} and GET /products/by-sku/{sku} #

Returns one Product, or 404. This is where the agent reads the price it quotes, so keep as_of current (the moment you read the row), not the date the product was last edited: a price older than 300 seconds is treated as stale.

FieldType
id, name, currency, variantsrequiredAt least one variant (use the product itself if it has none)
price, compare_at_priceMoneycompare_at_price = the price before a sale
url, images[]URLAbsolute https URLs
description_textstring, max 4,000Plain text
variants[]{id, sku, title, options, price, available}options like {"size": "M", "colour": "black"}
category, brand, attributesoptional

POST /availability #

Request and response
POST /waforge/availability
{ "items": [ { "product_id": "p_1001", "variant_id": "v_42", "quantity": 2 } ], "location_id": null }

{ "data": { "items": [ { "product_id": "p_1001", "variant_id": "v_42", "available": true,
                         "quantity_available": 3, "status": "low_stock", "restock_date": null } ] },
  "as_of": "2026-11-06T10:15:00Z", "ttl": 30 }

status: in_stock, low_stock, out_of_stock, preorder, unknown. Accept up to 50 items; the agent sends one item per request. quantity_available is optional if you prefer not to reveal exact stock.

POST /quote (not used by the agent yet) #

Declared as price.quote. The feed checker calls it when you give a sample variant id. Today the agent computes totals itself from product.get prices and the delivery.zones fee; this endpoint is reserved for coupons and tax rules.

Request and response
{ "items": [ { "variant_id": "v_42", "quantity": 2 } ], "delivery_zone_id": "doha", "coupon": null }

{ "data": { "currency": "QAR", "lines": [ { "variant_id": "v_42", "unit_price": "249.00", "quantity": 2, "line_total": "498.00" } ],
            "subtotal": "498.00", "discount": "0.00", "tax": "0.00", "tax_included": true, "delivery_fee": "15.00", "total": "513.00" },
  "as_of": "2026-11-06T10:15:00Z", "ttl": 60 }

POST /orders/lookup #

Phone check is mandatory. WaForge sends the customer's WhatsApp number as + followed by digits, taken from the WhatsApp session, never typed by the customer. Return the order only if it matches the phone on the order: compare the last 9 digits after removing non-digits. Return the same 404 for "unknown order" and "phone does not match", so nobody can probe order numbers.
Request and response
{ "order_number": "CMD-2041", "phone": "+213550123456" }

{ "data": { "order_number": "CMD-2041", "status": "shipped", "status_label": "Shipped with Yalidine",
            "placed_at": "2026-11-04T09:12:00Z", "items_summary": "2 x Black running shoe",
            "tracking_url": "https://shop.example/track/CMD-2041", "estimated_delivery": "2026-11-08" },
  "as_of": "2026-11-06T10:15:00Z", "ttl": 0 }

status: pending, confirmed, processing, shipped, out_for_delivery, delivered, cancelled, refunded, on_hold. Do not return addresses or full names.

GET /booking/slots and POST /bookings #

Slots: query service_id, from, to (dates, at most 14 days apart), staff_id. Response {"slots": [{"start", "end", "staff_id", "capacity_left"}]} with ISO date-times including the offset. When a customer confirms a slot, WaForge reads the slots again and, if the slot is still free, puts a booking request in your inbox. POST /bookings is not called yet.

GET /delivery/zones and POST /delivery/quote #

Zones response
{ "data": { "zones": [ { "id": "alger", "name": "Alger", "names_i18n": { "ar": "الجزائر" }, "fee": "400", "currency": "DZD",
                         "free_over": "10000", "eta_days_min": 1, "eta_days_max": 2, "cod": true } ] },
  "as_of": "2026-11-06T10:15:00Z", "ttl": 3600 }

The agent matches a zone by id or by name (including names_i18n) and uses its fee in totals. POST /delivery/quote (body {"zone_id" or "address", "items"}) is reserved and not called yet.

GET /business/hours and GET /faqs (checker only) #

The agent answers hours and FAQs from your agent setup in the dashboard. These endpoints are validated by the feed checker when declared, and reserved for a later version.

Hours response
{ "data": { "timezone": "Asia/Qatar",
            "weekly": [ { "day": "sat", "open": "10:00", "close": "22:00" } ],
            "exceptions": [ { "date": "2026-12-18", "closed": true, "note": "National Day" } ] },
  "as_of": "2026-11-06T10:15:00Z", "ttl": 3600 }

FAQs: query lang, response {"items": [{"id", "question", "answer", "lang", "updated_at"}]}.

Manifest fields #

Field
waforge_feed"1.0". The major version must be 1.
tenantYour wf_tn_ id (informational)
verificationYour wfv_ token (one of three ways to verify your domain)
auth{"type": "hmac-sha256", "key_id": "fs_..."} (informational)
base_urlHTTPS, on your verified domain or a subdomain. Read when the feed checker runs; a change takes effect after the next passing check.
capabilitiesPath per capability, or null. Only declared capabilities become agent tools.
limitstimeout_ms (clamped to 1,000 to 5,000). max_rps is informational: WaForge only calls your feed when a customer asks something, plus the checker.
businessname, currency, prices_include_tax, default_locale, locales, timezone

The manifest contains no secrets. Unknown fields are ignored, so you can add your own.