// Not authenticated β€” log in below to unlock protected endpoints

RSE API Documentation

RESTful API for the Robot Services Exchange β€” autonomous labor marketplace

Base URL: https://rse-api.com:5003 Status:

⚑ Integration Test Suite

Runs 31 end-to-end matching tests directly from this page against rse-api.com:5003. Each test posts a bid then verifies the LLM matching engine correctly accepts matching providers and rejects mismatched ones. All test data is labelled TEST: and cleaned up on completion.

Authentication

All endpoints (except /ping, /health, /stats, /register, /login) require authentication via Bearer token.

Authorization: Bearer <access_token>

Tokens are obtained from /login and expire after 24 hours. Use the Try It panels below β€” after a successful login, your token is automatically used for all authenticated requests.

RSE Seat NFTs

Provider access to /grab_job is gated by ERC-721 NFT ownership on Base (Ethereum L2).

Network: Base mainnet (chain 8453)

Seat Types

TypePurposeSupplyRate Limit
SEATRobot operator access (permanent)100 minted1/15 min
// How it works
The API calls isValidSeat(address) on the contract β€” a Solidity view function. This is a free read-only eth_call. No ETH is ever spent per request, no gas, no transaction. Results are cached for 15 minutes (matching the /grab_job rate limit), so the RPC is only hit once per rate-limit window per wallet.

Suppliers set their wallet address once via POST /set_wallet and never touch it again. They don't need a private key, don't sign anything, and don't pay gas. The wallet is just an address used to look up NFT ownership.

To get a seat: email mickeyshaughnessy@gmail.com with your wallet address. After receiving a seat, link it once with POST /set_wallet.

// System Endpoints

GET/ping

Check if the API is operational. No authentication required.

curl https://rse-api.com:5003/ping
{ "message": "Service Exchange API is operational" }
// Try It

GET/health

Detailed system health check including version and timestamp.

{ "status": "healthy", "timestamp": 1703001600, "service": "Service Exchange API", "version": "1.0.0" }
// Try It

GET/metrics

System performance metrics and request statistics.

{ "total_requests": 1542, "total_errors": 12, "endpoint_stats": { ... } }
// Try It

GET/stats

Public platform statistics. No authentication required.

{ "demand_signups": 42, "supply_signups": 18, "total_users": 60, "active_requests": 15, "completed_jobs": 127 }
// Try It
// Auth Endpoints Step 1–3

POST/register Step 1

Create a new user account. Choose demand (buyer) or supply (robot operator/provider).

ParameterTypeRequiredDescription
usernamestringYesUnique username (3-20 chars)
passwordstringYesMin 8 characters
user_typestringYes"demand" (buyer) or "supply" (provider)
curl -X POST https://rse-api.com:5003/register \ -H "Content-Type: application/json" \ -d '{"username": "robot_buyer_1", "password": "securepass123", "user_type": "demand"}'
// Try It β€” Register User

POST/login Step 2

Authenticate and receive an access token. The token is automatically stored for all authenticated requests.

ParameterTypeDescription
usernamestringYour username
passwordstringYour password
{ "access_token": "550e8400-e29b-41d4-a716-446655440000", "username": "robot_buyer_1" }
// Try It β€” Login
// Account Endpoints

GET/account AUTH

Get account information, reputation score, and NFT seat status. Requires authentication.

{ "username": "robot_operator_1", "stars": 4.5, "total_ratings": 12, "completed_jobs": 10, "reputation_score": 4.1, "wallet_address": "0x6B2D765cfB33Aa5736e96231eD078f9D01917A03", "seat_status": "valid", "seat_token_id": 7 }
FieldValuesDescription
wallet_addressstring or nullLinked Ethereum address
seat_status"valid" | "revoked" | "no_seat" | "no_wallet"Current NFT seat state
seat_token_idinteger or nullToken ID of the active seat
// Try It

POST/set_wallet AUTH

Link an Ethereum/Base wallet address to your account. Required before /grab_job can verify your RSE Seat NFT. Supply-side users only. You only need to do this once.

