The Wallco Agent API

Qualified AI agents — acting on behalf of real designers — can onboard, upload patterns, generate colorways, write copy, and read commission ledgers via the same HTTP API the dashboards use. Bots scraping or automating without a verified designer behind them will get nothing useful here and may be blocked. This page is the full contract.

Apply as Agent-Of-Record Back to marketplace
Contents

1. Who qualifies

An agent is an AI-driven autonomous actor (Claude, GPT, custom LLM workflows, headless scripts orchestrated by an LLM) that performs marketplace actions on behalf of a human designer, studio, or brand. Examples:

To qualify, the agent must:

2. Hard rules — what gets blocked

Block list. Violating any of these voids the designer's account, not just the agent's session.
  • Scraping /api/marketplace/* for buyer info or competitive intel.
  • Bulk pattern upload without per-asset rights warranty.
  • Automated price undercutting, dynamic price probing.
  • Generating fake license inquiries, fake project saves, fake follows.
  • Uploading patterns that fail the DW Settlement Agreement screen (banana leaves, banana pods, grapes, birds, butterflies in tropical foliage compositions — auto-checked, blocked at POST /patterns/upload).
  • Acting on behalf of designers other than the one whose JWT cookie you hold.

3. Authentication

Wallco uses a signed HMAC cookie called mp_designer. The cookie is issued by POST /api/marketplace/designer/apply and is valid for 30 days. Treat it like a bearer token — keep it secret, rotate by re-applying.

For headless agents, capture the Set-Cookie header on the apply response and replay it on every subsequent call as a Cookie header.

curl -sS -i -X POST https://wallco.ai/api/marketplace/designer/apply \
  -H 'content-type: application/json' \
  -d '{
    "display_name": "Astrid Mauve Studio",
    "email": "astrid@example.com",
    "rights_agreement": true,
    "studio_name": "Astrid Mauve Studio",
    "bio": "Brooklyn-based pattern designer specializing in botanical maximalism. Agent-of-record: a Claude session managed by astrid@example.com.",
    "style_tags": ["Botanical","Maximalist"]
  }' | grep -i set-cookie
# Set-Cookie: mp_designer=AbC...Xyz.dEf...; Path=/; Max-Age=2592000; SameSite=Lax; HttpOnly

Replay the cookie on every authenticated call:

curl -sS https://wallco.ai/api/marketplace/designer/me \
  -H "cookie: mp_designer=AbC...Xyz.dEf..."
Admin endpoints. A small set of endpoints (approve, reject, founding, payouts) require admin credentials, not the designer cookie. Agents will never have these. They're listed for completeness but always return 403 for designer-cookie callers.

4. Base URL · versioning

5. Onboarding endpoints

POST/api/marketplace/designer/applypublic
Create a designer profile (status: pending) and receive the mp_designer cookie. The designer is auto-logged-in but cannot upload patterns until status flips to approved.
Body: display_name (req), email (req, valid), rights_agreement (req, must be true), studio_name, bio, website_url, instagram_url, location, style_tags (string[]).
Returns: { ok: true, designer: { id, slug, status } } + Set-Cookie.
POST/api/marketplace/designer/claimpublic
Submit a claim against an existing unclaimed designer page (e.g. someone Wallco curated into the directory). Routed to admin review.
Body: slug, name, email, website_url, instagram_url, portfolio_url, proof.
POST/api/marketplace/designer/logoutpublic
Clears the mp_designer cookie. Useful when rotating an agent's credentials.

6. Profile endpoints

GET/api/marketplace/designer/medesigner cookie
Returns the full designer record + badges + patterns + points ledger + commission ledger (last 50) + next-level threshold.
Returns: { designer, badges, patterns, points_ledger, commission_ledger, next_level }

7. Pattern endpoints

POST/api/marketplace/patterns/uploaddesigner cookie
Upload one pattern. Multipart. Required field image (file, ≤50MB, jpg/png/webp/tiff/avif) + rights_warranty=true. The pattern starts in status='pending' and is reviewed by admin.
Body fields: image (file, req), title, description, rights_warranty (req, "true"), repeat_type, scale_notes, motif_tags, style_tags, room_tags, color_tags, mood_tags, commercial_suitable ("true"/"false"), hospitality_ready, rights_warranty_text.
Returns: { ok: true, pattern: { id, slug, status } }
GET/api/marketplace/patternspublic
List approved patterns. Filterable by ?designer=<slug>. Paginated via ?limit=<1..200>&offset=<n>.
GET/api/marketplace/patterns/:slugpublic
Pattern detail + colorways. Side effect: increments view_count.

8. AI helper endpoints

Three live-LLM endpoints. The tag + copy endpoints run on Mac1 qwen3:14b (~30–90s/call). The colorways endpoint runs on Gemini 2.5 Flash Image (~5–15s/call × 6 in parallel).

POST/api/marketplace/ai/tag-patternpublic
Given a patternId or patternSlug, returns style/room/color/motif/mood tag families + scale + mood sentence. Persists tags back to mp_patterns when a row is resolved. Falls back to a mock shape if qwen3:14b is unreachable.
Body: { patternId? | patternSlug? | imageUrl? }
Returns: { status: "live"|"mock", model: "qwen3:14b", pattern_id, pattern_slug, persisted, styleTags, roomTags, colorTags, motifTags, moodTags, scale, mood }
POST/api/marketplace/ai/write-pattern-descriptionpublic
Writes title suggestion, short description, long description, SEO title, SEO meta. Persists short + long descriptions to mp_patterns when a row is resolved.
Body: { patternId? | patternSlug? | title? }
Returns: { status, model, pattern_id, persisted, titleSuggestion, shortDescription, longDescription, seoTitle, seoDescription }
POST/api/marketplace/ai/generate-colorwayspublic
Generates 6 photo-real colorway variants via Gemini 2.5 Flash Image (Warm Clay, Moss & Linen, Ink Blue, Rose Plaster, Gold Smoke, Pearl Frost). Persists each into mp_pattern_colorways with ai_generated=true. Cost-logged via the cost tracker.
Body: { patternId? | patternSlug? | imageUrl? } + optional { mock: true, skipPersist: true }
Returns: { status, pattern, colorways: [{ id, name, image_url, hex_palette, description }], errors? }
POST/api/marketplace/ai/create-room-mockuppublic
Stub. Returns prompt/shape only. Will wire to ComfyUI / Replicate / Gemini Image when budget is approved.

9. Licensing endpoints

POST/api/marketplace/licensing/inquirypublic
Submit a license inquiry against a pattern. Routed to the designer (and admin). Awards points to the designer; flags LICENSING_READY badge on first inquiry.
Body: pattern_slug, buyer_name, buyer_email (req), buyer_company, license_type (non_exclusive | exclusive | exclusive_category), usage_description, territory, duration_months, budget_range.
Returns: { ok: true, inquiry_id }
Anti-abuse: automated fake inquiries are explicit grounds for account termination — see §2.

10. Commission endpoints

POST/api/marketplace/commissions/calculatepublic
Pure calculator. Given a line-item price + commission rate + optional adjustments, returns net basis + commission. Useful for previewing payouts before a sale clears.
Body: { lineItemPrice, commissionRate, discount?, refund?, shippingCost?, ... }
Returns: { net_basis, commission }
GET/api/marketplace/commissions/ledgerdesigner cookie or admin
Returns up to 500 commission ledger rows for the authenticated designer (or all rows for admin).
Returns: { ledger: [{ id, entry_type, basis_amount, commission_rate, commission_amount, status, created_at }, ...] }

11. Project / trade endpoints

POST/api/marketplace/projectsdesigner cookie
Create a project workspace (trade-buyer pattern; works with a designer cookie as a stand-in user today).
POST/api/marketplace/projects/:id/savedesigner cookie
Save a pattern + colorway combo into a project. Increments save_count on the pattern; awards points to the pattern's designer.

12. Discovery endpoints

GET/api/marketplace/designerspublic
List approved designers. Sort: ?sort=newest|points|featured. Paginate: ?limit&offset.
GET/api/marketplace/designers/:slugpublic
Designer detail + their approved patterns + badges + collections. If the slug is an unclaimed page, returns the claim record instead.

13. Status / health

GET/api/marketplace/statuspublic
Health check + count snapshot (designers, patterns, collections, commission entries, pending $, paid $, open inquiries, open takedowns).

14. Errors

All errors return JSON of the shape:

{ "error": "<short human-readable message>" }

15. Rate limits

16. End-to-end examples

Apply, upload, auto-tag, auto-copy, auto-colorway (Node.js)

import fs from 'node:fs';

const BASE = 'https://wallco.ai';
let COOKIE = '';

async function api(path, opts = {}) {
  const headers = { 'content-type': 'application/json', ...opts.headers };
  if (COOKIE) headers.cookie = COOKIE;
  const res = await fetch(BASE + path, { ...opts, headers });
  const setCookie = res.headers.get('set-cookie');
  if (setCookie && setCookie.includes('mp_designer=')) {
    COOKIE = setCookie.split(';')[0];
  }
  if (!res.ok) throw new Error(`${res.status} ${path}: ${await res.text()}`);
  return res.json();
}

// 1. Onboard (one-time per agent)
const apply = await api('/api/marketplace/designer/apply', {
  method: 'POST',
  body: JSON.stringify({
    display_name: 'Astrid Mauve Studio',
    email: 'astrid@example.com',
    rights_agreement: true,
    bio: 'Brooklyn-based pattern designer specializing in botanical maximalism. ' +
         'Agent-of-record: a Claude session managed by astrid@example.com.',
    style_tags: ['Botanical', 'Maximalist'],
  }),
});
// → { ok: true, designer: { id, slug, status: 'pending' } }

// 2. Upload a pattern (multipart — use FormData)
const fd = new FormData();
fd.append('image', new Blob([fs.readFileSync('./wildflower-reverie.png')]), 'wildflower-reverie.png');
fd.append('title', 'Wildflower Reverie');
fd.append('rights_warranty', 'true');
fd.append('repeat_type', 'half-drop');
fd.append('scale_notes', 'large repeat ~30in');
const upload = await fetch(BASE + '/api/marketplace/patterns/upload', {
  method: 'POST', headers: { cookie: COOKIE }, body: fd,
}).then(r => r.json());
const slug = upload.pattern.slug;

// 3. Let qwen3:14b tag it (persists tags into mp_patterns)
await api('/api/marketplace/ai/tag-pattern', {
  method: 'POST',
  body: JSON.stringify({ patternSlug: slug }),
});

// 4. Let qwen3:14b write the copy
await api('/api/marketplace/ai/write-pattern-description', {
  method: 'POST',
  body: JSON.stringify({ patternSlug: slug }),
});

// 5. Generate 6 colorways via Gemini
await api('/api/marketplace/ai/generate-colorways', {
  method: 'POST',
  body: JSON.stringify({ patternSlug: slug }),
});

// 6. Wait for admin to approve, then poll commission ledger
const me = await api('/api/marketplace/designer/me');
console.log('points:', me.designer.points, 'commission rows:', me.commission_ledger.length);

Same flow in Python

import requests, json

BASE = 'https://wallco.ai'
s = requests.Session()

# 1. Onboard
r = s.post(f'{BASE}/api/marketplace/designer/apply', json={
    'display_name': 'Astrid Mauve Studio',
    'email': 'astrid@example.com',
    'rights_agreement': True,
    'bio': 'Brooklyn-based pattern designer. Agent-of-record: a Python script run by astrid@example.com.',
    'style_tags': ['Botanical', 'Maximalist'],
})
r.raise_for_status()
# session.cookies now contains mp_designer automatically

# 2. Upload a pattern
with open('wildflower-reverie.png', 'rb') as f:
    r = s.post(f'{BASE}/api/marketplace/patterns/upload',
        files={'image': ('wildflower-reverie.png', f, 'image/png')},
        data={
            'title': 'Wildflower Reverie',
            'rights_warranty': 'true',
            'repeat_type': 'half-drop',
            'scale_notes': 'large repeat ~30in',
        })
r.raise_for_status()
slug = r.json()['pattern']['slug']

# 3. Auto-tag
s.post(f'{BASE}/api/marketplace/ai/tag-pattern',  json={'patternSlug': slug}).raise_for_status()
# 4. Auto-copy
s.post(f'{BASE}/api/marketplace/ai/write-pattern-description', json={'patternSlug': slug}).raise_for_status()
# 5. Colorways
s.post(f'{BASE}/api/marketplace/ai/generate-colorways', json={'patternSlug': slug}).raise_for_status()

# 6. Read commission ledger
print(s.get(f'{BASE}/api/marketplace/commissions/ledger').json())

17. Terms for agents

By using this API on behalf of a designer, the agent's operator agrees that:

Questions, scope expansion, agent-of-record agreements: marketplace@wallco.ai. Last updated 2026-05-13.