🤖x402-MarketShopAPI DocsSell on the marketplace

API Documentation

Every call the marketplace recognizes. Sellers use the Supplier API to automate their catalog; AI agents shop through the Agent API. Anything you can do in the portal, your software can do here.

Authentication Push products Inventory & prices Product images CSV import & export Integrations (Shopify, WooCommerce, daemon…) Profile: wallets, shipping, AI key Orders & transactions Billing & coupons Agent shopping API Errors

Authentication

Every Supplier API call sends your account’s API key — created automatically at signup and always visible in the portal under Profile — as a Bearer token:

curl https://YOUR-DOMAIN/api/v1/supplier/products \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxx"

You never need this key to use the portal — your normal login covers everything in the browser. The key exists for software that sells while you’re away from the keyboard: sync daemons, CSV scripts, Shopify/WooCommerce connectors, agents. Grab it any time from Profile; nothing is “shown once.”

Push products

POST/api/v1/supplier/products — create or update up to 500 products per call. Matching is by source_ref (or sku): existing products update, new ones create. Any field not in the standard list becomes a searchable dynamic attribute automatically — send whatever your products have.

curl -X POST https://YOUR-DOMAIN/api/v1/supplier/products \
  -H "Authorization: Bearer sk_live_xxxx" -H "Content-Type: application/json" \
  -d '{"products":[{
    "source_ref": "LAMP-001",
    "sku": "LAMP-001",
    "title": "Brass Desk Lamp",
    "description": "Solid brass, dimmable.",
    "price": "29.99",
    "currency": "USD",
    "quantity": 25,
    "category": "Lighting",
    "brand": "Acme",
    "tags": ["desk","brass"],
    "keywords": ["desk lamp","reading light","brass lamp"],
    "weight_lb": 3.2,
    "taxable": true,
    "images": ["https://yoursite.com/lamp.jpg"],
    "variants": [{"options":{"finish":"brass"},"price":"29.99","quantity":15},
                 {"options":{"finish":"nickel"},"price":"31.99","quantity":10}],
    "attributes": {"bulb_type":"E26","cord_length_ft":"6","warranty_months":"24"}
  }]}'
FieldRequiredNotes
source_ref or skuyesYour stable ID — how updates find the product
title, priceyesPrice as a string, e.g. "29.99"
quantitynoLive stock. Sales decrement it automatically
keywordsnoUp to 3 search terms shoppers/agents use
variantsnoSizes/colors — each with its own price + stock
attributesnoANY other data — all of it searchable + shown on the product page

GET/api/v1/supplier/products — list your catalog. POST/api/v1/supplier/products/:id/status {"status":"active"|"paused"} — show/hide a listing.

Inventory & prices

POST/api/v1/supplier/inventory — bulk stock updates without touching anything else:

{"updates":[{"source_ref":"LAMP-001","quantity":40},
            {"source_ref":"FAN-002","quantity":0}]}

POST/api/v1/supplier/prices — same shape with "price".

Product images

POST/api/v1/supplier/listings/:listing_id/images — either {"urls":["https://…"]} to import from the web, or send the raw image bytes with Content-Type: image/jpeg (or png/webp) to upload directly.

CSV import & export

POST/api/v1/integrations/:id/csv — send your CSV file as the request body (Content-Type: text/csv). Create a CSV integration first (see below) to get the :id. Recognized headers map automatically (sku, title/name, price, quantity/qty/stock, description, category, brand, tags…). Unrecognized headers become dynamic attributes. If the headers can't be auto-detected and you've added your Anthropic key in settings, Fable maps the columns like a database schema.

curl -X POST https://YOUR-DOMAIN/api/v1/integrations/int_xxxx/csv \
  -H "Authorization: Bearer sk_live_xxxx" -H "Content-Type: text/csv" \
  --data-binary @my-products.csv

GET/api/v1/supplier/products/export.csv — download your catalog back as CSV with live inventory counts (sales already deducted), current prices, and every attribute as its own column. Upload → sell → download = reconciled spreadsheet.

Integrations

