Back to app
Price Checker Agent
Agnotiq MarginTide Price Checker Agent
API v1

Agnotiq MarginTide Price Checker Agent - API reference v1

Quickstart

Mint a pck_… token at Settings → API keys, then set TOKEN=pck_… and run any of the examples below. Replace the production URL with http://localhost:3000 for local development.

# List recent runs (scope: runs:read)
curl -s https://price-checker.vercel.app/api/v1/runs \
  -H "Authorization: Bearer $TOKEN"

# Trigger a run (scope: runs:trigger)
curl -s -X POST https://price-checker.vercel.app/api/v1/runs \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"subset_tags": ["core-skus"]}'

# List recommendations (scope: recommendations:read)
curl -s "https://price-checker.vercel.app/api/v1/recommendations?status=new" \
  -H "Authorization: Bearer $TOKEN"

# Accept a recommendation (scope: recommendations:write)
curl -s -X POST https://price-checker.vercel.app/api/v1/recommendations/$REC_ID/accept \
  -H "Authorization: Bearer $TOKEN"

# Approve a pending_approval recommendation - triggers Shopify write-back
# (scope: recommendations:approve - Max / Enterprise plan required)
curl -s -X POST https://price-checker.vercel.app/api/v1/recommendations/$REC_ID/approve \
  -H "Authorization: Bearer $TOKEN"

# Reject a pending_approval recommendation with a reason
# (scope: recommendations:approve)
curl -s -X POST https://price-checker.vercel.app/api/v1/recommendations/$REC_ID/reject \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"reason": "price too aggressive for Q3 margin target"}'

# Snooze an alert (scope: alerts:write)
curl -s -X POST https://price-checker.vercel.app/api/v1/alerts/$ALERT_ID/snooze \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"snooze_until": "2026-07-01T00:00:00Z", "reason": "supplier renegotiation"}'

# List catalog items (scope: catalog:read)
curl -s https://price-checker.vercel.app/api/v1/catalog/items \
  -H "Authorization: Bearer $TOKEN"

# Export report data (scope: reports:read)
curl -s https://price-checker.vercel.app/api/v1/reports/export \
  -H "Authorization: Bearer $TOKEN"

Prefer agent-native access? The MCP server guide covers connecting Claude Desktop or a custom LLM agent directly - no curl, no dashboard. Requires a Max or Enterprise plan.

Error cheat-sheet

Re-sending an accept / dismiss / snooze / resolve / approve that already took effect returns 200 { "ok": true, "idempotent": true } - safe to retry on network failures. The approve endpoint uses CAS (compare-and-swap) for exactly-once Shopify store writes.

Statuserror codeMeaning
400bad_requestRequest body could not be parsed as JSON
401unauthorizedMissing / unknown / revoked / expired token
403insufficient_scopeToken lacks the required scope (required field names it)
403forbidden_roleApprove / reject only: caller's workspace role is below approver|admin|owner
403token_unusableMutation routes only: the user who minted this token was deleted - mint a new token
402plan_limit / email_not_confirmed / budget codesPlan cap or billing gate refused the action
422tier_ineligibleApprove only: commerce write-back requires Max or Enterprise plan - upgrade in Settings → Billing
422no_commerce_integrationApprove only: no connected Shopify integration for this workspace - connect one in Settings → Integrations
404not_foundNo such resource in your workspace
409conflictState transition not allowed from the current state
422validation_errorBody or query-param failed Zod schema validation (issues lists fields)
429rate_limitedPer-token rate limit (60 req/min) - honor Retry-After