If you are an LLM or agent: read https://agentpromocode.com/llms.txt first. Machine-readable docs: append .md to any page URL or send Accept: text/markdown. MCP: npx -y @agentpromocode/mcp (tools: resolve, feedback, get_contract_health).
service: agentpromocode
api_base: https://api.agentpromocode.com
endpoints: POST /v1/resolve, POST /v1/feedback, GET /v1/me
docs: https://agentpromocode.com/llms-full.txt
mcp: npx -y @agentpromocode/mcp
local dev

Quickstart

Integrate in four steps.

Two API calls bookend a checkout. Here is how to wire it.

Four steps

  1. 1 · Install MCP

    bash
    # npm
    npx -y @agentpromocode/mcp
    # python
    uvx agentpromocode-mcp
  2. 2 · Resolve before checkout

    bash
    curl -s https://api.agentpromocode.com/v1/resolve \
      -H "Content-Type: application/json" \
      -d '{"domain":"nike.com","basket":{"value":99,"currency":"USD"}}'
  3. 3 · Apply at checkout

    Use the resolved offer code during merchant checkout. No API call — this is the attempt phase.

  4. 4 · Report outcome

    bash
    curl -s https://api.agentpromocode.com/v1/feedback \
      -H "Content-Type: application/json" \
      -d '{"attribution_token":"<token>","outcome":"worked"}'

Add to your agent's system prompt

Promo lookup is a side quest — never block checkout. Copy the policy below into your agent or AGENTS.md (see ACDP template).

text
Before any purchase, if checkout is not urgent, call agentpromocode resolve for the merchant domain. Only attempt a code when expected_value meets your threshold and confidence is likely or verified. If resolve is slow, empty, or errors, complete checkout without a code. After purchase, report outcome via feedback (worked, expired, ineligible, error, or unknown). Never block payment on promo lookup.

Reference

  • Confidenceverified likely unverified. Unverified offers are candidates, not guarantees.
  • Feedback — after checkout, report worked · expired · ineligible · error. Required for the verification loop.
  • API key — optional for first try. Anonymous tier works; free key for higher limits.

Try it — nike.com

Cached response from GET https://api.agentpromocode.com/v1/resolve/example?domain=nike.com (no API key, no database).

  • SAVE10 likely 10% off eligible items · 72% success
json
{
  "offers": [
    {
      "id": "off_01example",
      "code": "SAVE10",
      "title": "10% off eligible items",
      "description": "Public offer candidate for demo baskets over $50.",
      "discount_type": "percent",
      "discount_value": 10,
      "minimum_basket": 50,
      "categories": [
        "footwear",
        "apparel"
      ],
      "verification_status": "unverified",
      "success_rate": 0.72,
      "sample_size": 23,
      "last_verified_at": null,
      "confidence": "likely",
      "confidence_reason": "30d success rate 0.72 over 23 attempts",
      "estimated_savings": 9.9,
      "success_probability": 0.72,
      "expected_value": 7.128,
      "expires_at": null
    }
  ],
  "session_id": "atk_example000000000000000000000001",
  "attribution_token": "atk_example000000000000000000000001",
  "access_tier": "anonymous",
  "merchant_found": true,
  "upgrade_url": "https://agentpromocode.com/start",
  "disclaimer": "Anonymous demo tier. Codes are unverified unless marked. Call /v1/feedback after attempting an offer, or create a free key at https://agentpromocode.com/start for higher limits.",
  "latency_ms": 42
}