{"openapi":"3.0.3","info":{"title":"TradeNexusMarket API","version":"1.0.0","description":"Members-only commodity desk. Versioned REST under /api/v1. Cookie session (tnm_session). Live chat uses WebSocket /ws."},"servers":[{"url":"/api/v1"}],"paths":{"/health":{"get":{"summary":"Health check"}},"/openapi.json":{"get":{"summary":"This document"}},"/auth/register":{"post":{"summary":"Create an account (step 1 of the membership application)"}},"/auth/email/send-code":{"post":{"summary":"Send a 6-digit email confirmation code"}},"/auth/email/verify":{"post":{"summary":"Confirm the email with the code"}},"/applications/me":{"get":{"summary":"The signed-in member's application"},"patch":{"summary":"Save one wizard step ({ step, data })"}},"/applications/me/submit":{"post":{"summary":"Sign the declarations and submit for review"}},"/applications/me/past-deals":{"post":{"summary":"Add a past deal (1 to 5)"}},"/applications/me/past-deals/{id}":{"delete":{"summary":"Remove a past deal"}},"/applications/me/references":{"post":{"summary":"Add a trade reference (up to 2)"}},"/applications/me/references/{id}":{"delete":{"summary":"Remove a trade reference"}},"/admin/documents/{id}/review":{"post":{"summary":"Approve, reject or ask to re-upload one document"}},"/admin/companies/{id}/checks":{"post":{"summary":"Sanctions, video KYC, past performance and email checks"}},"/admin/past-deals/{id}/verify":{"post":{"summary":"Mark a past deal verified"}},"/admin/references/{id}/verify":{"post":{"summary":"Mark a trade reference verified"}},"/admin/expiry-sweep":{"post":{"summary":"Run the document expiry sweep now (super admin)"}},"/auth/login":{"post":{"summary":"Sign in"}},"/auth/logout":{"post":{"summary":"Sign out"}},"/auth/me":{"get":{"summary":"Current member"}},"/contact":{"post":{"summary":"Public contact form"}},"/categories":{"get":{"summary":"Commodity categories"}},"/listings":{"get":{"summary":"Search listings. Public responses hide seller identity."},"post":{"summary":"Create a listing (verified company)"}},"/listings/{id}":{"get":{"summary":"Listing detail"},"patch":{"summary":"Update a listing and store a version"}},"/rfqs":{"get":{"summary":"List RFQs"},"post":{"summary":"Post an RFQ"}},"/rfqs/{id}":{"get":{"summary":"RFQ detail"}},"/rfqs/{id}/quotes":{"post":{"summary":"Seller quote on an RFQ"}},"/documents":{"post":{"summary":"Upload a private document (multipart)"}},"/documents/{id}":{"get":{"summary":"Download a document the caller is allowed to see"}},"/companies/me":{"get":{"summary":"Own company, documents, verification status"}},"/deals":{"get":{"summary":"Deals visible to the caller"}},"/deals/{id}":{"get":{"summary":"Deal room"}},"/deals/{id}/messages":{"get":{"summary":"Deal room messages"},"post":{"summary":"Post a message (emails and phones are masked)"}},"/deals/{id}/offers":{"post":{"summary":"Versioned offer"}},"/deals/{id}/offers/{offerId}/accept":{"post":{"summary":"Counterparty accepts an offer"}},"/deals/{id}/offers/{offerId}/reject":{"post":{"summary":"Counterparty rejects an offer"}},"/deals/{id}/commission-ack":{"post":{"summary":"Acknowledge the per-deal commission"}},"/deals/{id}/complete":{"post":{"summary":"Declare completion with evidence"}},"/deals/{id}/confirm-completion":{"post":{"summary":"Other party confirms completion and invoices commission"}},"/deals/{id}/dispute":{"post":{"summary":"Open a dispute"}},"/deals/{id}/cancel":{"post":{"summary":"Cancel before acceptance, or admin cancel"}},"/invoices":{"get":{"summary":"Invoices for the caller's deals"}},"/notifications":{"get":{"summary":"In-app notifications"}},"/reports":{"post":{"summary":"Report a fake member or a listing"}},"/match-requests":{"post":{"summary":"Ask the desk to match your listing or RFQ"}},"/blocks":{"get":{"summary":"Companies you have blocked"},"post":{"summary":"Block a company"}},"/blocks/{companyId}":{"delete":{"summary":"Unblock a company"}},"/admin/verification":{"get":{"summary":"Verification queue"}},"/admin/verification/{id}":{"get":{"summary":"Verification case with documents"}},"/admin/verification/{id}/decision":{"post":{"summary":"Approve, reject, or request more info"}},"/admin/matches":{"get":{"summary":"Match-request queue and scored suggestions"}},"/admin/deals":{"post":{"summary":"Approve a match and enter that deal's commission rate. The room opens after both sides accept the agreement."}},"/admin/deals/{id}/commission":{"patch":{"summary":"Set the commission rate on a deal. Not shown to members."}},"/admin/companies/{id}/suspension":{"post":{"summary":"Block or restore a company"}},"/admin/commissions":{"get":{"summary":"Policies, ledger, invoices"}},"/admin/policies/{id}":{"patch":{"summary":"Update a commission policy"}},"/admin/invoices/{id}/payments":{"post":{"summary":"Record an off-platform commission payment"}},"/admin/moderation":{"get":{"summary":"Open reports and disputes"}},"/admin/moderation/{id}/resolve":{"post":{"summary":"Resolve a report"}},"/admin/listings/{id}/moderate":{"post":{"summary":"Flag, close, or restore a listing"}},"/admin/categories":{"post":{"summary":"Create a category"}},"/admin/categories/{id}":{"patch":{"summary":"Update a category"}},"/admin/audit":{"get":{"summary":"Audit log"}},"/admin/inquiries":{"get":{"summary":"Contact form inquiries"}},"/admin/jobs":{"get":{"summary":"Background job counts"}}}}