{"openapi":"3.1.0","info":{"title":"Jobconnectz API","version":"1.0.0","description":"Service marketplace API. Cookie session auth (`jc_session`).","contact":{"name":"Jobconnectz Engineering","email":"api@jobconnectz.com"},"license":{"name":"Proprietary"}},"servers":[{"url":"https://jc.gtiholding.com"}],"components":{"securitySchemes":{"sessionCookie":{"type":"apiKey","in":"cookie","name":"jc_session"}},"schemas":{"Envelope":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"data":{"type":"object","additionalProperties":true},"error":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"issues":{"type":"object"}}}}},"LatLng":{"type":"object","required":["latitude","longitude"],"properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}}},"Job":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PENDING_MATCH","OFFERED","ACCEPTED","EN_ROUTE","ARRIVED","IN_PROGRESS","AWAITING_APPROVAL","COMPLETED","CANCELLED","DISPUTED","EXPIRED"]},"urgency":{"type":"string","enum":["SAME_DAY","SCHEDULED","EMERGENCY"]},"pricingModel":{"type":"string"},"quotedAmountMinor":{"type":"integer","nullable":true},"finalAmountMinor":{"type":"integer","nullable":true},"currency":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"CreateJobInput":{"type":"object","required":["categoryId","description","urgency","pricingModel","addressId"],"properties":{"categoryId":{"type":"string"},"description":{"type":"string","minLength":10,"maxLength":2000},"urgency":{"type":"string","enum":["SAME_DAY","SCHEDULED","EMERGENCY"]},"scheduledFor":{"type":"string","format":"date-time"},"pricingModel":{"type":"string","enum":["FIXED","CUSTOMER_QUOTE_REQUEST","VENDOR_QUOTE","HOURLY","INSPECTION_FEE","CALL_OUT_FEE","NEGOTIATED"]},"quotedAmountMinor":{"type":"integer","minimum":0},"addressId":{"type":"string"},"mediaUrls":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":8}}}}},"security":[{"sessionCookie":[]}],"paths":{"/api/health":{"get":{"summary":"Health check","security":[],"responses":{"200":{"description":"OK"}}}},"/api/openapi":{"get":{"summary":"This document","security":[],"responses":{"200":{"description":"OpenAPI spec"}}}},"/api/auth/register":{"post":{"summary":"Register a new account","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fullName","email","phone","password","role"],"properties":{"fullName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"password":{"type":"string","minLength":8},"role":{"type":"string","enum":["CUSTOMER","VENDOR"]},"countryCode":{"type":"string"}}}}}},"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}}}}},"/api/auth/login":{"post":{"summary":"Sign in","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["identifier","password"],"properties":{"identifier":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"}}}},"/api/auth/logout":{"post":{"summary":"Sign out","responses":{"200":{"description":"OK"}}}},"/api/auth/me":{"get":{"summary":"Current user","responses":{"200":{"description":"OK"}}}},"/api/auth/2fa/setup":{"post":{"summary":"Begin TOTP enrolment","responses":{"200":{"description":"OK"}}}},"/api/auth/2fa/verify":{"post":{"summary":"Verify TOTP code","responses":{"200":{"description":"OK"}}}},"/api/auth/2fa/disable":{"post":{"summary":"Disable 2FA","responses":{"200":{"description":"OK"}}}},"/api/categories":{"get":{"summary":"List active service categories","security":[],"responses":{"200":{"description":"OK"}}}},"/api/jobs":{"get":{"summary":"List jobs (own when CUSTOMER, all when ADMIN)","responses":{"200":{"description":"OK"}}},"post":{"summary":"Create a job and broadcast to vendors","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJobInput"}}}},"responses":{"201":{"description":"Created"}}}},"/api/jobs/{id}":{"get":{"summary":"Job detail","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/jobs/{id}/accept":{"post":{"summary":"Vendor accepts an offer","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/jobs/{id}/status":{"post":{"summary":"Transition job status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["to"],"properties":{"to":{"type":"string","enum":["EN_ROUTE","ARRIVED","IN_PROGRESS","AWAITING_APPROVAL","COMPLETED","CANCELLED","DISPUTED"]},"finalAmountMinor":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK"}}}},"/api/jobs/{id}/review":{"post":{"summary":"Customer rates a vendor","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/jobs/{id}/dispute":{"post":{"summary":"Open a dispute","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/jobs/{id}/messages":{"get":{"summary":"Chat history","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}},"post":{"summary":"Send a chat message","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/jobs/{id}/stream":{"get":{"summary":"Server-Sent Events stream of live job updates","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"text/event-stream"}}}},"/api/payments/initiate":{"post":{"summary":"Initiate payment for a job","responses":{"200":{"description":"OK"}}}},"/api/payments/webhook":{"post":{"summary":"Provider webhook (signed)","security":[],"responses":{"200":{"description":"OK"}}}},"/api/wallet/topup":{"post":{"summary":"Customer wallet top-up","responses":{"200":{"description":"OK"}}}},"/api/vendor/availability":{"post":{"summary":"Toggle vendor online + push location","responses":{"200":{"description":"OK"}}}},"/api/vendor/offers":{"get":{"summary":"Pending job offers","responses":{"200":{"description":"OK"}}}},"/api/vendor/wallet":{"get":{"summary":"Vendor wallet + last 50 transactions","responses":{"200":{"description":"OK"}}}},"/api/vendor/payouts":{"get":{"summary":"Payout history","responses":{"200":{"description":"OK"}}},"post":{"summary":"Request a bank payout","responses":{"200":{"description":"OK"}}}},"/api/vendor/services":{"put":{"summary":"Replace service-category set","responses":{"200":{"description":"OK"}}}},"/api/vendor/kyc":{"get":{"summary":"List own KYC documents","responses":{"200":{"description":"OK"}}},"post":{"summary":"Submit a KYC document URL for review","responses":{"200":{"description":"OK"}}}},"/api/vendor/subscriptions":{"get":{"summary":"List plans + current subscription (when feature enabled)","responses":{"200":{"description":"OK"}}},"post":{"summary":"Activate a plan","responses":{"200":{"description":"OK"}}}},"/api/admin/settings":{"get":{"summary":"Admin: read all settings + flags","responses":{"200":{"description":"OK"}}},"put":{"summary":"Admin: bulk-update settings + flags","responses":{"200":{"description":"OK"}}}},"/api/admin/vendors/{id}":{"patch":{"summary":"Admin: update vendor status / verification / featured","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/admin/jobs/{id}/assign":{"post":{"summary":"Admin: manual job assignment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/admin/kyc/{id}":{"patch":{"summary":"Admin: approve / reject KYC document","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/admin/plans":{"get":{"summary":"Admin: list subscription plans","responses":{"200":{"description":"OK"}}},"post":{"summary":"Admin: create / upsert plan","responses":{"200":{"description":"OK"}}}},"/api/me/export":{"get":{"summary":"GDPR data export","responses":{"200":{"description":"JSON download"}}}},"/api/me":{"delete":{"summary":"Delete account (GDPR)","responses":{"200":{"description":"OK"}}}},"/api/devices":{"post":{"summary":"Register a push device token","responses":{"200":{"description":"OK"}}},"delete":{"summary":"Unregister a device token","responses":{"200":{"description":"OK"}}}},"/api/uploads":{"post":{"summary":"Get a presigned upload URL","responses":{"200":{"description":"OK"}}}}}}