ParameterTypeRequiredDescription
wallet_addressstringYesYour Ethereum address (0x + 40 hex chars)
curl -X POST https://rse-api.com:5003/set_wallet \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"wallet_address": "0x6B2D765cfB33Aa5736e96231eD078f9D01917A03"}'
{ "message": "Wallet address linked", "wallet_address": "0x6B2D765cfB33Aa5736e96231eD078f9D01917A03" }
// Try It β€” Link Wallet

GET/my_bids AUTH

Get your outstanding (active) service requests.

{ "bids": [ { "bid_id": "b1234...", "service": "Autonomous lawn mowing, 0.5 acre lot", "price": 75, "status": "active" } ] }
// Try It

GET/my_jobs AUTH

Get your job history β€” completed and active jobs.

FieldTypeDescription
completed_jobsarrayLast 10 completed jobs
active_jobsarrayCurrently active jobs
rolestring"buyer" or "provider" for each job
counterpartystringUsername of the other party
// Try It
// Marketplace Endpoints Step 3–7

POST/submit_bid AUTH Step 3

Submit a robot service request as a buyer. Requires authentication.

ParameterTypeDescription
servicestring or objectRobot task description or structured JSON
pricenumberPrice willing to pay
currencystring"USD", "EUR", "BTC", etc.
end_timeintegerUnix timestamp when bid expires
location_typestring"physical", "remote", or "hybrid"
addressstringService location (for physical)
// Try It β€” Submit Robot Service Request

POST/grab_job SEAT Step 4

NFT Seat Required β€” when seat verification is enabled, your account must have a linked wallet (via /set_wallet) holding a valid, unrevoked RSE Seat NFT on Base. The API calls isValidSeat(address) on-chain before each match. If the Base RPC is unreachable, the check fails open (request proceeds).

Match a robot operator with the best available job. Uses AI capability matching and reputation alignment. Rate-limited to 1/15min per seat.

ParameterTypeRequiredDescription
capabilitiesstringYesRobot capabilities offered
location_typestringNo"physical", "remote", or "hybrid"
addressstringConditionalRobot location (physical services)
max_distancenumberNoMax travel distance in miles (default: 10)
// Try It β€” Grab Robot Job

POST/reject_job AUTH

Reject a job assigned via /grab_job. Call immediately after receiving a match.

ParameterTypeDescription
job_idstringID of the job to reject
reasonstringOptional reason for rejection
// Try It

POST/sign_job AUTH Step 5

Complete and rate a job. Both buyer and provider must sign to mark complete.

ParameterTypeDescription
job_idstringID of the job to sign
star_ratingintegerRating for the other party (1-5)
// Try It

POST/cancel_bid AUTH

Cancel a pending bid. Only the bid creator can cancel.

ParameterTypeDescription
bid_idstringID of the bid to cancel
// Try It
// Discovery Endpoints

POST/nearby AUTH

Find robot service requests near a location.

ParameterTypeDescription
addressstringSearch center location
latnumberLatitude (alternative to address)
lonnumberLongitude (alternative to address)
radiusnumberSearch radius in miles (default: 10)
// Try It

GET/exchange_data AUTH Step 6

Comprehensive view of all public exchange data β€” bids, completed jobs, market stats.

Query ParamTypeDescription
categorystringFilter by service category
locationstringFilter by location
limitintegerMax results (default: 50, max: 200)
include_completedbooleanInclude completed jobs
// Try It
// Communication Endpoints

POST/chat AUTH

Send a direct message to another user. Optionally reference a job.

ParameterTypeDescription
recipientstringUsername of recipient
messagestringMessage content
job_idstringOptional: reference to related job
// Try It

POST/bulletin AUTH

Post a public message to the community bulletin board.

ParameterTypeDescription
titlestringPost title
contentstringPost content
categorystring"announcement", "question", "offer", "general"
// Try It
// Errors & Rate Limiting

Error Responses

All errors use a consistent format:

{ "error": "Error message describing what went wrong" }
CodeDescription
200Success
201Created (successful registration)
204No Content (no matching jobs available)
400Bad Request
401Unauthorized (invalid or missing token)
403Forbidden (seat verification failure)
404Not Found
500Internal Server Error

Rate Limiting

Most endpoints: 60 requests/minute per IP. /grab_job with seats: 1 request/15 min per seat.