POST/api/v1/integrations — connect a source system. The response includes exact next-step instructions for each type.

{"connector_type":"shopify",        // shopify | woocommerce | rest_pull |
                                    // csv | webhook_push | daemon
 "name":"My Shopify store",
 "config":{"shop":"mystore.myshopify.com","access_token":"shpat_…"}}
TypeHow it works
shopify / woocommercePulled on a schedule with your store credentials; fields pre-mapped
rest_pullThe marketplace polls YOUR API endpoint; custom field mapping supported
csvYou upload files (above) whenever you like
webhook_pushYour system POSTs products to us when they change (HMAC-signed)
daemonDownload the local connector (portal → Integrations) — it maps your database with AI using YOUR Anthropic key, watches for changes, and writes sales back to your DB

GET/api/v1/integrations list · POST/api/v1/integrations/:id/sync pull now · POST/api/v1/integrations/:id/test dry-run · POST/api/v1/integrations/:id/pause.

Profile: wallets, shipping, AI key

PUT/api/v1/supplier/profile — everything on your settings page, settable by API. Send only what you're changing:

 "wallets": {"ethereum":{"address":"0x…","active":true},
             "arbitrum":{"address":"0x…","active":true},
             "solana":  {"address":"…","active":false},
             "bitcoin": {"address":"bc1…"}},          // off-protocol display only
 "ai":      {"api_key":"sk-ant-…","model":"claude-fable-5"},
 "state":"CT","zip":"06901",
 "tax_rate_percent":6.35,
 "shipping":{"mode":"flat_per_item","flat_amount":"7.75"}}
Going live for human shoppers requires PayPal. Credentials are verified with PayPal when you save. Wallets are PYUSD-only (locked) — payments land straight in your PayPal PYUSD receiving addresses. The ai key is YOUR Anthropic key: it powers all AI on your catalog (CSV/ERP mapping, SEO copy). No key = those features stay off for your account.

Orders & transactions

GET/api/v1/supplier/orders — your orders (agent and human sales both appear — all PYUSD). GET/api/v1/supplier/transactions?from=2026-01-01&to=2026-12-31&min=&max=&sku= — searchable transaction history. GET/api/v1/supplier/taxes?year=2026 — itemized yearly tax report with grand total.

Sale notifications (webhook, Gmail receipt to yourself, ntfy push, printer queue) are configured in the portal → Notifications tab.

Billing & coupons

GET/api/v1/supplier/billing — your status + current pricing. POST/api/v1/supplier/billing/onboarding — start the one-time onboarding payment (returns a PayPal approval link). POST/api/v1/supplier/billing/subscribe {"tier":"starter"|"growth"|"scale"} — monthly SKU subscription. POST/api/v1/supplier/billing/coupon {"code":"LAUNCH50"} — redeem a coupon (discounts onboarding, monthly, and/or the transaction fee).

Agent shopping API (how buyers reach your products)

You don't call these — AI agents do. Listed so you know how you're found:

CallWhat it does
POST/api/v1/catalog/searchSearch by text, keywords, category — with state/zip/seller_name filters. Product-name matches rank first
GET/api/v1/sellers/searchFind a seller by name/location — returns your contact info + full catalog
/api/v1/sessions…Multi-seller shopping carts with inventory holds
/api/v1/checkout…x402 payment in PYUSD on your active chains, paid to YOUR wallets (fee split to the marketplace)
POST/api/v1/complaintsBuyers/agents report problems to the marketplace admin
/llms.txt · /openapi.json · /mcp · /.well-known/agent.jsonMachine guides agents read to learn all of the above

Errors

Every error is JSON with a stable code and a human sentence:

{"error":{"code":"COLUMNS_NOT_DETECTED","message":"Could not auto-detect required columns…"}}
HTTPMeaning
401 / 403Missing or wrong API key
402Payment required (billing step, or an x402 payment challenge)
404Thing doesn't exist (check the ID)
409Conflict — e.g. seller not live for human checkout yet
429 / 5xxSlow down / try again

Machine-readable version of everything here: /openapi.json. Agent-facing guide: /llms.txt.