Developer & AI Agent Documentation
Public REST API for mobile, web, and AI agent integrations.
Specs & discovery
Agent OpenAPI (API) — GET /api/v1/openapi/agent
Agent OpenAPI (static) — openapi-agent.yaml
Machine-readable — /.well-known/openapi
Credential tiers: Tier 0 = agent spec (no auth); Tier 1 = JWT/API key for REST; Tier 2 = partner key for full spec. See docs/PUBLIC_OPENAPI_GUIDE.md.
MCP agent guide — mcp-agent-guide.md
MCP tool inventory — mcp-feature-list.md (131 tools)
Owner MCP guide — mcp-owner-guide.md
REST operational guide: docs/API_AGENT_GUIDE.md in the GitHub repository.
JWT authentication
Log in with email/password; use accessToken as Bearer on protected routes.
curl -s -X POST "https://sewapedia.id/api/v1/auth/login" \
-H "Content-Type: application/json" \
-d '{"email":"customer@rentapp.local","password":"password123"}'Header: Authorization: Bearer {accessToken}. Refresh via POST /api/v1/auth/refresh.
Example — list assets
curl -s "https://sewapedia.id/api/v1/assets?limit=5"
Search vs availability
GET /assets finds candidates but does not guarantee dates. Always call GET /assets/{slug}/availability?from=&to= before booking.
curl -s "https://sewapedia.id/api/v1/assets/{slug}/availability?from=2026-09-01&to=2026-09-07"Booking flow (renter)
1. Discover — GET /assets or GET /catalog/feed
2. Availability — GET /assets/{slug}/availability per candidate
2. Create plan — POST /bookings → PENDING_VERIFICATION
3. Verify & promote — upload, GET /verification/status, POST /bookings/{id}/promote
4. Wait for owner approval — poll GET /bookings/{id}/readiness
5. Pay (human-in-the-loop) — POST /pay → redirectUrl, poll GET /pay/status
Universal Commerce Protocol (UCP)
UCP-compatible facade for agentic commerce. Manifest at /.well-known/ucp; REST endpoints at /api/v1/ucp/*. Maps to existing catalog, quote, and checkout flows — no AP2 mandates.
UCP merchant manifest — /.well-known/ucp
curl -s "https://sewapedia.id/.well-known/ucp"
curl -s "https://sewapedia.id/api/v1/ucp/products?limit=5"
curl -s -X POST "https://sewapedia.id/api/v1/ucp/quotes" \
-H "Content-Type: application/json" \
-d '{"productId":"<assetId>","rentalMode":"SELF_OPERATED","startDate":"2026-09-01","endDate":"2026-09-07"}'Hosted MCP (Model Context Protocol)
Connect AI agents directly to Sewapedia via Streamable HTTP — no local stdio required. Use the login tool to obtain accessToken, or pass Bearer JWT / X-Api-Key on MCP HTTP headers.
131 MCP tools total (69 consumer + 62 owner). Full inventory: mcp-feature-list.md
MCP manifest — /.well-known/mcp
MCP agent guide — mcp-agent-guide.md
Public (24): search_assets, check_availability, pricing_quote, catalog_feed, get_asset_detail, list_categories, get_vendor, register_account, login, create_login_link, get_login_status, ucp_discover, ucp_products, ucp_product, ucp_availability, ucp_quote, get_category_requirements, get_trust_profile, refresh_token, logout, manage_asset_inquiry, forgot_password, reset_password, health_check
Auth (45): get_profile, activate_vendor, list_my_bookings, get_booking_detail, booking_readiness, create_booking, promote_booking, initiate_payment, ucp_checkout, ucp_checkout_create, ucp_checkout_status, ucp_checkout_complete, ucp_webhook_register, cancel_booking, apply_credit, request_extension, get_pay_status, get_verification_status, upload_document, list_notifications, mark_notification_read, respond_counter_offer, manage_booking_chat, get_account_credit, list_booking_extensions, list_reviews, submit_review, assess_risk, manage_booking_condition, manage_api_keys, verify_phone_otp, report_offline_payment, manage_booking_incidents, manage_booking_dispute, get_payment_options, get_payment_invoice, update_profile, change_password, list_conversations, manage_inquiry_thread, update_booking_collateral, get_active_booking, manage_push_subscription, list_ucp_webhooks, manage_agent_webhooks
# Hermes / external agent — hosted MCP (Streamable HTTP)
curl -s "https://sewapedia.id/.well-known/mcp"
# Connect MCP client to:
https://sewapedia.id/api/v1/mcp
# 1. login tool (no auth) → store accessToken
# 2. Pass Authorization: Bearer {accessToken} on subsequent tool calls
curl -s -X POST "https://sewapedia.id/api/v1/mcp" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {accessToken}" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'Hosted MCP — Owner (VENDOR)
Separate MCP endpoint for asset owners. Requires VENDOR JWT or API key with read:owner / write:owner scopes. CUSTOMER accounts and API keys are blocked.
62 owner MCP tools: 5 public + 57 authenticated. See docs/MCP_FEATURE_LIST.md §2.
Owner MCP manifest — /.well-known/mcp-owner
Owner MCP guide — mcp-owner-guide.md
Owner public (5): register_vendor_account, owner_login, create_login_link, get_login_status, get_vendor_theme_presets
Owner auth (57): list_owner_requests, get_owner_calendar, approve_booking, reject_booking, list_owner_bookings, list_my_assets, get_owner_analytics, manage_blackout, create_asset, get_owner_booking_detail, create_counter_offer, review_renter_documents, manage_booking_chat, update_asset, delete_asset, respond_extension, get_finance_summary, list_finance_entries, create_finance_entry, get_finance_entry, get_storefront, update_storefront, upload_asset_image, delete_asset_image, manage_booking_condition, get_finance_pnl, update_finance_entry, delete_finance_entry, list_owner_payouts, manage_payout_bank, confirm_offline_payment, get_renter_snapshot, get_owner_asset_detail, get_pricing_recommendation, manage_owner_commissions, upload_commission_proof, export_finance_csv, manage_finance_tax, get_finance_categories, duplicate_finance_entry, manage_acquisitions, manage_opex_recurring, manage_opex_checklist, opex_quick_add, get_portfolio_pricing, get_asset_finance, manage_repair_expenses, manage_maintenance, manage_duration_rules, manage_storefront_slug, update_vendor_type, get_seo_listings, get_chat_metrics, manage_owner_feedback, manage_booking_incidents, manage_booking_dispute, list_conversations
# Owner MCP — VENDOR role only (separate endpoint)
curl -s "https://sewapedia.id/.well-known/mcp-owner"
# Connect MCP client to:
https://sewapedia.id/api/v1/mcp-owner
# 1. owner_login tool → store vendor accessToken
# 2. Pass Authorization: Bearer {accessToken} on subsequent callsResponse envelope
{ "success": true, "data": { ... } }
{ "success": false, "error": "message" }