Files
Nima Nakhostin 265ea4a7c6 Enhance Swagger Documentation for CMS API
- Updated Swagger documentation to include new fields: CompanyName, Country, and Language, improving clarity and usability for API consumers.
- Added a new Type field with enumerations for Company and Organization, enhancing data categorization in the CMS API.
- Reflected changes in the definitions for CMS entities, ensuring accurate representation of the API structure and expected inputs/outputs.
- Improved examples in the documentation to provide better guidance for developers integrating with the CMS API.
2025-11-09 10:21:41 +03:30

6613 lines
182 KiB
YAML

definitions:
bootstrap.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
cms.CMSForm:
properties:
advantages:
$ref: '#/definitions/cms.cardSectionForm'
challenges:
$ref: '#/definitions/cms.cardSectionForm'
chart:
$ref: '#/definitions/cms.chartSectionForm'
company_name:
example: Opplens
type: string
contact:
$ref: '#/definitions/cms.contactSectionForm'
country:
example: SWE
type: string
features:
$ref: '#/definitions/cms.cardSectionForm'
footer:
$ref: '#/definitions/cms.footerSectionForm'
hero:
$ref: '#/definitions/cms.heroSectionForm'
key:
example: SW-001
type: string
language:
example: en
type: string
type:
allOf:
- $ref: '#/definitions/cms.CMSType'
example: company
type: object
cms.CMSListResponse:
properties:
cms:
items:
$ref: '#/definitions/cms.CMSResponse'
type: array
type: object
cms.CMSResponse:
properties:
advantages:
$ref: '#/definitions/cms.cardSection'
challenges:
$ref: '#/definitions/cms.cardSection'
chart:
$ref: '#/definitions/cms.chartSection'
company_name:
type: string
contact:
$ref: '#/definitions/cms.contactSection'
country:
type: string
created_at:
type: integer
features:
$ref: '#/definitions/cms.cardSection'
footer:
$ref: '#/definitions/cms.footerSection'
hero:
$ref: '#/definitions/cms.heroSection'
id:
type: string
key:
type: string
language:
type: string
type:
$ref: '#/definitions/cms.CMSType'
updated_at:
type: integer
type: object
cms.CMSType:
enum:
- company
- organization
type: string
x-enum-varnames:
- CMSTypeCompany
- CMSTypeOrganization
cms.card:
properties:
description:
type: string
icon:
type: string
title:
type: string
type: object
cms.cardForm:
properties:
description:
example: Card Description
type: string
icon:
example: https://example.com/icon.png
type: string
title:
example: Card Title
type: string
type: object
cms.cardSection:
properties:
cards:
items:
$ref: '#/definitions/cms.card'
type: array
description:
type: string
title:
type: string
type: object
cms.cardSectionForm:
properties:
cards:
items:
$ref: '#/definitions/cms.cardForm'
type: array
description:
example: Card Description
type: string
title:
example: Card Title
type: string
type: object
cms.chartPoint:
properties:
key:
type: string
value:
type: integer
type: object
cms.chartPointForm:
properties:
key:
example: Key
type: string
value:
example: 1000000
type: integer
type: object
cms.chartSection:
properties:
data:
items:
$ref: '#/definitions/cms.chartPoint'
type: array
missedAmount:
type: string
title:
type: string
type: object
cms.chartSectionForm:
properties:
data:
items:
$ref: '#/definitions/cms.chartPointForm'
type: array
missed_amount:
example: Missed Amount
type: string
title:
example: Chart Title
type: string
type: object
cms.contactSection:
properties:
description:
type: string
fields:
items:
$ref: '#/definitions/cms.formField'
type: array
submitButtonText:
type: string
title:
type: string
type: object
cms.contactSectionForm:
properties:
description:
example: Contact Description
type: string
fields:
items:
$ref: '#/definitions/cms.formFieldForm'
type: array
submit_button_text:
example: Submit Button Text
type: string
title:
example: Contact Title
type: string
type: object
cms.footerSection:
properties:
copyright:
type: string
email:
type: string
location:
type: string
phone:
type: string
tagline:
type: string
type: object
cms.footerSectionForm:
properties:
copyright:
example: Copyright
type: string
email:
example: info@example.com
type: string
location:
example: Location
type: string
phone:
example: "+1234567890"
type: string
tagline:
example: Tagline
type: string
type: object
cms.formField:
properties:
label:
type: string
name:
type: string
placeholder:
type: string
required:
type: boolean
type: object
cms.formFieldForm:
properties:
label:
example: Label
type: string
name:
example: Name
type: string
placeholder:
example: Placeholder
type: string
required:
example: true
type: boolean
type: object
cms.heroSection:
properties:
buttonLink:
type: string
buttonText:
type: string
description:
type: string
gifFile:
type: string
title:
type: string
type: object
cms.heroSectionForm:
properties:
button_link:
example: https://example.com
type: string
button_text:
example: Button Text
type: string
description:
example: Hero Description
type: string
gif_file:
example: https://example.com/gif.gif
type: string
title:
example: Hero Title
type: string
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:
example: New York
type: string
country:
example: US
type: string
postal_code:
example: "10001"
type: string
state:
example: NY
type: string
street:
example: 123 Main St
type: string
type: object
company.CategoryResponse:
properties:
id:
type: string
name:
type: string
type: object
company.CompanyForm:
properties:
address:
allOf:
- $ref: '#/definitions/company.AddressForm'
description: Address information
annual_revenue:
example: 1000000
type: number
currency:
example: USD
type: string
description:
example: Opplens is a technology company
type: string
email:
example: info@opplens.com
type: string
employee_count:
description: Business information
example: 100
type: integer
founded_year:
example: 2020
type: integer
industry:
example: Technology
type: string
language:
description: Settings
example: en
type: string
name:
example: Opplens
type: string
phone:
description: Contact information
example: "+1234567890"
type: string
registration_number:
example: "1234567890"
type: string
tags:
allOf:
- $ref: '#/definitions/company.CompanyTagsForm'
description: Tags for categorization and search
tax_id:
example: "1234567890"
type: string
timezone:
example: UTC
type: string
type:
example: private
type: string
website:
example: https://opplens.com
type: string
type: object
company.CompanyListResponse:
properties:
companies:
items:
$ref: '#/definitions/company.CompanyResponse'
type: array
type: object
company.CompanyProfileResponse:
properties:
created_at:
type: integer
founded_year:
type: integer
id:
type: string
industry:
type: string
name:
type: string
registration_number:
type: string
type: object
company.CompanyResponse:
properties:
address:
$ref: '#/definitions/company.Address'
annual_revenue:
type: number
compliance_notes:
type: string
created_at:
type: integer
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.CompanyTagsResponse'
tax_id:
type: string
timezone:
type: string
type:
type: string
updated_at:
type: integer
website:
type: string
type: object
company.CompanyTagsForm:
properties:
categories:
example:
- Technology
items:
type: string
type: array
certifications:
example:
- Opplens
items:
type: string
type: array
cpv_codes:
example:
- "1234567890"
items:
type: string
type: array
keywords:
example:
- Opplens
items:
type: string
type: array
specializations:
example:
- Opplens
items:
type: string
type: array
type: object
company.CompanyTagsResponse:
properties:
categories:
items:
$ref: '#/definitions/company.CategoryResponse'
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.StatusForm:
properties:
reason:
type: string
status:
type: string
type: object
company.VerificationForm:
properties:
compliance_notes:
type: string
is_compliant:
type: boolean
is_verified:
type: boolean
type: object
company_category.CategoryForm:
properties:
description:
example: Technology related companies
type: string
name:
example: Technology
type: string
thumbnail:
example: https://example.com/thumbnail.jpg
type: string
type: object
company_category.CategoryListResponse:
properties:
categories:
items:
$ref: '#/definitions/company_category.CategoryResponse'
type: array
type: object
company_category.CategoryResponse:
properties:
created_at:
type: integer
description:
type: string
id:
type: string
name:
type: string
published:
type: boolean
published_at:
type: integer
thumbnail:
type: string
updated_at:
type: integer
type: object
contact.ContactListResponse:
properties:
contacts:
items:
$ref: '#/definitions/contact.ContactResponse'
type: array
type: object
contact.ContactResponse:
properties:
admin_notes:
type: string
created_at:
type: integer
email:
type: string
full_name:
type: string
id:
type: string
message:
type: string
phone:
type: string
resolved_at:
type: integer
resolved_by:
type: string
status:
type: string
updated_at:
type: integer
type: object
contact.ContactStats:
properties:
closed:
type: integer
in_progress:
type: integer
pending:
type: integer
resolved:
type: integer
total:
type: integer
type: object
contact.CreateContactForm:
properties:
email:
example: john.doe@example.com
type: string
full_name:
example: John Doe
type: string
message:
example: I have a question about your services
type: string
phone:
example: "+1234567890"
type: string
type: object
contact.UpdateContactStatusForm:
properties:
admin_notes:
example: Customer inquiry handled
type: string
status:
example: in_progress
type: string
type: object
customer.AssignCompaniesForm:
properties:
companies:
items:
type: string
type: array
type: object
customer.AssignRoleForm:
properties:
role:
example: analyst
type: string
type: object
customer.AssignRoleResponse:
properties:
message:
example: Role assigned successfully
type: string
success:
example: true
type: boolean
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.CreateCustomerForm:
properties:
companies:
items:
type: string
type: array
email:
example: user@opplens.com
type: string
full_name:
example: User
type: string
password:
example: User!1234
type: string
phone:
example: "+1234567890"
type: string
role:
example: analyst
type: string
type:
example: individual
type: string
username:
example: user
type: string
type: object
customer.CustomerListResponse:
properties:
customers:
items:
$ref: '#/definitions/customer.CustomerResponse'
type: array
type: object
customer.CustomerResponse:
properties:
companies:
items:
$ref: '#/definitions/customer.CompanySummary'
type: array
created_at:
type: integer
email:
type: string
full_name:
type: string
id:
type: string
last_login_at:
type: integer
phone:
type: string
role:
type: string
status:
type: string
type:
type: string
updated_at:
type: integer
username:
type: string
type: object
customer.LoginForm:
properties:
device_token:
example: device_token
type: string
password:
example: App!1234
type: string
username:
example: app
type: string
type: object
customer.RefreshTokenForm:
properties:
refresh_token:
type: string
type: object
customer.RequestResetPasswordForm:
properties:
email:
example: app@opplens.com
type: string
type: object
customer.RequestResetPasswordResponse:
properties:
message:
example: Password reset code sent to your email
type: string
success:
example: true
type: boolean
type: object
customer.ResetPasswordForm:
properties:
new_password:
example: NewPass!123
type: string
token:
example: reset_token_here
type: string
type: object
customer.ResetPasswordResponse:
properties:
message:
example: Password reset successfully
type: string
success:
example: true
type: boolean
type: object
customer.UpdateCustomerForm:
properties:
companies:
items:
type: string
type: array
email:
example: user@opplens.com
type: string
full_name:
example: User
type: string
phone:
example: "+1234567890"
type: string
role:
example: analyst
type: string
type:
example: individual
type: string
username:
example: user
type: string
type: object
customer.UpdateStatusForm:
properties:
reason:
example: Customer is active
type: string
status:
example: active
type: string
type: object
customer.VerifyOTPForm:
properties:
code:
example: "123456"
type: string
email:
example: app@opplens.com
type: string
type: object
customer.VerifyOTPResponse:
properties:
message:
example: OTP verified successfully
type: string
success:
example: true
type: boolean
token:
example: reset_token_here
type: string
type: object
feedback.FeedbackListResponse:
properties:
feedback:
items:
$ref: '#/definitions/feedback.FeedbackResponse'
type: array
meta:
$ref: '#/definitions/response.Meta'
type: object
feedback.FeedbackResponse:
properties:
company:
$ref: '#/definitions/feedback.companyResponse'
company_id:
type: string
created_at:
type: integer
customer_id:
type: string
feedback_type:
$ref: '#/definitions/feedback.FeedbackType'
id:
type: string
tender:
$ref: '#/definitions/feedback.tenderResponse'
tender_id:
type: string
updated_at:
type: integer
type: object
feedback.FeedbackType:
enum:
- like
- dislike
type: string
x-enum-varnames:
- FeedbackTypeLike
- FeedbackTypeDislike
feedback.StatsResponse:
properties:
company:
$ref: '#/definitions/feedback.companyResponse'
company_id:
type: string
last_updated:
type: integer
total_dislikes:
type: integer
total_feedback:
type: integer
total_likes:
type: integer
type: object
feedback.ToggleFeedbackForm:
properties:
feedback_type:
allOf:
- $ref: '#/definitions/feedback.FeedbackType'
enum:
- like
- dislike
tender_id:
type: string
required:
- feedback_type
- tender_id
type: object
feedback.companyResponse:
properties:
id:
type: string
name:
type: string
type: object
feedback.organizationResponse:
properties:
name:
type: string
type: object
feedback.tenderResponse:
properties:
buyer_organization:
$ref: '#/definitions/feedback.organizationResponse'
country_code:
type: string
currency:
type: string
description:
type: string
duration:
type: string
duration_unit:
type: string
estimated_value:
type: number
id:
type: string
notice_publication_id:
type: string
procedure_code:
type: string
procurement_type_code:
type: string
publication_date:
type: integer
status:
type: string
submission_deadline:
type: integer
tender_deadline:
type: integer
title:
type: string
type: object
inquiry.CreateInquiryForm:
properties:
company_name:
description: Company name
example: Opplens
type: string
full_name:
description: Full name of the inquirer
example: John Doe
type: string
phone_number:
description: Phone number
example: "+1234567890"
type: string
work_email:
description: Work email address
example: info@opplens.com
type: string
type: object
inquiry.InquiryListResponse:
properties:
inquiries:
items:
$ref: '#/definitions/inquiry.InquiryResponse'
type: array
meta:
$ref: '#/definitions/response.Meta'
type: object
inquiry.InquiryResponse:
properties:
company_name:
type: string
created_at:
type: integer
full_name:
type: string
id:
type: string
phone_number:
type: string
status:
type: string
status_history:
items:
$ref: '#/definitions/inquiry.StatusHistoryResponse'
type: array
updated_at:
type: integer
work_email:
type: string
type: object
inquiry.StatusHistoryResponse:
properties:
changed_at:
type: integer
description:
type: string
reason:
type: string
status:
type: string
type: object
inquiry.UpdateInquiryStatusForm:
properties:
description:
description: Optional description
example: Additional notes about the review
type: string
reason:
description: Reason for status change
example: Initial review completed
type: string
status:
description: New status
example: reviewed
type: string
type: object
internal_notification.NotificationListResponse:
properties:
meta:
$ref: '#/definitions/response.Meta'
notifications:
items:
$ref: '#/definitions/internal_notification.NotificationResponse'
type: array
type: object
internal_notification.NotificationRequest:
properties:
channels:
items:
$ref: '#/definitions/notification.DeliveryChannel'
type: array
description:
type: string
image:
type: string
link:
type: string
priority:
$ref: '#/definitions/notification.NotificationPriority'
recipient:
items:
type: string
type: array
schedule_at:
type: integer
target:
$ref: '#/definitions/notification.TargetAudienceType'
tender:
type: string
title:
type: string
type:
$ref: '#/definitions/notification.NotificationType'
type: object
internal_notification.NotificationResponse:
properties:
created_at:
type: integer
event_type:
type: string
id:
type: string
image:
type: string
is_scheduled:
type: boolean
link:
type: string
message:
type: string
metadata:
additionalProperties: {}
type: object
methods:
additionalProperties:
type: string
type: object
priority:
type: string
recipient: {}
schedule_at:
type: integer
scheduled_at:
type: integer
seen:
type: boolean
seen_at:
type: integer
status:
type: string
title:
type: string
type:
type: string
updated_at:
type: integer
user_id:
type: string
type: object
notification.DeliveryChannel:
enum:
- push
- email
type: string
x-enum-varnames:
- DeliveryChannelPush
- DeliveryChannelEmail
notification.DetailedNotificationResponse:
properties:
data:
properties:
created_at:
type: string
event_type:
type: string
id:
type: string
image:
type: string
is_scheduled:
type: boolean
link:
type: string
message:
type: string
metadata:
additionalProperties: {}
type: object
methods:
additionalProperties:
type: string
type: object
priority:
description: low, medium, important
type: string
scheduled_at:
type: integer
seen:
type: boolean
seen_at:
type: integer
status:
description: pending, sent, failed
type: string
title:
type: string
type:
description: info, warning, alert, reject
type: string
updated_at:
type: string
user_id:
type: string
type: object
type: object
notification.NotificationPriority:
enum:
- low
- medium
- important
type: string
x-enum-varnames:
- NotificationPriorityLow
- NotificationPriorityMedium
- NotificationPriorityImportant
notification.NotificationType:
enum:
- info
- warning
- alert
- reject
type: string
x-enum-varnames:
- NotificationTypeInfo
- NotificationTypeWarning
- NotificationTypeAlert
- NotificationTypeReject
notification.TargetAudienceType:
enum:
- all_users
- specific_users
- all_role
- specific_role
- all_companies
- specific_company
- all_customers
- specific_customer
type: string
x-enum-varnames:
- TargetAudienceAllUsers
- TargetAudienceSpecificUsers
- TargetAudienceAllRole
- TargetAudienceSpecificRole
- TargetAudienceAllCompanies
- TargetAudienceSpecificCompany
- TargetAudienceAllCustomers
- TargetAudienceSpecificCustomer
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.OrganizationResponse:
properties:
name:
type: string
type: object
tender.SearchResponse:
properties:
tenders:
items:
$ref: '#/definitions/tender.TenderResponse'
type: array
type: object
tender.TenderResponse:
properties:
application_deadline:
type: integer
buyer_organization:
$ref: '#/definitions/tender.OrganizationResponse'
country_code:
type: string
currency:
type: string
description:
type: string
duration:
type: string
duration_unit:
type: string
estimated_value:
type: number
id:
type: string
notice_publication_id:
type: string
procedure_code:
type: string
procurement_type_code:
type: string
publication_date:
type: integer
status:
$ref: '#/definitions/tender.TenderStatus'
submission_deadline:
type: integer
submission_url:
type: string
tender_deadline:
type: integer
tender_id:
type: string
title:
type: string
type: object
tender.TenderStatus:
enum:
- active
- expired
- cancelled
- awarded
- draft
- closed
- modified
- suspended
- published
type: string
x-enum-varnames:
- TenderStatusActive
- TenderStatusExpired
- TenderStatusCancelled
- TenderStatusAwarded
- TenderStatusDraft
- TenderStatusClosed
- TenderStatusModified
- TenderStatusSuspended
- TenderStatusPublished
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
tender_approval.ApprovalStatus:
enum:
- submitted
- rejected
type: string
x-enum-comments:
ApprovalStatusRejected: Company rejected the tender
ApprovalStatusSubmitted: Company submitted the tender
x-enum-descriptions:
- Company submitted the tender
- Company rejected the tender
x-enum-varnames:
- ApprovalStatusSubmitted
- ApprovalStatusRejected
tender_approval.CompanyTenderApprovalStatsResponse:
properties:
company_id:
type: string
last_updated:
type: integer
partnership_count:
type: integer
rejected_tenders:
type: integer
self_apply_count:
type: integer
submitted_tenders:
type: integer
total_approvals:
type: integer
type: object
tender_approval.CreateTenderApprovalForm:
properties:
status:
$ref: '#/definitions/tender_approval.ApprovalStatus'
submission_mode:
$ref: '#/definitions/tender_approval.SubmissionMode'
tender_id:
type: string
type: object
tender_approval.OrganizationResponse:
properties:
name:
type: string
type: object
tender_approval.SubmissionMode:
enum:
- self-apply
- partnership
type: string
x-enum-comments:
SubmissionModePartnership: Company applies for the tender with a partner
SubmissionModeSelfApply: Company applies for the tender on their own
x-enum-descriptions:
- Company applies for the tender on their own
- Company applies for the tender with a partner
x-enum-varnames:
- SubmissionModeSelfApply
- SubmissionModePartnership
tender_approval.TenderApprovalListResponse:
properties:
limit:
type: integer
offset:
type: integer
tender_approvals:
items:
$ref: '#/definitions/tender_approval.TenderApprovalResponse'
type: array
total:
type: integer
total_pages:
type: integer
type: object
tender_approval.TenderApprovalResponse:
properties:
company_id:
type: string
created_at:
type: integer
id:
type: string
status:
type: string
submission_mode:
type: string
tender_id:
type: string
type: object
tender_approval.TenderApprovalStatsResponse:
properties:
last_updated:
type: integer
rejected_tenders:
type: integer
submitted_tenders:
type: integer
total_approvals:
type: integer
type: object
tender_approval.TenderApprovalWithTenderListResponse:
properties:
metadata:
$ref: '#/definitions/response.Meta'
tenders:
items:
$ref: '#/definitions/tender_approval.TenderApprovalWithTenderResponse'
type: array
type: object
tender_approval.TenderApprovalWithTenderResponse:
properties:
company_id:
type: string
created_at:
type: integer
id:
type: string
status:
type: string
submission_mode:
type: string
tender:
$ref: '#/definitions/tender_approval.TenderDetails'
tender_id:
type: string
type: object
tender_approval.TenderDetails:
properties:
buyer_organization:
$ref: '#/definitions/tender_approval.OrganizationResponse'
country_code:
type: string
currency:
type: string
description:
type: string
duration:
type: string
duration_unit:
type: string
estimated_value:
type: number
id:
type: string
notice_publication_id:
type: string
procedure_code:
type: string
procurement_type_code:
type: string
publication_date:
type: integer
status:
type: string
submission_deadline:
type: integer
tender_deadline:
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: NewAdmin!1234
type: string
old_password:
description: Current password for verification
example: Admin!1234
type: string
type: object
user.CreateUserForm:
properties:
department:
description: Optional department name
example: Information Technology
type: string
email:
description: Valid email address
example: admin@opplens.com
type: string
full_name:
description: Full name of the user
example: Admin User
type: string
password:
description: Password (minimum 8 characters)
example: Admin!1234
type: string
phone:
description: Optional phone number
example: "+18289784438"
type: string
position:
description: Optional job position
example: Lead
type: string
profile_image:
description: Optional profile image URL
example: ""
type: string
role:
description: User role (admin, manager, operator, viewer)
example: admin
type: string
username:
description: Unique username (alphanumeric only)
example: admin
type: string
type: object
user.LoginForm:
properties:
device_token:
description: Device token
example: device_token
type: string
password:
description: User password
example: Admin!1234
type: string
username:
description: Username or email address
example: admin
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: admin@opplens.com
type: string
type: object
user.UpdateUserForm:
properties:
department:
description: Updated department
example: Information Technology
type: string
email:
description: Updated email address
example: admin@opplens.com
type: string
full_name:
description: Updated full name
example: Admin User
type: string
phone:
description: Updated phone number
example: "+18289784438"
type: string
position:
description: Updated position
example: Lead
type: string
profile_image:
description: Updated profile image URL
example: ""
type: string
role:
description: Updated user role
example: admin
type: string
username:
description: Updated username
example: admin
type: string
type: object
user.UpdateUserStatusForm:
properties:
status:
type: string
type: object
user.UserListResponse:
properties:
users:
items:
$ref: '#/definitions/user.UserResponse'
type: array
type: object
user.UserResponse:
properties:
created_at:
type: integer
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
username:
type: string
type: object
info:
contact:
email: info@opplens.com
name: Opplens API Support
url: https://opplens.com
description: This is a comprehensive API for the Opplens 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://opplens.com/terms
title: Opplens API
version: 1.0.0
paths:
/admin/v1/cms:
get:
consumes:
- application/json
description: Search CMS entries with filters and pagination (admin only)
parameters:
- description: Search query
in: query
name: q
type: string
- description: CMS key filter
in: query
name: key
type: string
- default: 20
description: Number of CMS entries per page (1-100)
in: query
maximum: 100
minimum: 1
name: limit
type: integer
- default: 0
description: Number of CMS entries to skip for pagination
in: query
minimum: 0
name: offset
type: integer
- default: created_at
description: Field to sort by
enum:
- key
- created_at
- updated_at
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: OK
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/cms.CMSListResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Search CMS entries
tags:
- Admin-CMS
post:
consumes:
- application/json
description: Create a new CMS entry for content management (admin only)
parameters:
- description: CMS information
in: body
name: cms
required: true
schema:
$ref: '#/definitions/cms.CMSForm'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/cms.CMSResponse'
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'
summary: Create a new CMS entry
tags:
- Admin-CMS
/admin/v1/cms/{id}:
delete:
consumes:
- application/json
description: Delete a CMS entry by its ID (admin only)
parameters:
- description: CMS ID
in: path
name: id
required: true
type: string
produces:
- application/json
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'
summary: Delete CMS entry
tags:
- Admin-CMS
get:
consumes:
- application/json
description: Retrieve a CMS entry by its ID for editing (admin only)
parameters:
- description: CMS 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/cms.CMSResponse'
type: object
"404":
description: Not Found
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Get CMS by ID
tags:
- Admin-CMS
put:
consumes:
- application/json
description: Update an existing CMS entry by its ID (admin only)
parameters:
- description: CMS ID
in: path
name: id
required: true
type: string
- description: Updated CMS information
in: body
name: cms
required: true
schema:
$ref: '#/definitions/cms.CMSForm'
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/cms.CMSResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.APIResponse'
"409":
description: Conflict
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Update CMS entry
tags:
- Admin-CMS
/admin/v1/companies:
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
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.CompanyForm'
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.CompanyForm'
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}/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.StatusForm'
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}/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.VerificationForm'
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/company-categories:
get:
consumes:
- application/json
description: Search categories with filtering capabilities
parameters:
- description: Search query
in: query
name: q
type: string
- description: Published status filter
in: query
name: published
type: boolean
- default: 20
description: Limit
in: query
name: limit
type: integer
- default: 0
description: Offset
in: query
name: offset
type: integer
- description: Sort by field
enum:
- name
- created_at
- updated_at
- published_at
in: query
name: sort_by
type: string
- description: Sort order
enum:
- asc
- desc
in: query
name: sort_order
type: string
produces:
- application/json
responses:
"200":
description: Categories search completed
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/company_category.CategoryListResponse'
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: Search categories
tags:
- Admin-Company-Categories
post:
consumes:
- application/json
description: Create a new category with name, description, and thumbnail
parameters:
- description: Category information
in: body
name: category
required: true
schema:
$ref: '#/definitions/company_category.CategoryForm'
produces:
- application/json
responses:
"201":
description: Category created successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/company_category.CategoryResponse'
type: object
"400":
description: Bad request - Invalid input data
schema:
$ref: '#/definitions/response.APIResponse'
"409":
description: Conflict - Category with this name 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 category
tags:
- Admin-Company-Categories
/admin/v1/company-categories/{id}:
delete:
consumes:
- application/json
description: Delete a category permanently
parameters:
- description: Category ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Category deleted successfully
schema:
$ref: '#/definitions/response.APIResponse'
"400":
description: Bad request - Invalid category ID
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not found - Category not found
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Delete category
tags:
- Admin-Company-Categories
get:
consumes:
- application/json
description: Retrieve detailed category information by category ID
parameters:
- description: Category ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Category retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/company_category.CategoryResponse'
type: object
"400":
description: Bad request - Invalid category ID
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not found - Category not found
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Get category by ID
tags:
- Admin-Company-Categories
put:
consumes:
- application/json
description: Update category information including name, description, and thumbnail
parameters:
- description: Category ID
in: path
name: id
required: true
type: string
- description: Category update information
in: body
name: category
required: true
schema:
$ref: '#/definitions/company_category.CategoryForm'
produces:
- application/json
responses:
"200":
description: Category updated successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/company_category.CategoryResponse'
type: object
"400":
description: Bad request - Invalid input data
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not found - Category not found
schema:
$ref: '#/definitions/response.APIResponse'
"409":
description: Conflict - Category with this name 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 category information
tags:
- Admin-Company-Categories
/admin/v1/company-categories/{id}/publish:
patch:
consumes:
- application/json
description: Toggle category publish/unpublish status
parameters:
- description: Category ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Category publish status updated successfully
schema:
$ref: '#/definitions/response.APIResponse'
"400":
description: Bad request - Invalid input data
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not found - Category 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: Toggle category publish status
tags:
- Admin-Company-Categories
/admin/v1/contacts:
get:
consumes:
- application/json
description: Search contacts with filters and pagination (admin only)
parameters:
- description: Search query
in: query
name: q
type: string
- description: Contact status
enum:
- pending
- in_progress
- resolved
- closed
in: query
name: status
type: string
- description: Date from (Unix timestamp)
in: query
name: date_from
type: integer
- description: Date to (Unix timestamp)
in: query
name: date_to
type: integer
- default: 20
description: Number of contacts per page (1-100)
in: query
maximum: 100
minimum: 1
name: limit
type: integer
- default: 0
description: Number of contacts to skip for pagination
in: query
minimum: 0
name: offset
type: integer
- default: created_at
description: Field to sort by
enum:
- full_name
- email
- 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: OK
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/contact.ContactListResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Search contacts
tags:
- Admin-Contacts
/admin/v1/contacts/{id}:
delete:
consumes:
- application/json
description: Delete a contact message by ID (admin only)
parameters:
- description: Contact 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'
"404":
description: Not Found
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Delete contact
tags:
- Admin-Contacts
get:
consumes:
- application/json
description: Retrieve a contact message by its ID (admin only)
parameters:
- description: Contact 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/contact.ContactResponse'
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'
summary: Get contact by ID
tags:
- Admin-Contacts
/admin/v1/contacts/{id}/status:
put:
consumes:
- application/json
description: Update the status of a contact message (admin only)
parameters:
- description: Contact ID
in: path
name: id
required: true
type: string
- description: Status update information
in: body
name: status
required: true
schema:
$ref: '#/definitions/contact.UpdateContactStatusForm'
produces:
- application/json
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'
summary: Update contact status
tags:
- Admin-Contacts
/admin/v1/contacts/stats:
get:
consumes:
- application/json
description: Get contact statistics by status (admin only)
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/contact.ContactStats'
type: object
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Get contact statistics
tags:
- Admin-Contacts
/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
- 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}/companies:
patch:
consumes:
- application/json
description: Assign companies to a customer
parameters:
- description: Customer ID
in: path
name: id
required: true
type: string
- description: Companies 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'
"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}/role:
patch:
consumes:
- application/json
description: Assign a role (admin or analyst) to a customer
parameters:
- description: Customer ID
in: path
name: id
required: true
type: string
- description: Role assignment information
in: body
name: role
required: true
schema:
$ref: '#/definitions/customer.AssignRoleForm'
produces:
- application/json
responses:
"200":
description: Role assigned successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/customer.AssignRoleResponse'
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'
"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 role to 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.UpdateStatusForm'
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/feedback:
get:
consumes:
- application/json
description: Retrieve paginated list of feedback with optional filtering by
various criteria. This endpoint is for administrative use and provides comprehensive
filtering options.
parameters:
- description: Filter by tender ID (MongoDB ObjectID format)
in: query
name: tender_id
type: string
- description: Filter by customer ID (MongoDB ObjectID format)
in: query
name: customer_id
type: string
- description: Filter by company ID (MongoDB ObjectID format)
in: query
name: company_id
type: string
- description: Filter by feedback type
enum:
- like
- dislike
in: query
name: feedback_type
type: string
- description: Filter by creation date from (Unix timestamp in seconds)
format: int64
in: query
name: date_from
type: integer
- description: Filter by creation date to (Unix timestamp in seconds)
format: int64
in: query
name: date_to
type: integer
- description: 'Number of items per page (default: 20, max: 100)'
in: query
maximum: 100
minimum: 1
name: limit
type: integer
- description: 'Number of items to skip for pagination (default: 0)'
in: query
minimum: 0
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: Feedback list retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/feedback.FeedbackListResponse'
type: object
"400":
description: Bad request - Invalid query parameters
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"422":
description: Validation error - Invalid filter criteria
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"500":
description: Internal server error
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
security:
- BearerAuth: []
summary: List feedback with filters
tags:
- Admin-Feedback
/admin/v1/feedback/{id}:
delete:
consumes:
- application/json
description: Mark feedback as deleted without permanently removing it from the
database. The feedback will be marked as deleted and hidden from normal queries
but can be restored if needed.
parameters:
- description: Feedback ID (MongoDB ObjectID format)
in: path
maxLength: 24
minLength: 24
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Feedback soft deleted successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
message:
type: string
type: object
"400":
description: Bad request - Invalid feedback ID format
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"401":
description: Unauthorized - User not authenticated
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"403":
description: Forbidden - User not authorized to delete this feedback
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"404":
description: Not found - Feedback not found
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"500":
description: Internal server error
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
security:
- BearerAuth: []
summary: Soft delete feedback
tags:
- Admin-Feedback
get:
consumes:
- application/json
description: Retrieve feedback details by its unique identifier with loaded
tender, customer, and company information. This endpoint provides comprehensive
feedback data including related entity details.
parameters:
- description: Feedback ID (MongoDB ObjectID format)
in: path
maxLength: 24
minLength: 24
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: feedback retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/feedback.FeedbackResponse'
type: object
"400":
description: Bad request - Invalid feedback ID format
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"404":
description: Feedback not found
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"500":
description: Internal server error
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
security:
- BearerAuth: []
summary: Get feedback by ID
tags:
- Admin-Feedback
/admin/v1/flags/{country_code}:
get:
consumes:
- application/json
description: Retrieve a country flag by its 3-letter country code for admin
panel
parameters:
- description: 3-letter country code (e.g., POL, GRC)
in: path
name: country_code
required: true
type: string
produces:
- application/json
responses:
"200":
description: SVG content
schema:
type: string
security:
- BearerAuth: []
summary: Get flag by country code (Admin)
tags:
- Admin-Flags
/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/bootstrap.HealthResponse'
"503":
description: System is unhealthy or experiencing issues
schema:
$ref: '#/definitions/bootstrap.HealthResponse'
summary: Health check endpoint
tags:
- Admin-Health
/admin/v1/inquiries:
get:
consumes:
- application/json
description: Search and filter inquiries with pagination support. This endpoint
allows administrators to find inquiries based on various criteria including
name, company, email, status, and other filters.
parameters:
- description: Search term for full name, company name, or email
in: query
name: q
type: string
- description: Filter by status (pending, reviewed, approved, rejected)
in: query
name: status
type: string
- description: Limit results (1-100)
in: query
name: limit
type: integer
- description: Offset results
in: query
name: offset
type: integer
- description: Sort field (full_name, company_name, work_email, status, created_at)
in: query
name: sort_by
type: string
- description: Sort order (asc, desc)
in: query
name: sort_order
type: string
produces:
- application/json
responses:
"200":
description: Inquiries retrieved successfully with pagination metadata
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/inquiry.InquiryListResponse'
type: object
"400":
description: Bad request - Invalid query parameters
schema:
$ref: '#/definitions/response.APIResponse'
"422":
description: Validation error - Invalid parameter values
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Search inquiries
tags:
- Admin-Inquiries
/admin/v1/inquiries/{id}:
delete:
consumes:
- application/json
description: Delete an inquiry permanently from the system. This action cannot
be undone and will remove all inquiry data including contact information,
status history, and timestamps.
parameters:
- description: Inquiry ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Inquiry deleted successfully
schema:
$ref: '#/definitions/response.APIResponse'
"400":
description: Bad request - Invalid inquiry ID format
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not found - Inquiry with specified ID not found
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Delete inquiry
tags:
- Admin-Inquiries
get:
consumes:
- application/json
description: Retrieve detailed information about a specific inquiry by its unique
identifier. This endpoint provides complete inquiry details including contact
information, status, and status history.
parameters:
- description: Inquiry ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Inquiry retrieved successfully with complete details
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/inquiry.InquiryResponse'
type: object
"400":
description: Bad request - Invalid inquiry ID format
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not found - Inquiry with specified ID not found
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Get inquiry by ID
tags:
- Admin-Inquiries
/admin/v1/inquiries/{id}/status:
put:
consumes:
- application/json
description: 'Update the status of an inquiry with reason and optional description.
This endpoint allows administrators to change inquiry status following the
defined workflow: pending -> reviewed -> approved/rejected.'
parameters:
- description: Inquiry ID
in: path
name: id
required: true
type: string
- description: Status update information including new status, reason, and optional
description
in: body
name: status
required: true
schema:
$ref: '#/definitions/inquiry.UpdateInquiryStatusForm'
produces:
- application/json
responses:
"200":
description: Inquiry status updated successfully with updated details
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/inquiry.InquiryResponse'
type: object
"400":
description: Bad request - Invalid inquiry ID format or invalid status transition
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not found - Inquiry with specified ID not found
schema:
$ref: '#/definitions/response.APIResponse'
"422":
description: Validation error - Invalid data format or validation rules
not met
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Update inquiry status
tags:
- Admin-Inquiries
/admin/v1/notifications:
get:
consumes:
- application/json
description: Get notifications
parameters:
- description: Status filter
in: query
name: status
type: string
- description: Method filter
in: query
name: method
type: string
- description: Event type filter
in: query
name: event_type
type: string
- description: Type filter
in: query
name: type
type: string
- description: Recipient filter
in: query
name: recipient
type: string
- description: Seen filter
in: query
name: seen
type: boolean
- description: Priority filter
in: query
name: priority
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/internal_notification.NotificationListResponse'
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 notifications
tags:
- Admin-Notification
post:
consumes:
- application/json
description: Create a new notification with the provided information
parameters:
- description: Notification information
in: body
name: notification
required: true
schema:
$ref: '#/definitions/internal_notification.NotificationRequest'
produces:
- application/json
responses:
"201":
description: Notification created successfully
schema:
$ref: '#/definitions/response.APIResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Create a new notification
tags:
- Admin-Notification
/admin/v1/notifications/mark-seen/{id}:
get:
consumes:
- application/json
description: Mark a notification as seen
parameters:
- description: Notification 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'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Mark a notification as seen
tags:
- Admin-Notification
/admin/v1/notifications/my:
get:
consumes:
- application/json
description: Get notifications for the admin
parameters:
- description: Status filter
in: query
name: status
type: string
- description: Method filter
in: query
name: method
type: string
- description: Event type filter
in: query
name: event_type
type: string
- description: Type filter
in: query
name: type
type: string
- description: Recipient filter
in: query
name: recipient
type: string
- description: Seen filter
in: query
name: seen
type: boolean
- description: Priority filter
in: query
name: priority
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/internal_notification.NotificationListResponse'
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 notifications for the admin
tags:
- Admin-Notification
/admin/v1/notifications/view/{id}:
get:
consumes:
- application/json
description: Get detailed information about a specific notification
parameters:
- description: Notification 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/internal_notification.NotificationResponse'
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: Get notification details
tags:
- Admin-Notification
/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-Authorization
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-Authorization
/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-Authorization
/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/tender-approvals:
get:
consumes:
- application/json
description: Retrieve a paginated list of tender approvals with filtering options
parameters:
- description: Filter by tender ID
in: query
name: tender_id
type: string
- description: Filter by company ID
in: query
name: company_id
type: string
- description: Filter by status
in: query
name: status
type: array
- description: Filter by submission mode
in: query
name: submission_mode
type: array
- description: Filter by creation date from (Unix timestamp)
in: query
name: created_at_from
type: integer
- description: Filter by creation date to (Unix timestamp)
in: query
name: created_at_to
type: integer
- default: 20
description: Number of approvals per page (1-100)
in: query
maximum: 100
minimum: 1
name: limit
type: integer
- default: 0
description: Number of approvals to skip for pagination
in: query
minimum: 0
name: offset
type: integer
- default: created_at
description: Field to sort by
enum:
- created_at
- updated_at
- status
- submission_mode
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: Tender approvals retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/tender_approval.TenderApprovalListResponse'
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 tender approvals with filters and pagination
tags:
- Admin-TenderApprovals
/admin/v1/tender-approvals/{id}:
get:
consumes:
- application/json
description: Retrieve detailed tender approval information by ID
parameters:
- description: Tender Approval ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Tender approval retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/tender_approval.TenderApprovalResponse'
type: object
"400":
description: Bad request - Invalid tender approval ID
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not found - Tender approval not found
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Get tender approval by ID
tags:
- Admin-TenderApprovals
/admin/v1/tender-approvals/stats:
get:
consumes:
- application/json
description: Get comprehensive tender approval statistics for dashboard
produces:
- application/json
responses:
"200":
description: Tender approval statistics retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/tender_approval.TenderApprovalStatsResponse'
type: object
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Get tender approval statistics
tags:
- Admin-TenderApprovals
/admin/v1/tender-approvals/status/{status}:
get:
consumes:
- application/json
description: Retrieve tender approvals filtered by their status (submitted,
rejected)
parameters:
- description: Tender approval status
enum:
- submitted
- rejected
in: path
name: status
required: true
type: string
- default: 20
description: Number of approvals per page (1-100)
in: query
maximum: 100
minimum: 1
name: limit
type: integer
- default: 0
description: Number of approvals to skip for pagination
in: query
minimum: 0
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: Tender approvals retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
items:
$ref: '#/definitions/tender_approval.TenderApprovalResponse'
type: array
meta:
$ref: '#/definitions/response.Meta'
type: object
"400":
description: Bad request - Invalid tender approval status
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Get tender approvals by status
tags:
- Admin-TenderApprovals
/admin/v1/tender-approvals/submission-mode/{submission_mode}:
get:
consumes:
- application/json
description: Retrieve tender approvals filtered by their submission mode (self-apply,
partnership)
parameters:
- description: Tender approval submission mode
enum:
- self-apply
- partnership
in: path
name: submission_mode
required: true
type: string
- default: 20
description: Number of approvals per page (1-100)
in: query
maximum: 100
minimum: 1
name: limit
type: integer
- default: 0
description: Number of approvals to skip for pagination
in: query
minimum: 0
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: Tender approvals retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
items:
$ref: '#/definitions/tender_approval.TenderApprovalResponse'
type: array
meta:
$ref: '#/definitions/response.Meta'
type: object
"400":
description: Bad request - Invalid tender approval submission mode
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Get tender approvals by submission mode
tags:
- Admin-TenderApprovals
/admin/v1/tenders:
get:
description: Retrieve tenders with pagination, filtering, and search capabilities
with optional company-based matching
parameters:
- 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: q
type: string
- description: Filter by notice type code
in: query
name: notice_type
type: string
- description: Filter by procurement type code
in: query
name: procurement_type
type: string
- collectionFormat: csv
description: Filter by country codes (comma-separated)
in: query
items:
type: string
name: country_codes
type: array
- collectionFormat: csv
description: Filter by status (comma-separated)
in: query
items:
type: string
name: status
type: array
- collectionFormat: csv
description: Filter by source (comma-separated)
in: query
items:
type: string
name: source
type: array
- description: Minimum estimated value
in: query
name: min_estimated_value
type: number
- description: Maximum estimated value
in: query
name: max_estimated_value
type: number
- description: Filter by currency
in: query
name: currency
type: string
- description: Deadline from
in: query
name: deadline_from
type: number
- description: Deadline to
in: query
name: deadline_to
type: number
- description: Publication date from
in: query
name: publication_date_from
type: number
- description: Publication date to
in: query
name: publication_date_to
type: number
- collectionFormat: csv
description: Filter by languages (comma-separated)
in: query
items:
type: string
name: languages
type: array
- description: Filter by buyer organization ID
in: query
name: buyer_organization_id
type: string
- description: 'Number of items per page (default: 20, max: 100)'
in: query
name: limit
type: integer
- description: 'Number of items to skip (default: 0)'
in: query
name: offset
type: integer
- description: Sort by field
in: query
name: sort_by
type: string
- description: Sort order (asc or desc)
in: query
name: sort_order
type: string
produces:
- application/json
responses:
"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
/admin/v1/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/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: 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}/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
/api/v1//{country_code}:
get:
consumes:
- application/json
description: Retrieve only the SVG content of a country flag by its 3-letter
country code
parameters:
- description: 3-letter country code (e.g., POL, GRC)
in: path
name: country_code
required: true
type: string
produces:
- image/svg+xml
responses:
"200":
description: SVG content
schema:
type: string
summary: Get flag SVG
tags:
- Flags
/api/v1/cms/{key}:
get:
consumes:
- application/json
description: Retrieve CMS content for public display by its key
parameters:
- description: CMS key
in: path
name: key
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/cms.CMSResponse'
type: object
"404":
description: Not Found
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Get CMS content by key
tags:
- CMS
/api/v1/companies:
get:
consumes:
- application/json
description: Retrieve the profile of the company associated with the authenticated
user
produces:
- application/json
responses:
"200":
description: Company retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/company.CompanyProfileResponse'
type: object
"401":
description: Unauthorized - User not authenticated
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Get my company profile
tags:
- Company
/api/v1/contacts:
post:
consumes:
- application/json
description: Create a new contact message from a user
parameters:
- description: Contact information
in: body
name: contact
required: true
schema:
$ref: '#/definitions/contact.CreateContactForm'
produces:
- application/json
responses:
"201":
description: Created
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/contact.ContactResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Create a new contact message
tags:
- Contacts
/api/v1/feedback:
get:
consumes:
- application/json
description: Retrieve paginated list of feedback with optional filtering by
various criteria. This endpoint is for public use and filters results based
on the authenticated user's company.
parameters:
- description: Filter by tender ID (MongoDB ObjectID format)
in: query
name: tender_id
type: string
- description: Filter by customer ID (MongoDB ObjectID format)
in: query
name: customer_id
type: string
- description: Filter by company ID (MongoDB ObjectID format)
in: query
name: company_id
type: string
- description: Filter by feedback type
enum:
- like
- dislike
in: query
name: feedback_type
type: string
- description: Filter by creation date from (Unix timestamp in seconds)
format: int64
in: query
minimum: 0
name: date_from
type: integer
- description: Filter by creation date to (Unix timestamp in seconds)
format: int64
in: query
minimum: 0
name: date_to
type: integer
- description: 'Number of items per page (default: 20, max: 100)'
in: query
maximum: 100
minimum: 1
name: limit
type: integer
- description: 'Number of items to skip for pagination (default: 0)'
in: query
minimum: 0
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: Feedback list retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/feedback.FeedbackListResponse'
type: object
"400":
description: Bad request - Invalid query parameters or missing company association
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"422":
description: Validation error - Invalid filter criteria
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"500":
description: Internal server error
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
security:
- BearerAuth: []
summary: List feedback with filters
tags:
- Feedback
post:
consumes:
- application/json
description: Toggle between like and dislike for a tender, or create a like
if no feedback exists. This endpoint allows users to express their preference
for tenders and automatically handles the toggle logic.
parameters:
- description: Feedback toggle request containing tender ID
in: body
name: feedback
required: true
schema:
$ref: '#/definitions/feedback.ToggleFeedbackForm'
produces:
- application/json
responses:
"200":
description: Feedback toggled successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/feedback.FeedbackResponse'
type: object
"400":
description: Bad request - Invalid input data or missing customer/company
association
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"401":
description: Unauthorized - User not authenticated
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"422":
description: Validation error - Invalid request data format
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"500":
description: Internal server error
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
security:
- BearerAuth: []
summary: Toggle feedback for a tender
tags:
- Feedback
/api/v1/feedback/{id}:
get:
consumes:
- application/json
description: Retrieve feedback details by its unique identifier. This endpoint
provides basic feedback information for public users.
parameters:
- description: Feedback ID (MongoDB ObjectID format)
in: path
maxLength: 24
minLength: 24
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Feedback retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/feedback.FeedbackResponse'
type: object
"400":
description: Bad request - Invalid feedback ID format
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"404":
description: Feedback not found
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"500":
description: Internal server error
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
security:
- BearerAuth: []
summary: Get feedback by ID
tags:
- Feedback
/api/v1/feedback/stats/company:
get:
consumes:
- application/json
description: Retrieve comprehensive feedback statistics for the authenticated
user's company including total likes, dislikes, and percentage calculations.
produces:
- application/json
responses:
"200":
description: Company feedback statistics retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/feedback.StatsResponse'
type: object
"400":
description: Bad request - Missing company association
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"401":
description: Unauthorized - User not authenticated
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"500":
description: Internal server error
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
security:
- BearerAuth: []
summary: Get company feedback statistics
tags:
- Feedback
/api/v1/feedback/tender/{tender_id}:
get:
consumes:
- application/json
description: Retrieve feedback details by tender ID. This endpoint provides
basic feedback information for public users.
parameters:
- description: Tender ID (MongoDB ObjectID format)
in: path
maxLength: 24
minLength: 24
name: tender_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Feedback retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/feedback.FeedbackResponse'
type: object
"400":
description: Bad request - Invalid tender ID format
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"404":
description: Feedback not found
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
"500":
description: Internal server error
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
error:
type: string
message:
type: string
type: object
security:
- BearerAuth: []
summary: Get feedback by tender ID
tags:
- Feedback
/api/v1/inquiries:
post:
consumes:
- application/json
description: Create a new inquiry with contact information for potential business
opportunities. This endpoint allows external users to submit inquiries about
services or partnerships. Duplicate submissions are prevented based on email
and phone number.
parameters:
- description: Inquiry information including contact details and company information
in: body
name: inquiry
required: true
schema:
$ref: '#/definitions/inquiry.CreateInquiryForm'
produces:
- application/json
responses:
"201":
description: Inquiry created successfully with assigned ID and timestamps
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/inquiry.InquiryResponse'
type: object
"400":
description: Bad request - Invalid input data or missing required fields
schema:
$ref: '#/definitions/response.APIResponse'
"409":
description: Conflict - Duplicate inquiry already exists with same email
or phone number
schema:
$ref: '#/definitions/response.APIResponse'
"422":
description: Validation error - Invalid data format or validation rules
not met
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
summary: Create new inquiry
tags:
- Inquiries
/api/v1/notifications:
get:
consumes:
- application/json
description: Get notifications for the user
parameters:
- description: Status filter
in: query
name: status
type: string
- description: Method filter
in: query
name: method
type: string
- description: Event type filter
in: query
name: event_type
type: string
- description: Type filter
in: query
name: type
type: string
- description: Recipient filter
in: query
name: recipient
type: string
- description: Seen filter
in: query
name: seen
type: boolean
- description: Priority filter
in: query
name: priority
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/internal_notification.NotificationListResponse'
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 notifications for the user
tags:
- Notification
/api/v1/notifications/mark:
get:
consumes:
- application/json
description: Mark all notifications as seen for a user
parameters:
- description: User ID
in: path
name: user_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'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Mark all notifications as seen for a user
tags:
- Notification
/api/v1/notifications/mark/{id}:
get:
consumes:
- application/json
description: Mark a notification as seen
parameters:
- description: Notification 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'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Mark a notification as seen
tags:
- Notification
/api/v1/notifications/view/{id}:
get:
consumes:
- application/json
description: Get detailed information about a specific notification
parameters:
- description: Notification 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/notification.DetailedNotificationResponse'
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: Get notification details
tags:
- Notification
/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/forgot-password:
post:
consumes:
- application/json
description: Send a password reset OTP code to the customer's email address
parameters:
- description: Email address for password reset
in: body
name: request
required: true
schema:
$ref: '#/definitions/customer.RequestResetPasswordForm'
produces:
- application/json
responses:
"200":
description: Password reset code sent successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/customer.RequestResetPasswordResponse'
type: object
"400":
description: Bad request - Invalid input data
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: Request password reset
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/profile/reset-password:
post:
consumes:
- application/json
description: Reset the customer's password using the reset token
parameters:
- description: Email, reset token, and new password
in: body
name: request
required: true
schema:
$ref: '#/definitions/customer.ResetPasswordForm'
produces:
- application/json
responses:
"200":
description: Password reset successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/customer.ResetPasswordResponse'
type: object
"400":
description: Bad request - Invalid input data
schema:
$ref: '#/definitions/response.APIResponse'
"401":
description: Unauthorized - Invalid or expired reset 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: Reset password
tags:
- Authorization
/api/v1/profile/verify-otp:
post:
consumes:
- application/json
description: Verify the OTP code received via email and get a reset token
parameters:
- description: Email and OTP code for verification
in: body
name: request
required: true
schema:
$ref: '#/definitions/customer.VerifyOTPForm'
produces:
- application/json
responses:
"200":
description: OTP verified successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/customer.VerifyOTPResponse'
type: object
"400":
description: Bad request - Invalid input data
schema:
$ref: '#/definitions/response.APIResponse'
"401":
description: Unauthorized - Invalid or expired OTP
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: Verify OTP code
tags:
- Authorization
/api/v1/tender-approvals:
get:
consumes:
- application/json
description: Retrieve all tender approvals for a specific company with optional
filtering
parameters:
- default: 20
description: Number of approvals per page (1-100)
in: query
maximum: 100
minimum: 1
name: limit
type: integer
- default: 0
description: Number of approvals to skip for pagination
in: query
minimum: 0
name: offset
type: integer
- description: Filter by submission mode Enums(self-apply, partnership)
enum:
- self-apply
- partnership
in: query
name: submission_mode
type: string
- description: Filter by status Enums(submitted, rejected)
enum:
- submitted
- rejected
in: query
name: status
type: string
- description: Filter by created date from (Unix timestamp)
in: query
name: created_from
type: integer
- description: Filter by created date to (Unix timestamp)
in: query
name: created_to
type: integer
produces:
- application/json
responses:
"200":
description: Tender approvals retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/tender_approval.TenderApprovalWithTenderListResponse'
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 tender approvals by company ID
tags:
- TenderApprovals
post:
consumes:
- application/json
description: Create a new tender approval for a company to approve or reject
a tender
parameters:
- description: Tender approval information
in: body
name: tender_approval
required: true
schema:
$ref: '#/definitions/tender_approval.CreateTenderApprovalForm'
produces:
- application/json
responses:
"201":
description: Tender approval created successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/tender_approval.TenderApprovalResponse'
type: object
"400":
description: Bad request - Invalid input data
schema:
$ref: '#/definitions/response.APIResponse'
"409":
description: Conflict - Tender approval already exists for this tender and
company
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 tender approval
tags:
- TenderApprovals
/api/v1/tender-approvals/{id}:
get:
consumes:
- application/json
description: Retrieve detailed tender approval information by ID
parameters:
- description: Tender Approval ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Tender approval retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/tender_approval.TenderApprovalResponse'
type: object
"400":
description: Bad request - Invalid tender approval ID
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not found - Tender approval not found
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Get tender approval by ID
tags:
- TenderApprovals
/api/v1/tender-approvals/stats:
get:
consumes:
- application/json
description: Get comprehensive tender approval statistics for a specific company
produces:
- application/json
responses:
"200":
description: Company tender approval statistics retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/tender_approval.CompanyTenderApprovalStatsResponse'
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 company tender approval statistics
tags:
- TenderApprovals
/api/v1/tender-approvals/tender/{tender_id}:
get:
consumes:
- application/json
description: Retrieve tender approval information for a specific tender and
company combination
parameters:
- description: Tender ID
in: path
name: tender_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Tender approval retrieved successfully
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/tender_approval.TenderApprovalResponse'
type: object
"400":
description: Bad request - Invalid tender ID or company ID
schema:
$ref: '#/definitions/response.APIResponse'
"404":
description: Not found - Tender approval not found
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal server error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Get tender approval by tender and company
tags:
- TenderApprovals
/api/v1/tenders:
get:
description: Retrieve active tenders for mobile application users with automatic
company-based matching from customer profile
parameters:
- description: Search query for title and description
in: query
name: q
type: string
- description: Filter by notice type code
in: query
name: notice_type
type: string
- description: Filter by procurement type code
in: query
name: procurement_type
type: string
- collectionFormat: csv
description: Filter by country codes (comma-separated)
in: query
items:
type: string
name: country_codes
type: array
- collectionFormat: csv
description: Filter by status (comma-separated)
in: query
items:
type: string
name: status
type: array
- collectionFormat: csv
description: Filter by source (comma-separated)
in: query
items:
type: string
name: source
type: array
- description: Minimum estimated value
in: query
name: min_estimated_value
type: number
- description: Maximum estimated value
in: query
name: max_estimated_value
type: number
- description: Filter by currency
in: query
name: currency
type: string
- description: Deadline from
in: query
name: deadline_from
type: number
- description: Deadline to
in: query
name: deadline_to
type: number
- description: Publication date from
in: query
name: publication_date_from
type: number
- description: Publication date to
in: query
name: publication_date_to
type: number
- collectionFormat: csv
description: Filter by languages (comma-separated)
in: query
items:
type: string
name: languages
type: array
- description: Filter by buyer organization ID
in: query
name: buyer_organization_id
type: string
- description: 'Number of items per page (default: 20, max: 100)'
in: query
name: limit
type: integer
- description: 'Number of items to skip (default: 0)'
in: query
name: offset
type: integer
- description: Sort by field
in: query
name: sort_by
type: string
- description: Sort order (asc or desc)
in: query
name: sort_order
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/tender.SearchResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Get public tenders
tags:
- Tenders
/api/v1/tenders/details/{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'
security:
- BearerAuth: []
summary: Get public tender details
tags:
- Tenders
/api/v1/tenders/recommend:
get:
description: Retrieve active tenders for mobile application users with automatic
company-based matching from customer profile
parameters:
- description: Search query for title and description
in: query
name: q
type: string
- description: Filter by notice type code
in: query
name: notice_type
type: string
- description: Filter by procurement type code
in: query
name: procurement_type
type: string
- collectionFormat: csv
description: Filter by country codes (comma-separated)
in: query
items:
type: string
name: country_codes
type: array
- collectionFormat: csv
description: Filter by status (comma-separated)
in: query
items:
type: string
name: status
type: array
- collectionFormat: csv
description: Filter by source (comma-separated)
in: query
items:
type: string
name: source
type: array
- description: Minimum estimated value
in: query
name: min_estimated_value
type: number
- description: Maximum estimated value
in: query
name: max_estimated_value
type: number
- description: Filter by currency
in: query
name: currency
type: string
- description: Deadline from
in: query
name: deadline_from
type: number
- description: Deadline to
in: query
name: deadline_to
type: number
- description: Publication date from
in: query
name: publication_date_from
type: number
- description: Publication date to
in: query
name: publication_date_to
type: number
- collectionFormat: csv
description: Filter by languages (comma-separated)
in: query
items:
type: string
name: languages
type: array
- description: Filter by buyer organization ID
in: query
name: buyer_organization_id
type: string
- description: 'Number of items per page (default: 20, max: 100)'
in: query
name: limit
type: integer
- description: 'Number of items to skip (default: 0)'
in: query
name: offset
type: integer
- description: Sort by field
in: query
name: sort_by
type: string
- description: Sort order (asc or desc)
in: query
name: sort_order
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/response.APIResponse'
- properties:
data:
$ref: '#/definitions/tender.SearchResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/response.APIResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.APIResponse'
security:
- BearerAuth: []
summary: Get public tenders
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 company category management operations for web panel
including CRUD operations, publish/unpublish status, and comprehensive filtering
with pagination
name: Admin-Company-Categories
- description: Administrative tender management operations for web panel including
CRUD operations, search, statistics, and comprehensive filtering with pagination
name: Admin-Tenders
- description: Administrative feedback management operations for web panel including
CRUD operations, search, statistics, and comprehensive filtering with pagination
name: Admin-Feedback
- description: Administrative tender approval management operations for web panel
including CRUD operations, search, statistics, and comprehensive filtering with
pagination
name: Admin-TenderApprovals
- description: Administrative inquiry management operations for web panel including
CRUD operations, search, statistics, and comprehensive filtering with pagination
name: Admin-Inquiries
- description: Administrative flag management operations for web panel including flag
listing and retrieval
name: Admin-Flags
- description: Administrative notification management operations for web panel including
CRUD operations, bulk notifications, queue management, and comprehensive filtering
with pagination
name: Admin-Notification
- description: Administrative contact management operations for web panel including
CRUD operations, search, statistics, and comprehensive filtering with pagination
name: Admin-Contacts
- description: Administrative CMS management operations for web panel including CRUD
operations, search, statistics, and comprehensive filtering with pagination
name: Admin-CMS
- description: Customer authentication and authorization operations for mobile application
including login, logout, token refresh, and profile access
name: Authorization
- description: Company information access for mobile application including company
profile and company tenders
name: Company
- description: Public tender information access for mobile application including active
tender listings and detailed tender information
name: Tenders
- description: Public feedback management operations for mobile application including
like, dislike, and comment on tenders
name: Feedback
- description: Public tender approval management operations for mobile application
including tender approval listing and detailed tender approval information
name: TenderApprovals
- description: Public inquiry management operations for mobile application including
inquiry submission and inquiry listing
name: Inquiries
- description: Public flag management operations for mobile application including
flag retrieval and listing
name: Flags
- description: Public notification management operations for mobile application including
notification listing and detailed notification information
name: Notification
- description: Public contact management operations for mobile application including
contact submission and contact listing
name: Contacts
- description: Public CMS management operations for mobile application including CMS
listing and detailed CMS information
name: CMS