{"openapi":"3.0.0","info":{"title":"222 Backend APIs","description":"APIs for onboarding users, and the functioning of the app. Both Landlords and Service Providers","version":"1.0.0"},"servers":[{"url":"http://localhost:5000"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/signup":{"post":{"summary":"Register a new user","description":"Register a new user with the provided details","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"password":{"type":"string"},"usertype_id":{"type":"integer"}},"required":["firstname","lastname","email","phone","password","usertype_id"]}}}},"responses":{"201":{"description":"User registered successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"message":{"type":"string","example":"You have been registered successfully, Please login with your credentials"}}}}}},"400":{"description":"Bad request - Missing field","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"<field> is missing"}}}}}},"409":{"description":"Conflict - Email already exists","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"This email is already registered!"}}}}}}}}},"/signin":{"post":{"summary":"Authenticate user","description":"Authenticate user using email and password","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"},"usertype_id":{"type":"integer"}},"required":["email","password","usertype_id"]}}}},"responses":{"200":{"description":"Success - User authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"Success"},"message":{"type":"string","example":"Login Successfull..."},"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}}}}}},"400":{"description":"Bad request - Missing field","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"password is missing"}}}}}},"404":{"description":"Not found - User not registered with email","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"No user found registered with this email."}}}}}},"401":{"description":"Unauthorized - Wrong password","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Wrong password. Please try again..."}}}}}}}}},"/addproperty":{"post":{"summary":"Add a new property","description":"Add a new property with provided details","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"landlord_id":{"type":"integer"},"address":{"type":"string"},"city":{"type":"string"},"postcode":{"type":"string"},"property_type":{"type":"integer"}},"required":["landlord_id","address","city","postcode","property_type"]}}}},"responses":{"201":{"description":"Property added successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"message":{"type":"string","example":"Property has been added successfully..."}}}}}},"400":{"description":"Bad request - Missing field","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"<fieldname> is missing"}}}}}},"401":{"description":"Unauthorized - Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","example":"Missing Authorization Token"},"detail":{"type":"string","example":"No API Authorization Token provided."}}}}}}}}},"/uploadpropertycertificate":{"post":{"summary":"Upload property certificate","description":"Upload property certificate with provided details","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"property_id":{"type":"integer"},"landlord_id":{"type":"integer"},"certificate_type":{"type":"integer"},"certificate_start_date":{"type":"string","format":"date"},"certificate_end_date":{"type":"string","format":"date"},"certificate":{"type":"string","format":"binary"}},"required":["property_id","landlord_id","certificate_type","certificate_start_date","certificate_end_date","certificate"]}}}},"responses":{"201":{"description":"Property certificate uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"message":{"type":"string","example":"Property Certificate has been uploaded successfully..."}}}}}},"400":{"description":"Bad request - Missing field","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"<fieldname> is missing"}}}}}},"401":{"description":"Unauthorized - Missing or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","example":"Missing Authorization Token"},"detail":{"type":"string","example":"No API Authorization Token provided."}}}}}}}}}}}