{"openapi":"3.1.0","info":{"title":"thelaw.lk API","version":"1.0.0","description":"Find Attorneys-at-Law in Sri Lanka by city, practice area, court and language, and send them an enquiry. Authenticated endpoints power the thelaw.lk practice-management web and mobile apps.","contact":{"url":"https://law.ideus.lk"}},"servers":[{"url":"https://lawbackend.ideus.lk/api/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"LawyerCard":{"type":"object","properties":{"slug":{"type":"string"},"displayName":{"type":"string"},"headline":{"type":"string"},"photoUrl":{"type":"string"},"enrolledYear":{"type":"integer"},"yearsOfPractice":{"type":"integer"},"isNotary":{"type":"boolean"},"verified":{"type":"boolean","description":"Enrolment checked by thelaw.lk against the Supreme Court roll"},"languages":{"type":"array","items":{"enum":["Sinhala","Tamil","English"]}},"consultModes":{"type":"array","items":{"enum":["IN_PERSON","PHONE","VIDEO"]}},"consultationFee":{"type":"integer","description":"Indicative first-consultation fee in LKR"},"city":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"},"district":{"type":"string"}}},"practiceAreas":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"}}}},"courts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"slug":{"type":"string"}}}}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}},"paths":{"/cities":{"get":{"operationId":"listCities","summary":"List Sri Lankan cities with the number of listed lawyers","responses":{"200":{"description":"Cities"}}}},"/practice-areas":{"get":{"operationId":"listPracticeAreas","summary":"List practice areas (family, land, criminal…)","responses":{"200":{"description":"Practice areas"}}}},"/courts":{"get":{"operationId":"listCourts","summary":"List Sri Lankan courts and tribunals","responses":{"200":{"description":"Courts"}}}},"/lawyers":{"get":{"operationId":"searchLawyers","summary":"Search published lawyer profiles","parameters":[{"name":"city","in":"query","schema":{"type":"string"},"description":"City slug from /cities, e.g. \"kandy\""},{"name":"area","in":"query","schema":{"type":"string"},"description":"Practice-area slug from /practice-areas, e.g. \"family-and-divorce\""},{"name":"court","in":"query","schema":{"type":"string"},"description":"Court slug from /courts"},{"name":"language","in":"query","schema":{"enum":["Sinhala","Tamil","English"]}},{"name":"notary","in":"query","schema":{"enum":["true","false"]},"description":"Only Notaries Public"},{"name":"mode","in":"query","schema":{"enum":["IN_PERSON","PHONE","VIDEO"]}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Name or firm"},{"name":"sort","in":"query","schema":{"enum":["relevance","experience","name"]}},{"name":"page","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Matching lawyers","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"lawyers":{"type":"array","items":{"$ref":"#/components/schemas/LawyerCard"}}}}}}}}}},"/lawyers/{slug}":{"get":{"operationId":"getLawyer","summary":"Full public profile of one lawyer","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Profile"},"404":{"description":"Not found"}}}},"/lawyers/{slug}/inquiries":{"post":{"operationId":"contactLawyer","summary":"Send an enquiry to a lawyer on behalf of a person (only with that person’s consent)","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","phone","message"],"properties":{"name":{"type":"string"},"phone":{"type":"string","description":"Sri Lankan mobile, e.g. 0771234567"},"email":{"type":"string"},"practiceArea":{"type":"string"},"message":{"type":"string","minLength":20}}}}}},"responses":{"201":{"description":"Delivered to the lawyer by email and SMS"},"429":{"description":"Too many enquiries"}}}},"/auth/register":{"post":{"operationId":"register","summary":"Create an account (CLIENT or LAWYER)","responses":{"201":{"description":"Tokens"}}}},"/auth/login":{"post":{"operationId":"login","summary":"Email and password sign-in","responses":{"200":{"description":"Tokens"}}}},"/auth/google/token":{"post":{"operationId":"googleToken","summary":"Mobile Google sign-in with an id token","responses":{"200":{"description":"Tokens"}}}}}}