05165c6587
- Deleted the company_id field from CreateUserForm, User entity, and related API documentation in Swagger and YAML files to streamline user creation process. - Updated the CreateUser service method to reflect the removal of company_id, ensuring consistency across the user management functionality.
4723 lines
127 KiB
YAML
4723 lines
127 KiB
YAML
basePath: /
|
|
definitions:
|
|
company.AddTagsForm:
|
|
properties:
|
|
categories:
|
|
items:
|
|
type: string
|
|
type: array
|
|
certifications:
|
|
items:
|
|
type: string
|
|
type: array
|
|
cpv_codes:
|
|
items:
|
|
type: string
|
|
type: array
|
|
keywords:
|
|
items:
|
|
type: string
|
|
type: array
|
|
specializations:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
company.Address:
|
|
properties:
|
|
city:
|
|
type: string
|
|
country:
|
|
type: string
|
|
postal_code:
|
|
type: string
|
|
state:
|
|
type: string
|
|
street:
|
|
type: string
|
|
type: object
|
|
company.AddressForm:
|
|
properties:
|
|
city:
|
|
type: string
|
|
country:
|
|
type: string
|
|
postal_code:
|
|
type: string
|
|
state:
|
|
type: string
|
|
street:
|
|
type: string
|
|
type: object
|
|
company.CPVCodeCount:
|
|
properties:
|
|
count:
|
|
type: integer
|
|
cpv_code:
|
|
type: string
|
|
type: object
|
|
company.CategoryCount:
|
|
properties:
|
|
category:
|
|
type: string
|
|
count:
|
|
type: integer
|
|
type: object
|
|
company.CompanyListResponse:
|
|
properties:
|
|
companies:
|
|
items:
|
|
$ref: '#/definitions/company.CompanyResponse'
|
|
type: array
|
|
limit:
|
|
type: integer
|
|
offset:
|
|
type: integer
|
|
total:
|
|
type: integer
|
|
total_pages:
|
|
type: integer
|
|
type: object
|
|
company.CompanyResponse:
|
|
properties:
|
|
address:
|
|
$ref: '#/definitions/company.Address'
|
|
annual_revenue:
|
|
type: number
|
|
compliance_notes:
|
|
type: string
|
|
contact_person:
|
|
$ref: '#/definitions/company.ContactPerson'
|
|
created_at:
|
|
type: integer
|
|
created_by:
|
|
type: string
|
|
currency:
|
|
type: string
|
|
description:
|
|
type: string
|
|
email:
|
|
type: string
|
|
employee_count:
|
|
type: integer
|
|
founded_year:
|
|
type: integer
|
|
id:
|
|
type: string
|
|
industry:
|
|
type: string
|
|
is_compliant:
|
|
type: boolean
|
|
is_verified:
|
|
type: boolean
|
|
language:
|
|
type: string
|
|
name:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
registration_number:
|
|
type: string
|
|
status:
|
|
type: string
|
|
tags:
|
|
$ref: '#/definitions/company.CompanyTags'
|
|
tax_id:
|
|
type: string
|
|
timezone:
|
|
type: string
|
|
type:
|
|
type: string
|
|
updated_at:
|
|
type: integer
|
|
updated_by:
|
|
type: string
|
|
website:
|
|
type: string
|
|
type: object
|
|
company.CompanyStatsResponse:
|
|
properties:
|
|
active_companies:
|
|
type: integer
|
|
companies_by_industry:
|
|
additionalProperties:
|
|
format: int64
|
|
type: integer
|
|
type: object
|
|
companies_by_status:
|
|
additionalProperties:
|
|
format: int64
|
|
type: integer
|
|
type: object
|
|
companies_by_type:
|
|
additionalProperties:
|
|
format: int64
|
|
type: integer
|
|
type: object
|
|
top_categories:
|
|
items:
|
|
$ref: '#/definitions/company.CategoryCount'
|
|
type: array
|
|
top_cpv_codes:
|
|
items:
|
|
$ref: '#/definitions/company.CPVCodeCount'
|
|
type: array
|
|
total_companies:
|
|
type: integer
|
|
verified_companies:
|
|
type: integer
|
|
type: object
|
|
company.CompanyTags:
|
|
properties:
|
|
categories:
|
|
description: Categories
|
|
items:
|
|
type: string
|
|
type: array
|
|
certifications:
|
|
description: Certifications
|
|
items:
|
|
type: string
|
|
type: array
|
|
cpv_codes:
|
|
description: CPV codes (Common Procurement Vocabulary)
|
|
items:
|
|
type: string
|
|
type: array
|
|
keywords:
|
|
description: Keywords for search and matching
|
|
items:
|
|
type: string
|
|
type: array
|
|
specializations:
|
|
description: Specializations
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
company.CompanyTagsForm:
|
|
properties:
|
|
categories:
|
|
items:
|
|
type: string
|
|
type: array
|
|
certifications:
|
|
items:
|
|
type: string
|
|
type: array
|
|
cpv_codes:
|
|
items:
|
|
type: string
|
|
type: array
|
|
keywords:
|
|
items:
|
|
type: string
|
|
type: array
|
|
specializations:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
company.ContactPerson:
|
|
properties:
|
|
email:
|
|
type: string
|
|
first_name:
|
|
type: string
|
|
full_name:
|
|
type: string
|
|
is_primary:
|
|
type: boolean
|
|
last_name:
|
|
type: string
|
|
mobile:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
position:
|
|
type: string
|
|
type: object
|
|
company.ContactPersonForm:
|
|
properties:
|
|
email:
|
|
type: string
|
|
first_name:
|
|
type: string
|
|
full_name:
|
|
type: string
|
|
is_primary:
|
|
type: boolean
|
|
last_name:
|
|
type: string
|
|
mobile:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
position:
|
|
type: string
|
|
type: object
|
|
company.CreateCompanyForm:
|
|
properties:
|
|
address:
|
|
allOf:
|
|
- $ref: '#/definitions/company.AddressForm'
|
|
description: Address information
|
|
annual_revenue:
|
|
type: number
|
|
contact_person:
|
|
allOf:
|
|
- $ref: '#/definitions/company.ContactPersonForm'
|
|
description: Contact information
|
|
currency:
|
|
type: string
|
|
description:
|
|
type: string
|
|
email:
|
|
type: string
|
|
employee_count:
|
|
description: Business information
|
|
type: integer
|
|
founded_year:
|
|
type: integer
|
|
industry:
|
|
type: string
|
|
language:
|
|
description: Settings
|
|
type: string
|
|
name:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
registration_number:
|
|
type: string
|
|
tags:
|
|
allOf:
|
|
- $ref: '#/definitions/company.CompanyTagsForm'
|
|
description: Tags for categorization and search
|
|
tax_id:
|
|
type: string
|
|
timezone:
|
|
type: string
|
|
type:
|
|
type: string
|
|
website:
|
|
type: string
|
|
type: object
|
|
company.RemoveTagsForm:
|
|
properties:
|
|
categories:
|
|
items:
|
|
type: string
|
|
type: array
|
|
certifications:
|
|
items:
|
|
type: string
|
|
type: array
|
|
cpv_codes:
|
|
items:
|
|
type: string
|
|
type: array
|
|
keywords:
|
|
items:
|
|
type: string
|
|
type: array
|
|
specializations:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
company.SuspendCompanyForm:
|
|
properties:
|
|
reason:
|
|
type: string
|
|
type: object
|
|
company.UpdateCompanyForm:
|
|
properties:
|
|
address:
|
|
allOf:
|
|
- $ref: '#/definitions/company.AddressForm'
|
|
description: Address information
|
|
annual_revenue:
|
|
type: number
|
|
contact_person:
|
|
allOf:
|
|
- $ref: '#/definitions/company.ContactPersonForm'
|
|
description: Contact information
|
|
currency:
|
|
type: string
|
|
description:
|
|
type: string
|
|
email:
|
|
type: string
|
|
employee_count:
|
|
description: Business information
|
|
type: integer
|
|
founded_year:
|
|
type: integer
|
|
industry:
|
|
type: string
|
|
language:
|
|
description: Settings
|
|
type: string
|
|
name:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
registration_number:
|
|
type: string
|
|
tags:
|
|
allOf:
|
|
- $ref: '#/definitions/company.CompanyTagsForm'
|
|
description: Tags for categorization and search
|
|
tax_id:
|
|
type: string
|
|
timezone:
|
|
type: string
|
|
type:
|
|
type: string
|
|
website:
|
|
type: string
|
|
type: object
|
|
company.UpdateCompanyStatusForm:
|
|
properties:
|
|
status:
|
|
type: string
|
|
type: object
|
|
company.UpdateCompanyTagsForm:
|
|
properties:
|
|
tags:
|
|
$ref: '#/definitions/company.CompanyTagsForm'
|
|
type: object
|
|
company.UpdateCompanyVerificationForm:
|
|
properties:
|
|
compliance_notes:
|
|
type: string
|
|
is_compliant:
|
|
type: boolean
|
|
is_verified:
|
|
type: boolean
|
|
type: object
|
|
customer.Address:
|
|
properties:
|
|
address_type:
|
|
description: billing, shipping, etc.
|
|
type: string
|
|
city:
|
|
type: string
|
|
country:
|
|
type: string
|
|
is_default:
|
|
type: boolean
|
|
postal_code:
|
|
type: string
|
|
state:
|
|
type: string
|
|
street:
|
|
type: string
|
|
type: object
|
|
customer.AddressForm:
|
|
properties:
|
|
address_type:
|
|
type: string
|
|
city:
|
|
type: string
|
|
country:
|
|
type: string
|
|
is_default:
|
|
type: boolean
|
|
postal_code:
|
|
type: string
|
|
state:
|
|
type: string
|
|
street:
|
|
type: string
|
|
type: object
|
|
customer.AssignCompaniesForm:
|
|
properties:
|
|
company_ids:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
customer.AuthResponse:
|
|
properties:
|
|
access_token:
|
|
type: string
|
|
customer:
|
|
$ref: '#/definitions/customer.CustomerResponse'
|
|
expires_at:
|
|
type: integer
|
|
refresh_token:
|
|
type: string
|
|
type: object
|
|
customer.CompanySummary:
|
|
properties:
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
customer.ContactPerson:
|
|
properties:
|
|
email:
|
|
type: string
|
|
first_name:
|
|
type: string
|
|
full_name:
|
|
type: string
|
|
is_primary:
|
|
type: boolean
|
|
last_name:
|
|
type: string
|
|
mobile:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
position:
|
|
type: string
|
|
type: object
|
|
customer.ContactPersonForm:
|
|
properties:
|
|
email:
|
|
type: string
|
|
first_name:
|
|
type: string
|
|
full_name:
|
|
type: string
|
|
is_primary:
|
|
type: boolean
|
|
last_name:
|
|
type: string
|
|
mobile:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
position:
|
|
type: string
|
|
type: object
|
|
customer.CreateCustomerForm:
|
|
properties:
|
|
address:
|
|
allOf:
|
|
- $ref: '#/definitions/customer.AddressForm'
|
|
description: Address information
|
|
annual_revenue:
|
|
type: number
|
|
business_type:
|
|
description: Business information
|
|
type: string
|
|
company_ids:
|
|
description: Company assignments
|
|
items:
|
|
type: string
|
|
type: array
|
|
contact_person:
|
|
allOf:
|
|
- $ref: '#/definitions/customer.ContactPersonForm'
|
|
description: Contact person (for company customers)
|
|
currency:
|
|
type: string
|
|
email:
|
|
type: string
|
|
employee_count:
|
|
type: integer
|
|
first_name:
|
|
description: Individual customer fields
|
|
type: string
|
|
founded_year:
|
|
type: integer
|
|
full_name:
|
|
type: string
|
|
industry:
|
|
type: string
|
|
language:
|
|
description: Preferences and settings
|
|
type: string
|
|
last_name:
|
|
type: string
|
|
mobile:
|
|
type: string
|
|
password:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
registration_number:
|
|
description: Company customer fields
|
|
type: string
|
|
tax_id:
|
|
type: string
|
|
timezone:
|
|
type: string
|
|
type:
|
|
type: string
|
|
username:
|
|
type: string
|
|
type: object
|
|
customer.CustomerListResponse:
|
|
properties:
|
|
customers:
|
|
items:
|
|
$ref: '#/definitions/customer.CustomerResponse'
|
|
type: array
|
|
limit:
|
|
type: integer
|
|
offset:
|
|
type: integer
|
|
total:
|
|
type: integer
|
|
total_pages:
|
|
type: integer
|
|
type: object
|
|
customer.CustomerResponse:
|
|
properties:
|
|
address:
|
|
$ref: '#/definitions/customer.Address'
|
|
annual_revenue:
|
|
type: number
|
|
business_type:
|
|
type: string
|
|
companies:
|
|
description: Company relationships
|
|
items:
|
|
$ref: '#/definitions/customer.CompanySummary'
|
|
type: array
|
|
compliance_notes:
|
|
type: string
|
|
contact_person:
|
|
$ref: '#/definitions/customer.ContactPerson'
|
|
created_at:
|
|
type: integer
|
|
created_by:
|
|
type: string
|
|
currency:
|
|
type: string
|
|
email:
|
|
type: string
|
|
employee_count:
|
|
type: integer
|
|
first_name:
|
|
type: string
|
|
founded_year:
|
|
type: integer
|
|
full_name:
|
|
type: string
|
|
id:
|
|
type: string
|
|
industry:
|
|
type: string
|
|
is_compliant:
|
|
type: boolean
|
|
is_verified:
|
|
type: boolean
|
|
language:
|
|
type: string
|
|
last_name:
|
|
type: string
|
|
mobile:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
registration_number:
|
|
description: Company customer fields
|
|
type: string
|
|
status:
|
|
type: string
|
|
tax_id:
|
|
type: string
|
|
timezone:
|
|
type: string
|
|
type:
|
|
type: string
|
|
updated_at:
|
|
type: integer
|
|
updated_by:
|
|
type: string
|
|
username:
|
|
type: string
|
|
type: object
|
|
customer.LoginForm:
|
|
properties:
|
|
password:
|
|
type: string
|
|
username:
|
|
type: string
|
|
type: object
|
|
customer.RefreshTokenForm:
|
|
properties:
|
|
refresh_token:
|
|
type: string
|
|
type: object
|
|
customer.RemoveCompaniesForm:
|
|
properties:
|
|
company_ids:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
customer.SuspendCustomerForm:
|
|
properties:
|
|
reason:
|
|
type: string
|
|
type: object
|
|
customer.UpdateCustomerForm:
|
|
properties:
|
|
address:
|
|
allOf:
|
|
- $ref: '#/definitions/customer.AddressForm'
|
|
description: Address information
|
|
annual_revenue:
|
|
type: number
|
|
business_type:
|
|
description: Business information
|
|
type: string
|
|
company_ids:
|
|
description: Company assignments
|
|
items:
|
|
type: string
|
|
type: array
|
|
company_name:
|
|
description: Company customer fields
|
|
type: string
|
|
contact_person:
|
|
allOf:
|
|
- $ref: '#/definitions/customer.ContactPersonForm'
|
|
description: Contact person (for company customers)
|
|
currency:
|
|
type: string
|
|
email:
|
|
type: string
|
|
employee_count:
|
|
type: integer
|
|
first_name:
|
|
description: Individual customer fields
|
|
type: string
|
|
founded_year:
|
|
type: integer
|
|
full_name:
|
|
type: string
|
|
industry:
|
|
type: string
|
|
language:
|
|
description: Preferences and settings
|
|
type: string
|
|
last_name:
|
|
type: string
|
|
mobile:
|
|
type: string
|
|
phone:
|
|
type: string
|
|
registration_number:
|
|
type: string
|
|
tax_id:
|
|
type: string
|
|
timezone:
|
|
type: string
|
|
type:
|
|
type: string
|
|
username:
|
|
type: string
|
|
type: object
|
|
customer.UpdateCustomerStatusForm:
|
|
properties:
|
|
status:
|
|
type: string
|
|
type: object
|
|
customer.UpdateCustomerVerificationForm:
|
|
properties:
|
|
compliance_notes:
|
|
type: string
|
|
is_compliant:
|
|
type: boolean
|
|
is_verified:
|
|
type: boolean
|
|
type: object
|
|
main.HealthResponse:
|
|
properties:
|
|
service:
|
|
description: Service name
|
|
example: tender-management-api
|
|
type: string
|
|
status:
|
|
description: Current health status
|
|
example: healthy
|
|
type: string
|
|
time:
|
|
description: Current Unix timestamp
|
|
example: 1699123456
|
|
type: integer
|
|
uptime:
|
|
description: Service uptime duration
|
|
example: 24h30m15s
|
|
type: string
|
|
version:
|
|
description: API version
|
|
example: 2.0.0
|
|
type: string
|
|
type: object
|
|
response.APIError:
|
|
properties:
|
|
code:
|
|
type: string
|
|
details:
|
|
type: string
|
|
message:
|
|
type: string
|
|
type: object
|
|
response.APIResponse:
|
|
properties:
|
|
data: {}
|
|
error:
|
|
$ref: '#/definitions/response.APIError'
|
|
message:
|
|
type: string
|
|
meta:
|
|
$ref: '#/definitions/response.Meta'
|
|
success:
|
|
type: boolean
|
|
type: object
|
|
response.Meta:
|
|
properties:
|
|
limit:
|
|
type: integer
|
|
offset:
|
|
type: integer
|
|
page:
|
|
type: integer
|
|
pages:
|
|
type: integer
|
|
total:
|
|
type: integer
|
|
type: object
|
|
tender.Address:
|
|
properties:
|
|
city_name:
|
|
type: string
|
|
country_code:
|
|
type: string
|
|
country_subentity_code:
|
|
type: string
|
|
department:
|
|
type: string
|
|
postal_zone:
|
|
type: string
|
|
region:
|
|
type: string
|
|
street_name:
|
|
type: string
|
|
type: object
|
|
tender.CreateTenderRequest:
|
|
properties:
|
|
additional_classifications:
|
|
items:
|
|
type: string
|
|
type: array
|
|
buyer_organization:
|
|
$ref: '#/definitions/tender.Organization'
|
|
city_name:
|
|
type: string
|
|
contract_folder_id:
|
|
type: string
|
|
contract_notice_id:
|
|
type: string
|
|
country_code:
|
|
type: string
|
|
currency:
|
|
type: string
|
|
description:
|
|
type: string
|
|
document_uri:
|
|
type: string
|
|
duration:
|
|
type: string
|
|
duration_unit:
|
|
type: string
|
|
estimated_value:
|
|
type: number
|
|
gazette_id:
|
|
type: string
|
|
issue_date:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
issue_time:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
main_classification:
|
|
type: string
|
|
notice_language_code:
|
|
type: string
|
|
notice_publication_id:
|
|
type: string
|
|
notice_sub_type_code:
|
|
type: string
|
|
notice_type_code:
|
|
type: string
|
|
official_languages:
|
|
items:
|
|
type: string
|
|
type: array
|
|
organizations:
|
|
items:
|
|
$ref: '#/definitions/tender.Organization'
|
|
type: array
|
|
place_of_performance:
|
|
type: string
|
|
postal_code:
|
|
type: string
|
|
procedure_code:
|
|
type: string
|
|
procurement_type_code:
|
|
type: string
|
|
publication_date:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
region_code:
|
|
type: string
|
|
review_organization:
|
|
$ref: '#/definitions/tender.Organization'
|
|
selection_criteria:
|
|
items:
|
|
$ref: '#/definitions/tender.SelectionCriterion'
|
|
type: array
|
|
source:
|
|
$ref: '#/definitions/tender.TenderSource'
|
|
source_file_name:
|
|
type: string
|
|
source_file_url:
|
|
type: string
|
|
tender_deadline:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
tender_url:
|
|
type: string
|
|
title:
|
|
type: string
|
|
type: object
|
|
tender.JobProgress:
|
|
properties:
|
|
current_step:
|
|
type: string
|
|
error_count:
|
|
type: integer
|
|
percentage:
|
|
type: number
|
|
processed_count:
|
|
type: integer
|
|
success_count:
|
|
type: integer
|
|
total_count:
|
|
type: integer
|
|
type: object
|
|
tender.JobResults:
|
|
properties:
|
|
processing_errors:
|
|
items:
|
|
type: string
|
|
type: array
|
|
summary:
|
|
type: string
|
|
total_created:
|
|
type: integer
|
|
total_errors:
|
|
type: integer
|
|
total_processed:
|
|
type: integer
|
|
total_skipped:
|
|
type: integer
|
|
total_updated:
|
|
type: integer
|
|
type: object
|
|
tender.Organization:
|
|
properties:
|
|
address:
|
|
$ref: '#/definitions/tender.Address'
|
|
company_id:
|
|
type: string
|
|
contact_email:
|
|
type: string
|
|
contact_fax:
|
|
type: string
|
|
contact_name:
|
|
type: string
|
|
contact_telephone:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
role:
|
|
type: string
|
|
website_uri:
|
|
type: string
|
|
type: object
|
|
tender.ProcessingMetadata:
|
|
properties:
|
|
enrichment_data:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
parsing_errors:
|
|
items:
|
|
type: string
|
|
type: array
|
|
processed_at:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
processing_version:
|
|
type: string
|
|
scraped_at:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
validation_errors:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
tender.ScrapingJobResponse:
|
|
properties:
|
|
completed_at:
|
|
type: integer
|
|
config:
|
|
additionalProperties: true
|
|
type: object
|
|
created_at:
|
|
type: integer
|
|
duration:
|
|
type: integer
|
|
errors:
|
|
items:
|
|
type: string
|
|
type: array
|
|
id:
|
|
type: string
|
|
progress:
|
|
$ref: '#/definitions/tender.JobProgress'
|
|
results:
|
|
$ref: '#/definitions/tender.JobResults'
|
|
started_at:
|
|
type: integer
|
|
status:
|
|
$ref: '#/definitions/tender.ScrapingJobStatus'
|
|
type:
|
|
$ref: '#/definitions/tender.ScrapingJobType'
|
|
updated_at:
|
|
type: integer
|
|
type: object
|
|
tender.ScrapingJobStatus:
|
|
enum:
|
|
- pending
|
|
- running
|
|
- completed
|
|
- failed
|
|
- cancelled
|
|
type: string
|
|
x-enum-varnames:
|
|
- ScrapingJobStatusPending
|
|
- ScrapingJobStatusRunning
|
|
- ScrapingJobStatusCompleted
|
|
- ScrapingJobStatusFailed
|
|
- ScrapingJobStatusCancelled
|
|
tender.ScrapingJobType:
|
|
enum:
|
|
- ted_scraper
|
|
- manual
|
|
- api
|
|
- bulk_import
|
|
type: string
|
|
x-enum-varnames:
|
|
- ScrapingJobTypeTEDScraper
|
|
- ScrapingJobTypeManual
|
|
- ScrapingJobTypeAPI
|
|
- ScrapingJobTypeBulkImport
|
|
tender.SearchTendersRequest:
|
|
properties:
|
|
criteria:
|
|
$ref: '#/definitions/tender.TenderSearchCriteria'
|
|
query:
|
|
type: string
|
|
type: object
|
|
tender.SelectionCriterion:
|
|
properties:
|
|
description:
|
|
type: string
|
|
language_id:
|
|
type: string
|
|
type_code:
|
|
type: string
|
|
type: object
|
|
tender.StartScrapingJobRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: true
|
|
type: object
|
|
type:
|
|
$ref: '#/definitions/tender.ScrapingJobType'
|
|
type: object
|
|
tender.TenderResponse:
|
|
properties:
|
|
additional_classifications:
|
|
items:
|
|
type: string
|
|
type: array
|
|
buyer_organization:
|
|
$ref: '#/definitions/tender.Organization'
|
|
city_name:
|
|
type: string
|
|
contract_folder_id:
|
|
type: string
|
|
contract_notice_id:
|
|
type: string
|
|
country_code:
|
|
type: string
|
|
created_at:
|
|
type: integer
|
|
currency:
|
|
type: string
|
|
description:
|
|
type: string
|
|
document_uri:
|
|
type: string
|
|
duration:
|
|
type: string
|
|
duration_unit:
|
|
type: string
|
|
estimated_value:
|
|
type: number
|
|
formatted_estimated_value:
|
|
type: string
|
|
gazette_id:
|
|
type: string
|
|
has_errors:
|
|
type: boolean
|
|
id:
|
|
type: string
|
|
is_active:
|
|
type: boolean
|
|
is_expired:
|
|
type: boolean
|
|
issue_date:
|
|
type: integer
|
|
issue_time:
|
|
type: integer
|
|
main_classification:
|
|
type: string
|
|
match_percentage:
|
|
description: Match percentage for company (0-100)
|
|
type: integer
|
|
notice_language_code:
|
|
type: string
|
|
notice_publication_id:
|
|
type: string
|
|
notice_sub_type_code:
|
|
type: string
|
|
notice_type_code:
|
|
type: string
|
|
official_languages:
|
|
items:
|
|
type: string
|
|
type: array
|
|
organizations:
|
|
items:
|
|
$ref: '#/definitions/tender.Organization'
|
|
type: array
|
|
place_of_performance:
|
|
type: string
|
|
postal_code:
|
|
type: string
|
|
procedure_code:
|
|
type: string
|
|
processing_metadata:
|
|
$ref: '#/definitions/tender.ProcessingMetadata'
|
|
procurement_type_code:
|
|
type: string
|
|
publication_date:
|
|
type: integer
|
|
region_code:
|
|
type: string
|
|
review_organization:
|
|
$ref: '#/definitions/tender.Organization'
|
|
selection_criteria:
|
|
items:
|
|
$ref: '#/definitions/tender.SelectionCriterion'
|
|
type: array
|
|
source:
|
|
$ref: '#/definitions/tender.TenderSource'
|
|
source_file_name:
|
|
type: string
|
|
source_file_url:
|
|
type: string
|
|
status:
|
|
$ref: '#/definitions/tender.TenderStatus'
|
|
tender_deadline:
|
|
type: integer
|
|
tender_url:
|
|
type: string
|
|
title:
|
|
type: string
|
|
updated_at:
|
|
type: integer
|
|
type: object
|
|
tender.TenderSearchCriteria:
|
|
properties:
|
|
buyer_organization_id:
|
|
type: string
|
|
classifications:
|
|
items:
|
|
type: string
|
|
type: array
|
|
country_codes:
|
|
items:
|
|
type: string
|
|
type: array
|
|
currency:
|
|
type: string
|
|
deadline_from:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
deadline_to:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
languages:
|
|
items:
|
|
type: string
|
|
type: array
|
|
max_estimated_value:
|
|
type: number
|
|
min_estimated_value:
|
|
type: number
|
|
notice_type:
|
|
type: string
|
|
procurement_type:
|
|
type: string
|
|
publication_date_from:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
publication_date_to:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
query:
|
|
type: string
|
|
region_codes:
|
|
items:
|
|
type: string
|
|
type: array
|
|
source:
|
|
items:
|
|
$ref: '#/definitions/tender.TenderSource'
|
|
type: array
|
|
status:
|
|
items:
|
|
$ref: '#/definitions/tender.TenderStatus'
|
|
type: array
|
|
type: object
|
|
tender.TenderSource:
|
|
enum:
|
|
- ted_scraper
|
|
- manual
|
|
- api
|
|
- bulk_import
|
|
type: string
|
|
x-enum-varnames:
|
|
- TenderSourceTEDScraper
|
|
- TenderSourceManual
|
|
- TenderSourceAPI
|
|
- TenderSourceBulkImport
|
|
tender.TenderStatistics:
|
|
properties:
|
|
active_tenders:
|
|
type: integer
|
|
average_estimated_value:
|
|
type: number
|
|
expired_tenders:
|
|
type: integer
|
|
last_updated:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
tenders_by_classification:
|
|
additionalProperties:
|
|
format: int64
|
|
type: integer
|
|
type: object
|
|
tenders_by_country:
|
|
additionalProperties:
|
|
format: int64
|
|
type: integer
|
|
type: object
|
|
tenders_by_type:
|
|
additionalProperties:
|
|
format: int64
|
|
type: integer
|
|
type: object
|
|
total_estimated_value:
|
|
type: number
|
|
total_tenders:
|
|
type: integer
|
|
type: object
|
|
tender.TenderStatus:
|
|
enum:
|
|
- active
|
|
- expired
|
|
- cancelled
|
|
- awarded
|
|
- draft
|
|
type: string
|
|
x-enum-varnames:
|
|
- TenderStatusActive
|
|
- TenderStatusExpired
|
|
- TenderStatusCancelled
|
|
- TenderStatusAwarded
|
|
- TenderStatusDraft
|
|
tender.UpdateTenderRequest:
|
|
properties:
|
|
currency:
|
|
type: string
|
|
description:
|
|
type: string
|
|
estimated_value:
|
|
type: number
|
|
id:
|
|
type: string
|
|
status:
|
|
$ref: '#/definitions/tender.TenderStatus'
|
|
tender_deadline:
|
|
description: Unix milliseconds
|
|
type: integer
|
|
title:
|
|
type: string
|
|
type: object
|
|
user.AuthResponse:
|
|
properties:
|
|
access_token:
|
|
type: string
|
|
expires_at:
|
|
type: integer
|
|
refresh_token:
|
|
type: string
|
|
user:
|
|
$ref: '#/definitions/user.UserResponse'
|
|
type: object
|
|
user.ChangePasswordForm:
|
|
properties:
|
|
new_password:
|
|
description: New password (minimum 8 characters)
|
|
example: NewPass456!
|
|
type: string
|
|
old_password:
|
|
description: Current password for verification
|
|
example: OldPassword123!
|
|
type: string
|
|
type: object
|
|
user.CreateUserForm:
|
|
properties:
|
|
department:
|
|
description: Optional department name
|
|
example: Information Technology
|
|
type: string
|
|
email:
|
|
description: Valid email address
|
|
example: john.smith@company.com
|
|
type: string
|
|
full_name:
|
|
description: Full name of the user
|
|
example: John Smith
|
|
type: string
|
|
password:
|
|
description: Password (minimum 8 characters)
|
|
example: SecurePass123!
|
|
type: string
|
|
phone:
|
|
description: Optional phone number
|
|
example: "+1234567890"
|
|
type: string
|
|
position:
|
|
description: Optional job position
|
|
example: Senior Developer
|
|
type: string
|
|
profile_image:
|
|
description: Optional profile image URL
|
|
example: https://example.com/avatar.jpg
|
|
type: string
|
|
role:
|
|
description: User role (admin, manager, operator, viewer)
|
|
example: manager
|
|
type: string
|
|
username:
|
|
description: Unique username (alphanumeric only)
|
|
example: johnsmith
|
|
type: string
|
|
type: object
|
|
user.LoginForm:
|
|
properties:
|
|
password:
|
|
description: User password
|
|
example: Nima.1998
|
|
type: string
|
|
username:
|
|
description: Username or email address
|
|
example: nakhostin
|
|
type: string
|
|
type: object
|
|
user.RefreshTokenForm:
|
|
properties:
|
|
refresh_token:
|
|
description: Valid refresh token
|
|
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
type: string
|
|
type: object
|
|
user.ResetPasswordForm:
|
|
properties:
|
|
email:
|
|
description: Email address for password reset
|
|
example: john.smith@company.com
|
|
type: string
|
|
type: object
|
|
user.UpdateUserForm:
|
|
properties:
|
|
company_id:
|
|
description: Updated company ID
|
|
example: 123e4567-e89b-12d3-a456-426614174000
|
|
type: string
|
|
department:
|
|
description: Updated department
|
|
example: Product Management
|
|
type: string
|
|
email:
|
|
description: Updated email address
|
|
example: john.smith@newcompany.com
|
|
type: string
|
|
full_name:
|
|
description: Updated full name
|
|
example: John Smith
|
|
type: string
|
|
phone:
|
|
description: Updated phone number
|
|
example: "+1234567890"
|
|
type: string
|
|
position:
|
|
description: Updated position
|
|
example: Tech Lead
|
|
type: string
|
|
profile_image:
|
|
description: Updated profile image URL
|
|
example: https://example.com/new-avatar.jpg
|
|
type: string
|
|
role:
|
|
description: Updated user role
|
|
example: admin
|
|
type: string
|
|
status:
|
|
description: Updated account status
|
|
example: active
|
|
type: string
|
|
username:
|
|
description: Updated username
|
|
example: johnsmith
|
|
type: string
|
|
type: object
|
|
user.UpdateUserRoleForm:
|
|
properties:
|
|
role:
|
|
type: string
|
|
type: object
|
|
user.UpdateUserStatusForm:
|
|
properties:
|
|
status:
|
|
type: string
|
|
type: object
|
|
user.UserListResponse:
|
|
properties:
|
|
limit:
|
|
type: integer
|
|
offset:
|
|
type: integer
|
|
total:
|
|
type: integer
|
|
total_pages:
|
|
type: integer
|
|
users:
|
|
items:
|
|
$ref: '#/definitions/user.UserResponse'
|
|
type: array
|
|
type: object
|
|
user.UserResponse:
|
|
properties:
|
|
company_id:
|
|
type: string
|
|
created_at:
|
|
type: integer
|
|
created_by:
|
|
type: string
|
|
department:
|
|
type: string
|
|
email:
|
|
type: string
|
|
full_name:
|
|
type: string
|
|
id:
|
|
type: string
|
|
is_verified:
|
|
type: boolean
|
|
last_login_at:
|
|
type: integer
|
|
phone:
|
|
type: string
|
|
position:
|
|
type: string
|
|
profile_image:
|
|
type: string
|
|
role:
|
|
type: string
|
|
status:
|
|
type: string
|
|
updated_at:
|
|
type: integer
|
|
updated_by:
|
|
type: string
|
|
username:
|
|
type: string
|
|
type: object
|
|
host: localhost:8081
|
|
info:
|
|
contact:
|
|
email: api-support@tender-management.com
|
|
name: Tender Management API Support
|
|
url: https://tender-management.com/support
|
|
description: This is a comprehensive API for the Tender Management System built
|
|
with Clean Architecture principles and Domain-Driven Design (DDD) patterns. The
|
|
API provides endpoints for user management, customer management, company management,
|
|
and authentication for both web panel administration and mobile application access.
|
|
license:
|
|
name: MIT
|
|
url: https://opensource.org/licenses/MIT
|
|
termsOfService: https://tender-management.com/terms
|
|
title: Tender Management API
|
|
version: 2.0.0
|
|
paths:
|
|
/admin/scraping/jobs:
|
|
get:
|
|
description: Retrieve scraping jobs with pagination
|
|
parameters:
|
|
- 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
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: List scraping jobs
|
|
tags:
|
|
- Admin-Scraping
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Start a new TED XML scraping job
|
|
parameters:
|
|
- description: Scraping job configuration
|
|
in: body
|
|
name: job
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/tender.StartScrapingJobRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/tender.ScrapingJobResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Start scraping job
|
|
tags:
|
|
- Admin-Scraping
|
|
/admin/scraping/jobs/{id}:
|
|
get:
|
|
description: Retrieve a specific scraping job by its ID
|
|
parameters:
|
|
- description: Scraping job ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/tender.ScrapingJobResponse'
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get scraping job
|
|
tags:
|
|
- Admin-Scraping
|
|
/admin/scraping/jobs/{id}/cancel:
|
|
post:
|
|
description: Cancel a running or pending scraping job
|
|
parameters:
|
|
- description: Scraping job ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Cancel scraping job
|
|
tags:
|
|
- Admin-Scraping
|
|
/admin/tenders:
|
|
get:
|
|
description: Retrieve tenders with pagination, filtering, and search capabilities
|
|
with optional company-based matching
|
|
parameters:
|
|
- 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: Company ID for match percentage calculation and sorting
|
|
in: query
|
|
name: company_id
|
|
type: string
|
|
- description: Search query for title and description
|
|
in: query
|
|
name: query
|
|
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
|
|
type: number
|
|
- description: Maximum estimated value
|
|
in: query
|
|
name: max_estimated_value
|
|
type: number
|
|
- description: Filter by currency
|
|
in: query
|
|
name: currency
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: List tenders
|
|
tags:
|
|
- Admin-Tenders
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new tender with the provided information
|
|
parameters:
|
|
- description: Tender information
|
|
in: body
|
|
name: tender
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/tender.CreateTenderRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/tender.TenderResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"409":
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Create a new tender
|
|
tags:
|
|
- Admin-Tenders
|
|
/admin/tenders/{id}:
|
|
delete:
|
|
description: Delete a tender by its ID
|
|
parameters:
|
|
- description: Tender ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Delete tender
|
|
tags:
|
|
- Admin-Tenders
|
|
get:
|
|
description: Retrieve a specific tender by its ID
|
|
parameters:
|
|
- description: Tender ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/tender.TenderResponse'
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get tender by ID
|
|
tags:
|
|
- Admin-Tenders
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update an existing tender with the provided information
|
|
parameters:
|
|
- description: Tender ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated tender information
|
|
in: body
|
|
name: tender
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/tender.UpdateTenderRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/tender.TenderResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update tender
|
|
tags:
|
|
- Admin-Tenders
|
|
/admin/tenders/dashboard:
|
|
get:
|
|
description: Retrieve dashboard data including statistics, recent tenders, and
|
|
active jobs
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get dashboard data
|
|
tags:
|
|
- Admin-Tenders
|
|
/admin/tenders/search:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Search tenders using full-text search and filtering
|
|
parameters:
|
|
- description: Search criteria
|
|
in: body
|
|
name: search
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/tender.SearchTendersRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Search tenders
|
|
tags:
|
|
- Admin-Tenders
|
|
/admin/tenders/statistics:
|
|
get:
|
|
description: Retrieve comprehensive statistics about tenders
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/tender.TenderStatistics'
|
|
type: object
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get tender statistics
|
|
tags:
|
|
- Admin-Tenders
|
|
/admin/v1/companies:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve a paginated list of companies with advanced filtering
|
|
options including search, type, status, industry, verification status, tags,
|
|
and business criteria. Supports sorting and pagination.
|
|
parameters:
|
|
- description: Search term to filter companies by name, description, or industry
|
|
in: query
|
|
name: search
|
|
type: string
|
|
- description: Filter by company type
|
|
enum:
|
|
- private
|
|
- public
|
|
- government
|
|
- ngo
|
|
- startup
|
|
in: query
|
|
name: type
|
|
type: string
|
|
- description: Filter by company status
|
|
enum:
|
|
- active
|
|
- inactive
|
|
- suspended
|
|
- pending
|
|
in: query
|
|
name: status
|
|
type: string
|
|
- description: Filter by industry
|
|
in: query
|
|
name: industry
|
|
type: string
|
|
- description: Filter by verification status
|
|
in: query
|
|
name: is_verified
|
|
type: boolean
|
|
- description: Filter by compliance status
|
|
in: query
|
|
name: is_compliant
|
|
type: boolean
|
|
- description: Filter by CPV codes
|
|
in: query
|
|
name: cpv_codes
|
|
type: array
|
|
- description: Filter by categories
|
|
in: query
|
|
name: categories
|
|
type: array
|
|
- description: Filter by keywords
|
|
in: query
|
|
name: keywords
|
|
type: array
|
|
- description: Filter by specializations
|
|
in: query
|
|
name: specializations
|
|
type: array
|
|
- description: Minimum employee count
|
|
in: query
|
|
name: employee_count_min
|
|
type: integer
|
|
- description: Maximum employee count
|
|
in: query
|
|
name: employee_count_max
|
|
type: integer
|
|
- description: Minimum annual revenue
|
|
in: query
|
|
name: annual_revenue_min
|
|
type: number
|
|
- description: Maximum annual revenue
|
|
in: query
|
|
name: annual_revenue_max
|
|
type: number
|
|
- description: Minimum founded year
|
|
in: query
|
|
name: founded_year_min
|
|
type: integer
|
|
- description: Maximum founded year
|
|
in: query
|
|
name: founded_year_max
|
|
type: integer
|
|
- default: 20
|
|
description: Number of companies per page (1-100)
|
|
in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- default: 0
|
|
description: Number of companies to skip for pagination
|
|
in: query
|
|
minimum: 0
|
|
name: offset
|
|
type: integer
|
|
- default: created_at
|
|
description: Field to sort by
|
|
enum:
|
|
- name
|
|
- type
|
|
- industry
|
|
- created_at
|
|
- updated_at
|
|
- status
|
|
- employee_count
|
|
- annual_revenue
|
|
in: query
|
|
name: sort_by
|
|
type: string
|
|
- default: desc
|
|
description: Sort order
|
|
enum:
|
|
- asc
|
|
- desc
|
|
in: query
|
|
name: sort_order
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Companies retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/company.CompanyListResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid query parameters
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid query parameters
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: List companies with filters and pagination
|
|
tags:
|
|
- Admin-Companies
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new company with comprehensive information including business
|
|
details, address, tags, and customer assignment. This endpoint is used by
|
|
the web panel for full company registration.
|
|
parameters:
|
|
- description: Company information including type, business details, address,
|
|
tags, and optional customer assignment
|
|
in: body
|
|
name: company
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/company.CreateCompanyForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Company created successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/company.CompanyResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"409":
|
|
description: Conflict - Company with this name/registration/tax ID already
|
|
exists
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Create a new company
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Soft delete a company by setting status to inactive
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Company deleted successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid company ID
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Delete company
|
|
tags:
|
|
- Admin-Companies
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve detailed company information by company ID
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Company retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/company.CompanyResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid company ID
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get company by ID
|
|
tags:
|
|
- Admin-Companies
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update company information including business details, address,
|
|
tags, and customer assignment
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Company update information
|
|
in: body
|
|
name: company
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/company.UpdateCompanyForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Company updated successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/company.CompanyResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"409":
|
|
description: Conflict - Company with this name/registration/tax ID already
|
|
exists
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update company information
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/{id}/activate:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Activate a suspended company account
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Company activated successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid company ID
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Activate company
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/{id}/status:
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Update company account status (active, inactive, suspended, pending)
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: New company status
|
|
in: body
|
|
name: status
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/company.UpdateCompanyStatusForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Company status updated successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update company status
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/{id}/suspend:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Suspend a company account with reason
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Suspension information
|
|
in: body
|
|
name: suspension
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/company.SuspendCompanyForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Company suspended successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Suspend company
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/{id}/tags:
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update company tags (CPV, categories, keywords, specializations,
|
|
certifications)
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Tags update information
|
|
in: body
|
|
name: tags
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/company.UpdateCompanyTagsForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Company tags updated successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update company tags
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/{id}/tags/add:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Add specific tags to a company
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Tags to add
|
|
in: body
|
|
name: tags
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/company.AddTagsForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Tags added successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Add tags to company
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/{id}/tags/remove:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Remove specific tags from a company
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Tags to remove
|
|
in: body
|
|
name: tags
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/company.RemoveTagsForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Tags removed successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Remove tags from company
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/{id}/verification:
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Update company verification and compliance status
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Verification status update
|
|
in: body
|
|
name: verification
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/company.UpdateCompanyVerificationForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Company verification updated successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update company verification status
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/{id}/verify:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Mark a company as verified
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Company verified successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid company ID
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Company not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Verify company
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/industry/{industry}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve companies filtered by their industry
|
|
parameters:
|
|
- description: Industry
|
|
in: path
|
|
name: industry
|
|
required: true
|
|
type: string
|
|
- default: 20
|
|
description: Number of companies per page (1-100)
|
|
in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- default: 0
|
|
description: Number of companies to skip for pagination
|
|
in: query
|
|
minimum: 0
|
|
name: offset
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Companies retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
items:
|
|
$ref: '#/definitions/company.CompanyResponse'
|
|
type: array
|
|
meta:
|
|
$ref: '#/definitions/response.Meta'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid industry
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get companies by industry
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/search:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Search companies with advanced filtering capabilities including
|
|
tags, business criteria, and location
|
|
parameters:
|
|
- description: Search query
|
|
in: query
|
|
name: q
|
|
type: string
|
|
- description: CPV codes filter
|
|
in: query
|
|
name: cpv_codes
|
|
type: array
|
|
- description: Categories filter
|
|
in: query
|
|
name: categories
|
|
type: array
|
|
- description: Keywords filter
|
|
in: query
|
|
name: keywords
|
|
type: array
|
|
- description: Specializations filter
|
|
in: query
|
|
name: specializations
|
|
type: array
|
|
- description: Industry filter
|
|
in: query
|
|
name: industry
|
|
type: string
|
|
- description: Location filter
|
|
in: query
|
|
name: location
|
|
type: string
|
|
- description: Minimum employees
|
|
in: query
|
|
name: min_employees
|
|
type: integer
|
|
- description: Maximum employees
|
|
in: query
|
|
name: max_employees
|
|
type: integer
|
|
- description: Minimum revenue
|
|
in: query
|
|
name: min_revenue
|
|
type: number
|
|
- description: Maximum revenue
|
|
in: query
|
|
name: max_revenue
|
|
type: number
|
|
- description: Verification status
|
|
in: query
|
|
name: is_verified
|
|
type: boolean
|
|
- description: Compliance status
|
|
in: query
|
|
name: is_compliant
|
|
type: boolean
|
|
- default: 20
|
|
description: Limit
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
- default: 0
|
|
description: Offset
|
|
in: query
|
|
name: offset
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Companies search completed
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/company.CompanyListResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid query parameters
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid query parameters
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Advanced search for companies
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/stats:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get comprehensive company statistics for dashboard
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Company statistics retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/company.CompanyStatsResponse'
|
|
type: object
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get company statistics
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/status/{status}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve companies filtered by their status (active, inactive,
|
|
suspended, pending)
|
|
parameters:
|
|
- description: Company status
|
|
enum:
|
|
- active
|
|
- inactive
|
|
- suspended
|
|
- pending
|
|
in: path
|
|
name: status
|
|
required: true
|
|
type: string
|
|
- default: 20
|
|
description: Number of companies per page (1-100)
|
|
in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- default: 0
|
|
description: Number of companies to skip for pagination
|
|
in: query
|
|
minimum: 0
|
|
name: offset
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Companies retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
items:
|
|
$ref: '#/definitions/company.CompanyResponse'
|
|
type: array
|
|
meta:
|
|
$ref: '#/definitions/response.Meta'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid company status
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get companies by status
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/companies/type/{type}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve companies filtered by their type (private, public, government,
|
|
ngo, startup)
|
|
parameters:
|
|
- description: Company type
|
|
enum:
|
|
- private
|
|
- public
|
|
- government
|
|
- ngo
|
|
- startup
|
|
in: path
|
|
name: type
|
|
required: true
|
|
type: string
|
|
- default: 20
|
|
description: Number of companies per page (1-100)
|
|
in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- default: 0
|
|
description: Number of companies to skip for pagination
|
|
in: query
|
|
minimum: 0
|
|
name: offset
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Companies retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
items:
|
|
$ref: '#/definitions/company.CompanyResponse'
|
|
type: array
|
|
meta:
|
|
$ref: '#/definitions/response.Meta'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid company type
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get companies by type
|
|
tags:
|
|
- Admin-Companies
|
|
/admin/v1/customers:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve a paginated list of customers with advanced filtering
|
|
options including search, type, status, company, industry, verification status,
|
|
and compliance status. Supports sorting and pagination.
|
|
parameters:
|
|
- description: Search term to filter customers by name, email, or company name
|
|
in: query
|
|
name: search
|
|
type: string
|
|
- description: Filter by customer type
|
|
enum:
|
|
- individual
|
|
- company
|
|
- government
|
|
in: query
|
|
name: type
|
|
type: string
|
|
- description: Filter by customer status
|
|
enum:
|
|
- active
|
|
- inactive
|
|
- suspended
|
|
- pending
|
|
in: query
|
|
name: status
|
|
type: string
|
|
- description: Filter by company ID
|
|
format: uuid
|
|
in: query
|
|
name: company_id
|
|
type: string
|
|
- description: Filter by industry
|
|
in: query
|
|
name: industry
|
|
type: string
|
|
- description: Filter by verification status
|
|
in: query
|
|
name: is_verified
|
|
type: boolean
|
|
- description: Filter by compliance status
|
|
in: query
|
|
name: is_compliant
|
|
type: boolean
|
|
- description: Filter by preferred language
|
|
in: query
|
|
name: language
|
|
type: string
|
|
- description: Filter by preferred currency
|
|
in: query
|
|
name: currency
|
|
type: string
|
|
- default: 20
|
|
description: Number of customers per page (1-100)
|
|
in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- default: 0
|
|
description: Number of customers to skip for pagination
|
|
in: query
|
|
minimum: 0
|
|
name: offset
|
|
type: integer
|
|
- default: created_at
|
|
description: Field to sort by
|
|
enum:
|
|
- email
|
|
- company_name
|
|
- created_at
|
|
- updated_at
|
|
- status
|
|
in: query
|
|
name: sort_by
|
|
type: string
|
|
- default: desc
|
|
description: Sort order
|
|
enum:
|
|
- asc
|
|
- desc
|
|
in: query
|
|
name: sort_order
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customers retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/customer.CustomerListResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid query parameters
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid query parameters
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: List customers with filters and pagination
|
|
tags:
|
|
- Admin-Customers
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new customer with comprehensive information including
|
|
personal details, company information, address, and business details. This
|
|
endpoint is used by the web panel for full customer registration.
|
|
parameters:
|
|
- description: Customer information including type (individual|company|government),
|
|
personal details, company info, address, and business details
|
|
in: body
|
|
name: customer
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/customer.CreateCustomerForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Customer created successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/customer.CustomerResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"409":
|
|
description: Conflict - Customer with this email/company already exists
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Create a new customer
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Soft delete a customer by setting status to inactive
|
|
parameters:
|
|
- description: Customer ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customer deleted successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid customer ID
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Delete customer
|
|
tags:
|
|
- Admin-Customers
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve detailed customer information by customer ID
|
|
parameters:
|
|
- description: Customer ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customer retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/customer.CustomerResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid customer ID
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get customer by ID
|
|
tags:
|
|
- Admin-Customers
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update customer information including personal details, company
|
|
information, address, and business details
|
|
parameters:
|
|
- description: Customer ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated customer information
|
|
in: body
|
|
name: customer
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/customer.UpdateCustomerForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customer updated successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/customer.CustomerResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"409":
|
|
description: Conflict - Customer with this email/company already exists
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update customer information
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/{id}/activate:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Activate a suspended customer account
|
|
parameters:
|
|
- description: Customer ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customer activated successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid customer ID
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Activate customer
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/{id}/companies/assign:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Assign one or more companies to a specific customer.
|
|
parameters:
|
|
- description: Customer ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: List of company IDs to assign
|
|
in: body
|
|
name: companies
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/customer.AssignCompaniesForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Companies assigned successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Assign companies to a customer
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/{id}/companies/remove:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Remove one or more companies from a specific customer.
|
|
parameters:
|
|
- description: Customer ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: List of company IDs to remove
|
|
in: body
|
|
name: companies
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/customer.RemoveCompaniesForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Companies removed successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Remove companies from a customer
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/{id}/status:
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Update customer account status (active, inactive, suspended, pending)
|
|
parameters:
|
|
- description: Customer ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: New customer status
|
|
in: body
|
|
name: status
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/customer.UpdateCustomerStatusForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customer status updated successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update customer status
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/{id}/suspend:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Suspend a customer account with optional reason
|
|
parameters:
|
|
- description: Customer ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Suspension information
|
|
in: body
|
|
name: suspension
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/customer.SuspendCustomerForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customer suspended successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Suspend customer
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/{id}/verification:
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Update customer verification and compliance status
|
|
parameters:
|
|
- description: Customer ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Verification status update
|
|
in: body
|
|
name: verification
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/customer.UpdateCustomerVerificationForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customer verification updated successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update customer verification status
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/{id}/verify:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Mark a customer as verified
|
|
parameters:
|
|
- description: Customer ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customer verified successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid customer ID
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Verify customer
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/company/{companyId}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve all customers associated with a specific company
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: companyId
|
|
required: true
|
|
type: string
|
|
- description: 'Number of customers to return (default: 10, max: 100)'
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
- description: 'Number of customers to skip (default: 0)'
|
|
in: query
|
|
name: offset
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customers retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
items:
|
|
$ref: '#/definitions/customer.CustomerResponse'
|
|
type: array
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid company ID
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get customers by company ID
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/status/{status}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve customers filtered by their account status (active, inactive,
|
|
suspended, or pending). Useful for administrative monitoring and management.
|
|
parameters:
|
|
- description: Customer status
|
|
enum:
|
|
- active
|
|
- inactive
|
|
- suspended
|
|
- pending
|
|
in: path
|
|
name: status
|
|
required: true
|
|
type: string
|
|
- default: 20
|
|
description: Number of customers per page (1-100)
|
|
in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- default: 0
|
|
description: Number of customers to skip for pagination
|
|
in: query
|
|
minimum: 0
|
|
name: offset
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customers retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
items:
|
|
$ref: '#/definitions/customer.CustomerResponse'
|
|
type: array
|
|
meta:
|
|
$ref: '#/definitions/response.Meta'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid customer status
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get customers by status
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/customers/type/{type}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve customers filtered by their type (individual, company,
|
|
or government). Useful for administrative reporting and management.
|
|
parameters:
|
|
- description: Customer type
|
|
enum:
|
|
- individual
|
|
- company
|
|
- government
|
|
in: path
|
|
name: type
|
|
required: true
|
|
type: string
|
|
- default: 20
|
|
description: Number of customers per page (1-100)
|
|
in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- default: 0
|
|
description: Number of customers to skip for pagination
|
|
in: query
|
|
minimum: 0
|
|
name: offset
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Customers retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
items:
|
|
$ref: '#/definitions/customer.CustomerResponse'
|
|
type: array
|
|
meta:
|
|
$ref: '#/definitions/response.Meta'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid customer type
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get customers by type
|
|
tags:
|
|
- Admin-Customers
|
|
/admin/v1/health:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get comprehensive server health status including system information,
|
|
dependencies status, and performance metrics. This endpoint is used for monitoring
|
|
and load balancer health checks.
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: System is healthy and operational
|
|
schema:
|
|
$ref: '#/definitions/main.HealthResponse'
|
|
"503":
|
|
description: System is unhealthy or experiencing issues
|
|
schema:
|
|
$ref: '#/definitions/main.HealthResponse'
|
|
summary: Health check endpoint
|
|
tags:
|
|
- Admin-Health
|
|
/admin/v1/profile:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve complete profile information for the currently authenticated
|
|
user including personal details, role information, permissions, and account
|
|
status. This endpoint requires valid authentication token.
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Profile retrieved successfully with user details
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/user.UserResponse'
|
|
type: object
|
|
"401":
|
|
description: Unauthorized - Invalid or expired authentication token
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - User profile not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get authenticated user profile
|
|
tags:
|
|
- Admin-Users
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update profile information for the currently authenticated user
|
|
including personal details, contact information, and preferences. Only the
|
|
authenticated user can update their own profile.
|
|
parameters:
|
|
- description: Profile update data including name, email, phone, and other personal
|
|
information
|
|
in: body
|
|
name: profile
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.UpdateUserForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Profile updated successfully with updated user details
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/user.UserResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid request format or missing required fields
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized - Invalid or expired authentication token
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"409":
|
|
description: Conflict - Email address already exists for another user
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid input data format
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update authenticated user profile
|
|
tags:
|
|
- Admin-Users
|
|
/admin/v1/profile/change-password:
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Change password for the currently authenticated user. Requires
|
|
current password verification and enforces password policy. This operation
|
|
invalidates all existing sessions and requires re-authentication.
|
|
parameters:
|
|
- description: Password change data including current password and new password
|
|
in: body
|
|
name: password
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.ChangePasswordForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Password changed successfully - user must re-authenticate
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid request format or password policy violation
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized - Invalid authentication token or incorrect current
|
|
password
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid password format or policy requirements
|
|
not met
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Change user password
|
|
tags:
|
|
- Admin-Users
|
|
/admin/v1/profile/login:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Authenticate user with username/email and password to obtain access
|
|
and refresh tokens for web panel administration. This endpoint validates credentials
|
|
and returns JWT tokens for subsequent API calls.
|
|
parameters:
|
|
- description: User login credentials including username/email and password
|
|
in: body
|
|
name: login
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.LoginForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Login successful with access and refresh tokens
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/user.AuthResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid request format or missing fields
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized - Invalid credentials or account locked
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid input data format
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"429":
|
|
description: Too many requests - Rate limit exceeded
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Authenticate user login
|
|
tags:
|
|
- Admin-Authorization
|
|
/admin/v1/profile/logout:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Logout the currently authenticated user by invalidating their access
|
|
and refresh tokens. This endpoint ensures secure session termination and prevents
|
|
further use of the user's tokens.
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Logout successful - all tokens invalidated
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized - Invalid or expired authentication token
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error - Failed to invalidate tokens
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Logout authenticated user
|
|
tags:
|
|
- Admin-Authorization
|
|
/admin/v1/profile/refresh-token:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Generate a new access token using a valid refresh token. This endpoint
|
|
allows clients to obtain fresh access tokens without re-authentication, maintaining
|
|
session continuity.
|
|
parameters:
|
|
- description: Refresh token for generating new access token
|
|
in: body
|
|
name: refresh
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.RefreshTokenForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Token refreshed successfully with new access token
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/user.AuthResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid request format
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized - Invalid or expired refresh token
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid token format
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Refresh access token
|
|
tags:
|
|
- Admin-Authorization
|
|
/admin/v1/profile/reset-password:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Send password reset email to user with reset token. This endpoint
|
|
validates the email address and sends a secure reset link to the user's registered
|
|
email address.
|
|
parameters:
|
|
- description: Email address for password reset request
|
|
in: body
|
|
name: reset
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.ResetPasswordForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Password reset email sent successfully
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad request - Invalid request format or email address
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Email address not registered
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid email format
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"429":
|
|
description: Too many requests - Rate limit for reset emails exceeded
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error - Failed to send email
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Initiate password reset process
|
|
tags:
|
|
- Admin-Authorization
|
|
/admin/v1/users:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: List users with search and filters (admin only)
|
|
parameters:
|
|
- description: Search term
|
|
in: query
|
|
name: search
|
|
type: string
|
|
- description: User status filter
|
|
in: query
|
|
name: status
|
|
type: string
|
|
- description: User role filter
|
|
in: query
|
|
name: role
|
|
type: string
|
|
- description: Company ID filter
|
|
in: query
|
|
name: company_id
|
|
type: string
|
|
- description: Limit results
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
- description: Offset results
|
|
in: query
|
|
name: offset
|
|
type: integer
|
|
- description: Sort field
|
|
in: query
|
|
name: sort_by
|
|
type: string
|
|
- description: Sort order
|
|
in: query
|
|
name: sort_order
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/user.UserListResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: List users
|
|
tags:
|
|
- Admin-Users
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new user account with specified role and permissions.
|
|
This endpoint is restricted to administrators only and allows creation of
|
|
various user types including admins, managers, and operators with appropriate
|
|
access levels.
|
|
parameters:
|
|
- description: User creation data including username, email, password, role,
|
|
and profile information
|
|
in: body
|
|
name: user
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.CreateUserForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: User created successfully with assigned role and permissions
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/user.UserResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid input data or missing required fields
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized - Invalid or expired authentication token
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"403":
|
|
description: Forbidden - Insufficient privileges to create users
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"409":
|
|
description: Conflict - Username or email already exists
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid data format or password policy violation
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Create new user account
|
|
tags:
|
|
- Admin-Users
|
|
/admin/v1/users/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Delete a user (admin only)
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Delete user
|
|
tags:
|
|
- Admin-Users
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get user details by ID (admin only)
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/user.UserResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get user by ID
|
|
tags:
|
|
- Admin-Users
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update user information (admin only)
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: User update data
|
|
in: body
|
|
name: user
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.UpdateUserForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/user.UserResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update user
|
|
tags:
|
|
- Admin-Users
|
|
/admin/v1/users/{id}/role:
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update user role (admin only)
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Role update data
|
|
in: body
|
|
name: role
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.UpdateUserRoleForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update user role
|
|
tags:
|
|
- Admin-Users
|
|
/admin/v1/users/{id}/status:
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update user account status (admin only)
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Status update data
|
|
in: body
|
|
name: status
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.UpdateUserStatusForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update user status
|
|
tags:
|
|
- Admin-Users
|
|
/admin/v1/users/company/{company_id}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get users belonging to a specific company (admin only)
|
|
parameters:
|
|
- description: Company ID
|
|
in: path
|
|
name: company_id
|
|
required: true
|
|
type: string
|
|
- description: Limit results
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
- description: Offset results
|
|
in: query
|
|
name: offset
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Users with pagination metadata
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get users by company ID
|
|
tags:
|
|
- Admin-Users
|
|
/admin/v1/users/role/{role}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get users with a specific role (admin only)
|
|
parameters:
|
|
- description: User role
|
|
in: path
|
|
name: role
|
|
required: true
|
|
type: string
|
|
- description: Limit results
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
- description: Offset results
|
|
in: query
|
|
name: offset
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Users with pagination metadata
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get users by role
|
|
tags:
|
|
- Admin-Users
|
|
/api/v1/profile:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve current customer profile information
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Profile retrieved successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/customer.CustomerResponse'
|
|
type: object
|
|
"401":
|
|
description: Unauthorized - Invalid or missing token
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"404":
|
|
description: Not found - Customer not found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get customer profile
|
|
tags:
|
|
- Authorization
|
|
/api/v1/profile/login:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Authenticate customer with username (email) and password. Returns
|
|
access token, refresh token, and customer information upon successful authentication.
|
|
parameters:
|
|
- description: Login credentials (username/email and password)
|
|
in: body
|
|
name: login
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/customer.LoginForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Login successful
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/customer.AuthResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid input data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized - Invalid credentials or inactive account
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Customer login
|
|
tags:
|
|
- Authorization
|
|
/api/v1/profile/logout:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Logout customer and invalidate access token
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Logout successful
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized - Invalid or missing token
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Customer logout
|
|
tags:
|
|
- Authorization
|
|
/api/v1/profile/refresh-token:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Refresh access token using a valid refresh token. This allows customers
|
|
to maintain their session without re-authentication.
|
|
parameters:
|
|
- description: Refresh token for generating new access token
|
|
in: body
|
|
name: refresh
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/customer.RefreshTokenForm'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Token refreshed successfully
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/customer.AuthResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad request - Invalid refresh token or feature not implemented
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"401":
|
|
description: Unauthorized - Invalid or expired refresh token
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"422":
|
|
description: Validation error - Invalid request data
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Refresh customer access token
|
|
tags:
|
|
- Authorization
|
|
/api/v1/tenders:
|
|
get:
|
|
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)'
|
|
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
|
|
type: string
|
|
- description: Minimum estimated value
|
|
in: query
|
|
name: min_estimated_value
|
|
type: number
|
|
- description: Maximum estimated value
|
|
in: query
|
|
name: max_estimated_value
|
|
type: number
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Get public tenders
|
|
tags:
|
|
- Tenders
|
|
/api/v1/tenders/{id}:
|
|
get:
|
|
description: Retrieve detailed information about a specific tender for mobile
|
|
application users
|
|
parameters:
|
|
- description: Tender ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/response.APIResponse'
|
|
- properties:
|
|
data:
|
|
additionalProperties: true
|
|
type: object
|
|
type: object
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/response.APIResponse'
|
|
summary: Get public tender details
|
|
tags:
|
|
- Tenders
|
|
securityDefinitions:
|
|
BearerAuth:
|
|
description: 'Type "Bearer" followed by a space and JWT token. Example: "Bearer
|
|
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."'
|
|
in: header
|
|
name: Authorization
|
|
type: apiKey
|
|
swagger: "2.0"
|
|
tags:
|
|
- description: System health check operations for monitoring application status and
|
|
dependencies
|
|
name: Admin-Health
|
|
- description: User authentication and authorization operations including login, logout,
|
|
token refresh, and password management for web panel administration
|
|
name: Admin-Authorization
|
|
- description: Administrative user management operations including CRUD operations,
|
|
role management, status updates, and profile management for web panel administrators
|
|
name: Admin-Users
|
|
- description: Administrative customer management operations for web panel including
|
|
CRUD operations, company assignment, verification, status management, and comprehensive
|
|
filtering with pagination
|
|
name: Admin-Customers
|
|
- description: Administrative company management operations for web panel including
|
|
CRUD operations, tag management, verification, status updates, comprehensive search
|
|
and filtering, and statistical reporting
|
|
name: Admin-Companies
|
|
- description: Administrative tender management operations for web panel including
|
|
CRUD operations, search, statistics, and comprehensive filtering with pagination
|
|
name: Admin-Tenders
|
|
- description: Administrative scraping job management operations for TED XML data
|
|
collection including job control, monitoring, and status tracking
|
|
name: Admin-Scraping
|
|
- description: Customer authentication and authorization operations for mobile application
|
|
including login, logout, token refresh, and profile access
|
|
name: Authorization
|
|
- description: Public tender information access for mobile application including active
|
|
tender listings and detailed tender information
|
|
name: Tenders
|