openapi: 3.0.3 info: title: 'REZYDENT Nieruchomości API Documentation' description: 'API dla portalu nieruchomości REZYDENT. Umożliwia pobieranie ofert, kategorii i statystyk.' version: 1.0.0 servers: - url: 'http://127.0.0.1:8000' tags: - name: Categories description: "\nAPI endpoints for managing property categories" - name: Endpoints description: '' - name: Offers description: "\nAPI endpoints for managing real estate offers" paths: /api/categories: get: summary: 'Get categories list' operationId: getCategoriesList description: 'Retrieve all available property categories.' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: - id: 1 name: Mieszkania slug: mieszkania description: null - id: 2 name: Domy slug: domy description: null properties: data: type: array example: - id: 1 name: Mieszkania slug: mieszkania description: null - id: 2 name: Domy slug: domy description: null items: type: object properties: id: type: integer example: 1 name: type: string example: Mieszkania slug: type: string example: mieszkania description: type: string example: null tags: - Categories security: [] /api/user: get: summary: '' operationId: getApiUser description: '' parameters: [] responses: 401: description: '' content: application/json: schema: type: object example: message: Unauthenticated. properties: message: type: string example: Unauthenticated. tags: - Endpoints security: [] /api/inquiries: post: summary: '' operationId: postApiInquiries description: '' parameters: [] responses: { } tags: - Endpoints requestBody: required: true content: application/json: schema: type: object properties: offer_id: type: string description: 'The id of an existing record in the offers table.' example: architecto nullable: false name: type: string description: 'Must not be greater than 255 characters.' example: 'n' nullable: false email: type: string description: 'Must be a valid email address. Must not be greater than 255 characters.' example: ashly64@example.com nullable: false phone: type: string description: 'Must not be greater than 20 characters.' example: vdljnikhwaykcmyu nullable: true subject: type: string description: 'Must not be greater than 255 characters.' example: w nullable: true message: type: string description: '' example: architecto nullable: false inquiry_type: type: string description: '' example: viewing nullable: true enum: - general - viewing - offer_info - contact form_data: type: object description: '' example: null nullable: true properties: { } required: - offer_id - name - email - message security: [] /api/offers: get: summary: 'Get offers list' operationId: getOffersList description: 'Retrieve a paginated list of active real estate offers with optional filtering.' parameters: - in: query name: per_page description: 'Number of offers per page. Default: 12.' example: 12 required: false schema: type: integer description: 'Number of offers per page. Default: 12.' example: 12 nullable: false - in: query name: page description: 'Page number.' example: 1 required: false schema: type: integer description: 'Page number.' example: 1 nullable: false - in: query name: category description: 'Category ID to filter by.' example: 1 required: false schema: type: integer description: 'Category ID to filter by.' example: 1 nullable: false - in: query name: city description: 'City name to filter by.' example: Katowice required: false schema: type: string description: 'City name to filter by.' example: Katowice nullable: false - in: query name: min_price description: 'Minimum price filter.' example: 100000.0 required: false schema: type: number description: 'Minimum price filter.' example: 100000.0 nullable: false - in: query name: max_price description: 'Maximum price filter.' example: 500000.0 required: false schema: type: number description: 'Maximum price filter.' example: 500000.0 nullable: false - in: query name: min_area description: 'Minimum area filter (m²).' example: 50.0 required: false schema: type: number description: 'Minimum area filter (m²).' example: 50.0 nullable: false - in: query name: max_area description: 'Maximum area filter (m²).' example: 150.0 required: false schema: type: number description: 'Maximum area filter (m²).' example: 150.0 nullable: false - in: query name: rooms description: 'Number of rooms filter.' example: 3 required: false schema: type: integer description: 'Number of rooms filter.' example: 3 nullable: false - in: query name: sort_by description: 'Sort field. Default: data_zalozenia.' example: cena required: false schema: type: string description: 'Sort field. Default: data_zalozenia.' example: cena nullable: false - in: query name: sort_order description: 'Sort direction (asc/desc). Default: desc.' example: asc required: false schema: type: string description: 'Sort direction (asc/desc). Default: desc.' example: asc nullable: false responses: 200: description: '' content: application/json: schema: type: object example: data: - id: 1 numer_oferty: 01-S-001 title: null description: 'Beautiful apartment in city center' price: amount: '380762.00' currency: PLN per_meter: null location: city: Katowice district: Centrum street: Testowa postal_code: 40-001 agent: id: 2 name: 'Piotr Nowak' email: piotr@example.com phone: '+48 600 200 300' meta: current_page: 1 total: 12 per_page: 12 properties: data: type: array example: - id: 1 numer_oferty: 01-S-001 title: null description: 'Beautiful apartment in city center' price: amount: '380762.00' currency: PLN per_meter: null location: city: Katowice district: Centrum street: Testowa postal_code: 40-001 agent: id: 2 name: 'Piotr Nowak' email: piotr@example.com phone: '+48 600 200 300' items: type: object properties: id: type: integer example: 1 numer_oferty: type: string example: 01-S-001 title: type: string example: null description: type: string example: 'Beautiful apartment in city center' price: type: object properties: amount: type: string example: '380762.00' currency: type: string example: PLN per_meter: type: string example: null location: type: object properties: city: type: string example: Katowice district: type: string example: Centrum street: type: string example: Testowa postal_code: type: string example: 40-001 agent: type: object properties: id: type: integer example: 2 name: type: string example: 'Piotr Nowak' email: type: string example: piotr@example.com phone: type: string example: '+48 600 200 300' meta: type: object properties: current_page: type: integer example: 1 total: type: integer example: 12 per_page: type: integer example: 12 tags: - Offers security: [] '/api/offers/{id}': get: summary: 'Get offer details' operationId: getOfferDetails description: 'Retrieve detailed information about a specific real estate offer.' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: id: 1 numer_oferty: 01-S-001 title: null description: 'Beautiful apartment in city center' price: amount: '380762.00' currency: PLN per_meter: null location: city: Katowice district: Centrum street: Testowa postal_code: 40-001 details: area: '90.00' rooms: 3 floor: 2 total_floors: 8 agent: id: 2 name: 'Piotr Nowak' email: piotr@example.com phone: '+48 600 200 300' category: id: 1 name: Mieszkania slug: mieszkania properties: data: type: object properties: id: type: integer example: 1 numer_oferty: type: string example: 01-S-001 title: type: string example: null description: type: string example: 'Beautiful apartment in city center' price: type: object properties: amount: type: string example: '380762.00' currency: type: string example: PLN per_meter: type: string example: null location: type: object properties: city: type: string example: Katowice district: type: string example: Centrum street: type: string example: Testowa postal_code: type: string example: 40-001 details: type: object properties: area: type: string example: '90.00' rooms: type: integer example: 3 floor: type: integer example: 2 total_floors: type: integer example: 8 agent: type: object properties: id: type: integer example: 2 name: type: string example: 'Piotr Nowak' email: type: string example: piotr@example.com phone: type: string example: '+48 600 200 300' category: type: object properties: id: type: integer example: 1 name: type: string example: Mieszkania slug: type: string example: mieszkania 404: description: '' content: application/json: schema: type: object example: message: 'No query results for model [App\Models\Offer] 999' properties: message: type: string example: 'No query results for model [App\Models\Offer] 999' tags: - Offers security: [] parameters: - in: path name: id description: 'The ID of the offer.' example: 1 required: true schema: type: integer '/api/offers/category/{category}': get: summary: 'Get offers by category' operationId: getOffersByCategory description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: [] links: first: 'http://127.0.0.1:8000/api/offers/category/architecto?page=1' last: 'http://127.0.0.1:8000/api/offers/category/architecto?page=1' prev: null next: null meta: current_page: 1 from: null last_page: 1 links: - url: null label: '« Previous' page: null active: false - url: 'http://127.0.0.1:8000/api/offers/category/architecto?page=1' label: '1' page: 1 active: true - url: null label: 'Next »' page: null active: false path: 'http://127.0.0.1:8000/api/offers/category/architecto' per_page: 12 to: null total: 0 properties: data: type: array example: [] links: type: object properties: first: type: string example: 'http://127.0.0.1:8000/api/offers/category/architecto?page=1' last: type: string example: 'http://127.0.0.1:8000/api/offers/category/architecto?page=1' prev: type: string example: null next: type: string example: null meta: type: object properties: current_page: type: integer example: 1 from: type: string example: null last_page: type: integer example: 1 links: type: array example: - url: null label: '« Previous' page: null active: false - url: 'http://127.0.0.1:8000/api/offers/category/architecto?page=1' label: '1' page: 1 active: true - url: null label: 'Next »' page: null active: false items: type: object properties: url: type: string example: null label: type: string example: '« Previous' page: type: string example: null active: type: boolean example: false path: type: string example: 'http://127.0.0.1:8000/api/offers/category/architecto' per_page: type: integer example: 12 to: type: string example: null total: type: integer example: 0 tags: - Offers security: [] parameters: - in: path name: category description: 'The category.' example: architecto required: true schema: type: string '/api/offers/location/{location}': get: summary: 'Get offers by location' operationId: getOffersByLocation description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: [] links: first: 'http://127.0.0.1:8000/api/offers/location/architecto?page=1' last: 'http://127.0.0.1:8000/api/offers/location/architecto?page=1' prev: null next: null meta: current_page: 1 from: null last_page: 1 links: - url: null label: '« Previous' page: null active: false - url: 'http://127.0.0.1:8000/api/offers/location/architecto?page=1' label: '1' page: 1 active: true - url: null label: 'Next »' page: null active: false path: 'http://127.0.0.1:8000/api/offers/location/architecto' per_page: 12 to: null total: 0 properties: data: type: array example: [] links: type: object properties: first: type: string example: 'http://127.0.0.1:8000/api/offers/location/architecto?page=1' last: type: string example: 'http://127.0.0.1:8000/api/offers/location/architecto?page=1' prev: type: string example: null next: type: string example: null meta: type: object properties: current_page: type: integer example: 1 from: type: string example: null last_page: type: integer example: 1 links: type: array example: - url: null label: '« Previous' page: null active: false - url: 'http://127.0.0.1:8000/api/offers/location/architecto?page=1' label: '1' page: 1 active: true - url: null label: 'Next »' page: null active: false items: type: object properties: url: type: string example: null label: type: string example: '« Previous' page: type: string example: null active: type: boolean example: false path: type: string example: 'http://127.0.0.1:8000/api/offers/location/architecto' per_page: type: integer example: 12 to: type: string example: null total: type: integer example: 0 tags: - Offers security: [] parameters: - in: path name: location description: 'The location.' example: architecto required: true schema: type: string /api/stats: get: summary: 'Get portal statistics' operationId: getPortalStatistics description: 'Retrieve general statistics about the real estate portal.' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: total_offers: 12 featured_offers: 0 categories: - id: 1 name: Mieszkania offers_count: 2 - id: 2 name: Domy offers_count: 2 properties: total_offers: type: integer example: 12 featured_offers: type: integer example: 0 categories: type: array example: - id: 1 name: Mieszkania offers_count: 2 - id: 2 name: Domy offers_count: 2 items: type: object properties: id: type: integer example: 1 name: type: string example: Mieszkania offers_count: type: integer example: 2 tags: - Offers security: []