Enhance Tender Search API with Advanced Filtering and Documentation Updates
- Updated the Tender Search API to include additional query parameters for enhanced filtering capabilities, such as currency, deadline ranges, publication dates, languages, and buyer organization ID. - Changed existing query parameter types from integer to string for better flexibility in search queries. - Improved Swagger and YAML documentation to reflect the new parameters and their descriptions, ensuring clarity for API consumers. - Updated handler comments to align with the new query structure, providing comprehensive details for each parameter. - Enhanced response structures to return a well-defined SearchResponse, improving the overall API usability and documentation consistency.
This commit is contained in:
+159
-34
@@ -612,6 +612,13 @@ definitions:
|
||||
name:
|
||||
type: string
|
||||
type: object
|
||||
tender.SearchResponse:
|
||||
properties:
|
||||
tenders:
|
||||
items:
|
||||
$ref: '#/definitions/tender.TenderResponse'
|
||||
type: array
|
||||
type: object
|
||||
tender.TenderResponse:
|
||||
properties:
|
||||
application_deadline:
|
||||
@@ -4364,18 +4371,39 @@ paths:
|
||||
description: Retrieve active tenders for mobile application users with automatic
|
||||
company-based matching from customer profile
|
||||
parameters:
|
||||
- description: 'Number of items per page (default: 20, max: 50)'
|
||||
- description: Search query for title and description
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
- description: 'Number of items to skip (default: 0)'
|
||||
in: query
|
||||
name: offset
|
||||
type: integer
|
||||
- description: Filter by country code
|
||||
in: query
|
||||
name: country_code
|
||||
name: q
|
||||
type: string
|
||||
- description: Filter by notice type code
|
||||
in: query
|
||||
name: notice_type
|
||||
type: string
|
||||
- description: Filter by procurement type code
|
||||
in: query
|
||||
name: procurement_type
|
||||
type: string
|
||||
- collectionFormat: csv
|
||||
description: Filter by country codes (comma-separated)
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: country_codes
|
||||
type: array
|
||||
- collectionFormat: csv
|
||||
description: Filter by status (comma-separated)
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: status
|
||||
type: array
|
||||
- collectionFormat: csv
|
||||
description: Filter by source (comma-separated)
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: source
|
||||
type: array
|
||||
- description: Minimum estimated value
|
||||
in: query
|
||||
name: min_estimated_value
|
||||
@@ -4384,14 +4412,53 @@ paths:
|
||||
in: query
|
||||
name: max_estimated_value
|
||||
type: number
|
||||
- description: Publication from
|
||||
- description: Filter by currency
|
||||
in: query
|
||||
name: publication_from
|
||||
type: number
|
||||
- description: Publication to
|
||||
name: currency
|
||||
type: string
|
||||
- description: Deadline from
|
||||
in: query
|
||||
name: publication_to
|
||||
name: deadline_from
|
||||
type: number
|
||||
- description: Deadline to
|
||||
in: query
|
||||
name: deadline_to
|
||||
type: number
|
||||
- description: Publication date from
|
||||
in: query
|
||||
name: publication_date_from
|
||||
type: number
|
||||
- description: Publication date to
|
||||
in: query
|
||||
name: publication_date_to
|
||||
type: number
|
||||
- collectionFormat: csv
|
||||
description: Filter by languages (comma-separated)
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: languages
|
||||
type: array
|
||||
- description: Filter by buyer organization ID
|
||||
in: query
|
||||
name: buyer_organization_id
|
||||
type: string
|
||||
- description: 'Number of items per page (default: 20, max: 100)'
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
- description: 'Number of items to skip (default: 0)'
|
||||
in: query
|
||||
name: offset
|
||||
type: integer
|
||||
- description: Sort by field
|
||||
in: query
|
||||
name: sort_by
|
||||
type: string
|
||||
- description: Sort order (asc or desc)
|
||||
in: query
|
||||
name: sort_order
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -4402,8 +4469,7 @@ paths:
|
||||
- $ref: '#/definitions/response.APIResponse'
|
||||
- properties:
|
||||
data:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
$ref: '#/definitions/tender.SearchResponse'
|
||||
type: object
|
||||
"400":
|
||||
description: Bad Request
|
||||
@@ -4459,18 +4525,39 @@ paths:
|
||||
description: Retrieve active tenders for mobile application users with automatic
|
||||
company-based matching from customer profile
|
||||
parameters:
|
||||
- description: 'Number of items per page (default: 20, max: 50)'
|
||||
- description: Search query for title and description
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
- description: 'Number of items to skip (default: 0)'
|
||||
in: query
|
||||
name: offset
|
||||
type: integer
|
||||
- description: Filter by country code
|
||||
in: query
|
||||
name: country_code
|
||||
name: q
|
||||
type: string
|
||||
- description: Filter by notice type code
|
||||
in: query
|
||||
name: notice_type
|
||||
type: string
|
||||
- description: Filter by procurement type code
|
||||
in: query
|
||||
name: procurement_type
|
||||
type: string
|
||||
- collectionFormat: csv
|
||||
description: Filter by country codes (comma-separated)
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: country_codes
|
||||
type: array
|
||||
- collectionFormat: csv
|
||||
description: Filter by status (comma-separated)
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: status
|
||||
type: array
|
||||
- collectionFormat: csv
|
||||
description: Filter by source (comma-separated)
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: source
|
||||
type: array
|
||||
- description: Minimum estimated value
|
||||
in: query
|
||||
name: min_estimated_value
|
||||
@@ -4479,14 +4566,53 @@ paths:
|
||||
in: query
|
||||
name: max_estimated_value
|
||||
type: number
|
||||
- description: Publication from
|
||||
- description: Filter by currency
|
||||
in: query
|
||||
name: publication_from
|
||||
type: number
|
||||
- description: Publication to
|
||||
name: currency
|
||||
type: string
|
||||
- description: Deadline from
|
||||
in: query
|
||||
name: publication_to
|
||||
name: deadline_from
|
||||
type: number
|
||||
- description: Deadline to
|
||||
in: query
|
||||
name: deadline_to
|
||||
type: number
|
||||
- description: Publication date from
|
||||
in: query
|
||||
name: publication_date_from
|
||||
type: number
|
||||
- description: Publication date to
|
||||
in: query
|
||||
name: publication_date_to
|
||||
type: number
|
||||
- collectionFormat: csv
|
||||
description: Filter by languages (comma-separated)
|
||||
in: query
|
||||
items:
|
||||
type: string
|
||||
name: languages
|
||||
type: array
|
||||
- description: Filter by buyer organization ID
|
||||
in: query
|
||||
name: buyer_organization_id
|
||||
type: string
|
||||
- description: 'Number of items per page (default: 20, max: 100)'
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
- description: 'Number of items to skip (default: 0)'
|
||||
in: query
|
||||
name: offset
|
||||
type: integer
|
||||
- description: Sort by field
|
||||
in: query
|
||||
name: sort_by
|
||||
type: string
|
||||
- description: Sort order (asc or desc)
|
||||
in: query
|
||||
name: sort_order
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -4497,8 +4623,7 @@ paths:
|
||||
- $ref: '#/definitions/response.APIResponse'
|
||||
- properties:
|
||||
data:
|
||||
additionalProperties: true
|
||||
type: object
|
||||
$ref: '#/definitions/tender.SearchResponse'
|
||||
type: object
|
||||
"400":
|
||||
description: Bad Request
|
||||
|
||||
Reference in New Issue
Block a user