forked from ebhomengo/niki
1
0
Fork 0
niki/docs/swagger.yaml

2698 lines
67 KiB
YAML
Raw Normal View History

2024-05-14 13:07:09 +00:00
definitions:
addressparam.BenefactorAddAddressRequest:
properties:
address:
example: tehran
type: string
city_id:
example: 1
type: integer
lat:
example: 22.23
type: number
lon:
example: 22.22
type: number
name:
example: home
type: string
2024-05-14 13:07:09 +00:00
postal_code:
example: "1234567890"
type: string
type: object
addressparam.BenefactorAddAddressResponse:
properties:
data:
$ref: '#/definitions/addressparam.Data'
field_errors:
additionalProperties:
type: string
type: object
2024-05-14 13:07:09 +00:00
type: object
addressparam.Data:
2024-06-01 00:29:11 +00:00
properties:
address:
type: string
benefactor_id:
type: integer
city_id:
type: integer
id:
type: integer
lat:
type: number
lon:
type: number
name:
type: string
postal_code:
type: string
province_id:
type: integer
type: object
addressparam.GetAddressResponse:
properties:
data:
$ref: '#/definitions/addressparam.Data'
field_errors:
additionalProperties:
type: string
type: object
2024-06-01 00:29:11 +00:00
type: object
addressparam.GetAllAddressesResponse:
properties:
data:
items:
$ref: '#/definitions/addressparam.Data'
type: array
type: object
2024-05-14 13:07:09 +00:00
addressparam.GetAllCitiesResponse:
properties:
data:
2024-05-14 13:07:09 +00:00
items:
$ref: '#/definitions/entity.City'
type: array
type: object
addressparam.GetAllProvincesResponse:
properties:
data:
2024-05-14 13:07:09 +00:00
items:
$ref: '#/definitions/entity.Province'
type: array
type: object
addressparam.UpdateAddressRequest:
properties:
address:
example: Zanjan Province, Zanjan, Etemadieh, 6th St, Iran
type: string
city_id:
example: 163
type: integer
lat:
example: 123.456
type: number
lon:
example: 123.456
type: number
name:
example: Home
type: string
postal_code:
example: "1234567890"
type: string
type: object
adminagentparam.Data:
properties:
first_name:
example: John
type: string
id:
example: 1
type: integer
last_name:
example: Doe
type: string
phone_number:
example: "09123456789"
type: string
type: object
adminagentparam.GetAllAgentResponse:
properties:
data:
items:
$ref: '#/definitions/adminagentparam.Data'
type: array
type: object
adminkindboxparam.AssignReceiverRequest:
2024-07-01 17:13:28 +00:00
properties:
receiver_agent_id:
2024-07-01 17:13:28 +00:00
type: integer
type: object
adminkindboxparam.Data:
properties:
amount:
type: integer
benefactor_id:
type: integer
deliver_address_id:
type: integer
deliver_refer_date:
type: string
deliver_refer_time_id:
type: integer
delivered_at:
type: string
id:
type: integer
kind_box_req_id:
type: integer
kind_box_type:
$ref: '#/definitions/entity.KindBoxType'
receiver_agent_id:
type: integer
return_address_id:
type: integer
return_refer_date:
type: string
return_refer_time_id:
type: integer
returned_at:
type: string
sender_agent_id:
type: integer
serial_number:
type: string
status:
$ref: '#/definitions/entity.KindBoxStatus'
type: object
adminkindboxparam.EnumerateKindBoxRequest:
properties:
amount:
type: integer
type: object
2024-07-09 17:17:04 +00:00
adminkindboxparam.KindBoxGetAllResponse:
properties:
data:
2024-07-09 17:17:04 +00:00
items:
$ref: '#/definitions/adminkindboxparam.Data'
2024-07-09 17:17:04 +00:00
type: array
field_errors:
additionalProperties:
type: string
type: object
2024-07-09 17:17:04 +00:00
pagination:
$ref: '#/definitions/param.PaginationResponse'
type: object
adminkindboxparam.KindBoxGetResponse:
properties:
data:
$ref: '#/definitions/adminkindboxparam.Data'
field_errors:
additionalProperties:
type: string
type: object
type: object
adminkindboxparam.KindBoxUpdateRequest:
properties:
amount:
example: 3
type: integer
benefactor_id:
example: 1
type: integer
receiver_agent_id:
example: 23
type: integer
return_address_id:
example: 1
type: integer
return_refer_date:
example: "2025-01-02T15:04:05Z"
type: string
return_refere_time_id:
example: 3
type: integer
type: object
2024-05-15 07:38:39 +00:00
adminkindboxreqparam.AssignSenderRequest:
properties:
sender_agent_id:
type: integer
type: object
adminkindboxreqparam.AssignSenderResponse:
properties:
field_errors:
additionalProperties:
type: string
type: object
type: object
adminkindboxreqparam.Data:
properties:
benefactor_id:
type: integer
count_accepted:
type: integer
count_requested:
type: integer
deliver_address_id:
type: integer
deliver_refer_date:
type: string
deliver_refer_time_id:
type: integer
delivered_at:
type: string
description:
type: string
id:
type: integer
kind_box_type:
$ref: '#/definitions/entity.KindBoxType'
sender_agent_id:
type: integer
status:
$ref: '#/definitions/entity.KindBoxReqStatus'
type: object
adminkindboxreqparam.GetKindBoxReqResponse:
properties:
data:
$ref: '#/definitions/adminkindboxreqparam.Data'
field_errors:
additionalProperties:
type: string
type: object
type: object
2024-05-15 07:38:39 +00:00
adminkindboxreqparam.KindBoxReqAcceptRequest:
properties:
count_accepted:
type: integer
type: object
adminkindboxreqparam.KindBoxReqAcceptResponse:
properties:
data:
$ref: '#/definitions/adminkindboxreqparam.Data'
field_errors:
additionalProperties:
type: string
type: object
2024-05-15 07:38:39 +00:00
type: object
adminkindboxreqparam.KindBoxReqAddRequest:
properties:
benefactor_id:
example: 1
type: integer
count_requested:
example: 2
type: integer
deliver_address_id:
example: 1
type: integer
deliver_refer_date:
example: "2025-01-02T15:04:05Z"
type: string
deliver_refer_time_id:
example: 1
type: integer
kind_box_type:
allOf:
- $ref: '#/definitions/entity.KindBoxType'
example: on-table
type: object
adminkindboxreqparam.KindBoxReqAddResponse:
properties:
data:
$ref: '#/definitions/adminkindboxreqparam.Data'
field_errors:
additionalProperties:
type: string
type: object
type: object
2024-05-15 07:38:39 +00:00
adminkindboxreqparam.KindBoxReqGetAllResponse:
properties:
data:
2024-05-15 07:38:39 +00:00
items:
$ref: '#/definitions/adminkindboxreqparam.Data'
2024-05-15 07:38:39 +00:00
type: array
field_errors:
additionalProperties:
type: string
type: object
2024-05-15 07:38:39 +00:00
pagination:
$ref: '#/definitions/param.PaginationResponse'
type: object
adminkindboxreqparam.KindBoxReqRejectRequest:
properties:
description:
example: description
2024-05-15 07:38:39 +00:00
type: string
type: object
adminkindboxreqparam.KindBoxReqRejectResponse:
properties:
data:
$ref: '#/definitions/adminkindboxreqparam.Data'
field_errors:
additionalProperties:
type: string
type: object
2024-05-15 07:38:39 +00:00
type: object
adminkindboxreqparam.KindBoxReqUpdateRequest:
properties:
count_accepted:
example: 3
type: integer
count_requested:
example: 5
type: integer
deliver_address_id:
example: 1
type: integer
deliver_refer_date:
example: "2025-01-02T15:04:05Z"
type: string
deliver_refer_time_id:
example: 1
type: integer
description:
example: description
type: string
kind_box_type:
allOf:
- $ref: '#/definitions/entity.KindBoxType'
example: cylindrical
sender_agent_id:
example: 1
type: integer
type: object
adminserviceparam.Data:
2024-05-21 16:57:21 +00:00
properties:
description:
2024-05-21 22:10:16 +00:00
example: This is a description
2024-05-21 16:57:21 +00:00
type: string
email:
2024-05-21 22:10:16 +00:00
example: example@gmail.com
2024-05-21 16:57:21 +00:00
type: string
first_name:
2024-05-21 22:10:16 +00:00
example: John
2024-05-21 16:57:21 +00:00
type: string
gender:
2024-05-21 22:10:16 +00:00
allOf:
- $ref: '#/definitions/entity.Gender'
example: male
2024-05-21 16:57:21 +00:00
id:
2024-05-21 22:10:16 +00:00
example: 1
2024-05-21 16:57:21 +00:00
type: integer
last_name:
2024-05-21 22:10:16 +00:00
example: Doe
2024-05-21 16:57:21 +00:00
type: string
phone_number:
2024-05-21 22:10:16 +00:00
example: "09123456789"
2024-05-21 16:57:21 +00:00
type: string
role:
2024-05-21 22:10:16 +00:00
allOf:
- $ref: '#/definitions/entity.AdminRole'
example: 2
2024-05-21 16:57:21 +00:00
status:
2024-05-21 22:10:16 +00:00
allOf:
- $ref: '#/definitions/entity.AdminStatus'
example: active
type: object
2024-05-15 07:38:39 +00:00
adminserviceparam.LoginWithPhoneNumberRequest:
properties:
password:
example: password123
2024-05-15 07:38:39 +00:00
type: string
phone_number:
example: "09123456789"
2024-05-15 07:38:39 +00:00
type: string
type: object
adminserviceparam.LoginWithPhoneNumberResponse:
properties:
data:
$ref: '#/definitions/adminserviceparam.Data'
field_errors:
additionalProperties:
type: string
type: object
2024-05-15 07:38:39 +00:00
tokens:
$ref: '#/definitions/adminserviceparam.Tokens'
type: object
adminserviceparam.RefreshAccessRequest:
properties:
refresh_token:
type: string
type: object
adminserviceparam.RefreshAccessResponse:
properties:
access_token:
type: string
type: object
2024-05-15 07:38:39 +00:00
adminserviceparam.RegisterRequest:
properties:
description:
example: this is a description
2024-05-15 07:38:39 +00:00
type: string
email:
example: miaad.66@gmail.com
2024-05-15 07:38:39 +00:00
type: string
first_name:
example: miaad
2024-05-15 07:38:39 +00:00
type: string
gender:
allOf:
- $ref: '#/definitions/entity.Gender'
example: male
2024-05-15 07:38:39 +00:00
last_name:
example: shahi
2024-05-15 07:38:39 +00:00
type: string
password:
example: Abc123456
2024-05-15 07:38:39 +00:00
type: string
phone_number:
example: "09183723447"
2024-05-15 07:38:39 +00:00
type: string
role:
allOf:
- $ref: '#/definitions/entity.AdminRole'
example: 2
2024-05-15 07:38:39 +00:00
status:
allOf:
- $ref: '#/definitions/entity.AdminStatus'
example: active
2024-05-15 07:38:39 +00:00
type: object
adminserviceparam.RegisterResponse:
properties:
data:
$ref: '#/definitions/adminserviceparam.Data'
field_errors:
additionalProperties:
type: string
type: object
2024-05-15 07:38:39 +00:00
type: object
adminserviceparam.Tokens:
properties:
access_token:
type: string
refresh_token:
type: string
type: object
agentkindboxparam.Data:
properties:
amount:
type: integer
benefactor_id:
type: integer
deliver_address_id:
type: integer
deliver_refer_date:
type: string
deliver_refer_time_id:
type: integer
delivered_at:
type: string
id:
type: integer
kind_box_req_id:
type: integer
kind_box_type:
$ref: '#/definitions/entity.KindBoxType'
receiver_agent_id:
type: integer
return_address_id:
type: integer
return_refer_date:
type: string
return_refer_time_id:
type: integer
returned_at:
type: string
sender_agent_id:
type: integer
serial_number:
type: string
status:
$ref: '#/definitions/entity.KindBoxStatus'
type: object
agentkindboxparam.GetAllResponse:
properties:
data:
items:
$ref: '#/definitions/agentkindboxparam.Data'
type: array
field_errors:
additionalProperties:
type: string
type: object
pagination:
$ref: '#/definitions/param.PaginationResponse'
type: object
agentkindboxparam.GetKindBoxResponse:
properties:
data:
$ref: '#/definitions/agentkindboxparam.Data'
field_errors:
additionalProperties:
type: string
type: object
type: object
agentkindboxparam.ReturnKindBoxRequest:
properties:
serial_number:
type: string
type: object
2024-09-15 07:36:09 +00:00
agentkindboxreqparam.Data:
properties:
benefactor_id:
type: integer
count_accepted:
type: integer
count_requested:
type: integer
deliver_address_id:
type: integer
deliver_refer_date:
type: string
deliver_refer_time_id:
type: integer
delivered_at:
type: string
description:
type: string
id:
type: integer
kind_box_type:
$ref: '#/definitions/entity.KindBoxType'
sender_agent_id:
type: integer
status:
$ref: '#/definitions/entity.KindBoxReqStatus'
type: object
agentkindboxreqparam.DeliverKindBoxReqRequest:
properties:
serial_numbers:
example:
- "1"
- "2"
- "3"
items:
type: string
type: array
type: object
agentkindboxreqparam.DeliverKindBoxReqResponse:
properties:
field_errors:
additionalProperties:
type: string
type: object
type: object
agentkindboxreqparam.DeliveryAwaitingGetAllResponse:
properties:
data:
items:
$ref: '#/definitions/agentkindboxreqparam.Data'
type: array
field_errors:
additionalProperties:
type: string
type: object
pagination:
$ref: '#/definitions/param.PaginationResponse'
type: object
agentkindboxreqparam.DeliveryAwaitingGetResponse:
properties:
data:
$ref: '#/definitions/agentkindboxreqparam.Data'
field_errors:
additionalProperties:
type: string
type: object
type: object
benefactoreparam.Data:
2024-05-14 13:07:09 +00:00
properties:
first_name:
example: mehdi
type: string
id:
example: 1
type: integer
last_name:
example: rez
type: string
role:
allOf:
- $ref: '#/definitions/entity.UserRole'
2024-05-14 13:07:09 +00:00
example: benefactor
type: object
benefactoreparam.LoginOrRegisterRequest:
properties:
phone_number:
example: "09198829528"
type: string
verification_code:
example: "12345"
2024-05-14 13:07:09 +00:00
type: string
type: object
benefactoreparam.LoginOrRegisterResponse:
properties:
data:
$ref: '#/definitions/benefactoreparam.Data'
field_errors:
additionalProperties:
type: string
type: object
2024-05-14 13:07:09 +00:00
tokens:
$ref: '#/definitions/benefactoreparam.Tokens'
type: object
benefactoreparam.RefreshAccessRequest:
properties:
refresh_token:
type: string
type: object
benefactoreparam.RefreshAccessResponse:
properties:
access_token:
type: string
type: object
2024-05-14 13:07:09 +00:00
benefactoreparam.SendOtpRequest:
properties:
phone_number:
example: "09198829528"
type: string
type: object
benefactoreparam.SendOtpResponse:
properties:
code:
description: "this just use in test .env\n\t\tTODO - remove it after test"
type: string
field_errors:
additionalProperties:
type: string
type: object
2024-05-14 13:07:09 +00:00
phone_number:
example: "09198829528"
type: string
type: object
benefactoreparam.Tokens:
properties:
access_token:
type: string
refresh_token:
type: string
type: object
benefactorkindboxparam.Data:
2024-05-15 07:38:39 +00:00
properties:
amount:
type: integer
benefactor_id:
2024-05-15 07:38:39 +00:00
type: integer
deliver_address_id:
2024-05-15 07:38:39 +00:00
type: integer
deliver_refer_date:
2024-05-15 07:38:39 +00:00
type: string
deliver_refer_time_id:
type: integer
delivered_at:
2024-05-15 07:38:39 +00:00
type: string
id:
type: integer
kind_box_req_id:
2024-05-15 07:38:39 +00:00
type: integer
kind_box_type:
$ref: '#/definitions/entity.KindBoxType'
receiver_agent_id:
2024-05-15 07:38:39 +00:00
type: integer
return_address_id:
2024-05-15 07:38:39 +00:00
type: integer
return_refer_date:
2024-05-15 07:38:39 +00:00
type: string
return_refer_time_id:
type: integer
returned_at:
2024-05-15 07:38:39 +00:00
type: string
sender_agent_id:
2024-05-15 07:38:39 +00:00
type: integer
serial_number:
2024-05-15 07:38:39 +00:00
type: string
status:
$ref: '#/definitions/entity.KindBoxStatus'
type: object
benefactorkindboxparam.KindBoxGetAllResponse:
properties:
data:
items:
$ref: '#/definitions/benefactorkindboxparam.Data'
type: array
field_errors:
additionalProperties:
type: string
type: object
pagination:
$ref: '#/definitions/param.PaginationResponse'
type: object
benefactorkindboxparam.KindBoxGetResponse:
properties:
data:
$ref: '#/definitions/benefactorkindboxparam.Data'
field_errors:
additionalProperties:
type: string
type: object
type: object
benefactorkindboxparam.KindBoxRegisterEmptyingRequest:
properties:
return_address_id:
example: 1
type: integer
return_refer_date:
example: "2025-01-02T15:04:05Z"
type: string
return_refer_time_id:
example: 1
type: integer
type: object
benefactorkindboxreqparam.Data:
properties:
benefactor_id:
type: integer
count_accepted:
type: integer
count_requested:
type: integer
deliver_address_id:
type: integer
deliver_refer_date:
type: string
deliver_refer_time_id:
type: integer
delivered_at:
type: string
description:
type: string
id:
type: integer
kind_box_type:
$ref: '#/definitions/entity.KindBoxType'
sender_agent_id:
type: integer
status:
$ref: '#/definitions/entity.KindBoxReqStatus'
type: object
benefactorkindboxreqparam.GetAllResponse:
properties:
data:
items:
$ref: '#/definitions/benefactorkindboxreqparam.Data'
type: array
field_errors:
additionalProperties:
type: string
type: object
pagination:
$ref: '#/definitions/param.PaginationResponse'
2024-05-15 07:38:39 +00:00
type: object
benefactorkindboxreqparam.KindBoxReqAddRequest:
properties:
count_requested:
example: 2
2024-05-15 07:38:39 +00:00
type: integer
deliver_address_id:
example: 1
2024-05-15 07:38:39 +00:00
type: integer
deliver_refer_date:
example: "2025-01-02T15:04:05Z"
2024-05-15 07:38:39 +00:00
type: string
deliver_refer_time_id:
example: 1
type: integer
kind_box_type:
allOf:
- $ref: '#/definitions/entity.KindBoxType'
example: on-table
2024-05-15 07:38:39 +00:00
type: object
benefactorkindboxreqparam.KindBoxReqAddResponse:
properties:
data:
$ref: '#/definitions/benefactorkindboxreqparam.Data'
field_errors:
additionalProperties:
type: string
type: object
2024-05-15 07:38:39 +00:00
type: object
benefactorkindboxreqparam.KindBoxReqDeleteResponse:
properties:
field_errors:
additionalProperties:
type: string
type: object
type: object
2024-05-15 07:38:39 +00:00
benefactorkindboxreqparam.KindBoxReqGetResponse:
properties:
data:
$ref: '#/definitions/benefactorkindboxreqparam.Data'
field_errors:
additionalProperties:
type: string
type: object
2024-05-15 07:38:39 +00:00
type: object
benefactorkindboxreqparam.KindBoxReqUpdateRequest:
properties:
count_requested:
example: 5
type: integer
deliver_address_id:
example: 1
type: integer
deliver_refer_date:
example: "2025-01-02T15:04:05Z"
type: string
deliver_refer_time_id:
example: 1
type: integer
description:
example: description
type: string
kind_box_type:
allOf:
- $ref: '#/definitions/entity.KindBoxType'
example: cylindrical
type: object
2024-05-15 07:38:39 +00:00
entity.AdminRole:
enum:
- 1
- 2
- 3
type: integer
x-enum-varnames:
- AdminSuperAdminRole
- AdminAdminRole
- AdminAgentRole
entity.AdminStatus:
enum:
- active
- inactive
type: string
2024-05-15 07:38:39 +00:00
x-enum-varnames:
- AdminActiveStatus
- AdminInactiveStatus
2024-05-14 13:07:09 +00:00
entity.City:
properties:
id:
type: integer
name:
type: string
provinceID:
type: integer
type: object
2024-05-15 07:38:39 +00:00
entity.Gender:
enum:
- male
- female
type: string
2024-05-15 07:38:39 +00:00
x-enum-varnames:
- MaleGender
- FemaleGender
entity.KindBoxReqStatus:
enum:
- pending
- accepted
- assigned-sender-agent
- rejected
- delivered
type: string
2024-05-15 07:38:39 +00:00
x-enum-varnames:
- KindBoxReqPendingStatus
- KindBoxReqAcceptedStatus
- KindBoxReqAssignedSenderAgentStatus
- KindBoxReqRejectedStatus
- KindBoxReqDeliveredStatus
entity.KindBoxStatus:
enum:
- delivered
- ready-to-return
- assigned-receiver-agent
- returned
- enumerated
type: string
2024-05-15 07:38:39 +00:00
x-enum-varnames:
- KindBoxDeliveredStatus
- KindBoxReadyToReturnStatus
- KindBoxAssignedReceiverAgentStatus
- KindBoxReturnedStatus
- KindBoxEnumeratedStatus
entity.KindBoxType:
enum:
- on-table
- cylindrical
- stand-up
type: string
2024-05-15 07:38:39 +00:00
x-enum-varnames:
- KindBoxOnTable
- KindBoxCylindrical
- KindBoxStandUp
2024-05-14 13:07:09 +00:00
entity.Province:
properties:
id:
type: integer
name:
type: string
type: object
entity.UserRole:
enum:
- benefactor
type: string
x-enum-varnames:
- UserBenefactorRole
httpmsg.ErrorResponse:
properties:
errors:
additionalProperties:
type: string
type: object
message:
type: string
type: object
2024-05-15 07:38:39 +00:00
param.PaginationResponse:
properties:
2024-05-21 22:10:16 +00:00
page_number:
example: 1
2024-05-15 07:38:39 +00:00
type: integer
2024-05-21 22:10:16 +00:00
page_size:
example: 10
2024-05-15 07:38:39 +00:00
type: integer
total:
2024-05-21 22:10:16 +00:00
example: 100
2024-05-15 07:38:39 +00:00
type: integer
type: object
2024-05-14 13:07:09 +00:00
info:
contact: {}
paths:
/admins/agents:
2024-06-01 00:29:11 +00:00
get:
consumes:
- application/json
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminagentparam.GetAllAgentResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Get all agents by admin
2024-05-14 13:07:09 +00:00
tags:
- Admins
/admins/kindboxes:
2024-07-09 17:17:04 +00:00
get:
consumes:
- application/json
description: Retrieves a list of all KindBoxes with filtering, sorting, and
pagination options
parameters:
- description: Filter by ID
in: query
name: filter_id
type: integer
- description: Filter by KindBox request ID
in: query
name: filter_kind_box_req_id
type: integer
- description: Filter by benefactor ID
in: query
name: filter_benefactor_id
type: integer
- description: Filter by KindBox type
enum:
- on-table
- cylindrical
- stand-up
in: query
name: filter_kind_box_type
type: string
- description: Filter by amount
in: query
name: filter_amount
type: integer
- description: Filter by serial number
in: query
name: filter_serial_number
type: string
- description: Filter by status
enum:
- delivered
- ready-to-return
- assigned-receiver-agent
- returned
- enumerated
in: query
name: filter_status
type: string
- description: Filter by delivered at
format: date-time
in: query
name: filter_delivered_at
type: string
- description: Filter by return refer time ID
in: query
name: filter_return_refer_time_id
type: integer
- description: Filter by return refer date
format: date
in: query
name: filter_return_refer_date
type: string
- description: Filter by return address ID
in: query
name: filter_return_address_id
type: integer
- description: Filter by receiver agent ID
in: query
name: filter_receiver_agent_id
type: integer
- description: Filter by returned at
format: date-time
in: query
name: filter_returned_at
type: string
- description: Filter by sender agent ID
in: query
name: filter_sender_agent_id
type: integer
- description: Filter by deliver refer date
format: date
in: query
name: filter_deliver_refer_date
type: string
- description: Filter by deliver address ID
in: query
name: filter_deliver_address_id
type: integer
- description: Filter by deliver refer time ID
in: query
name: filter_deliver_refer_time_id
type: integer
2024-07-09 17:17:04 +00:00
- description: Page number
in: query
name: page_number
type: integer
- description: Page size
in: query
name: page_size
type: integer
- description: Sort by field
enum:
- id
- kind_box_req_id
- benefactor_id
- kind_box_type
- amount
- serial_number
- status
- delivered_at
- return_refer_time_id
- return_refer_date
- return_address_id
- receiver_agent_id
- returned_at
- sender_agent_id
- deliver_refer_date
- deliver_address_id
- deliver_refer_time_id
2024-07-09 17:17:04 +00:00
in: query
name: sort_field
type: string
- description: Sort order
enum:
- asc
- desc
in: query
name: sort_direction
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminkindboxparam.KindBoxGetAllResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Get all KindBoxes by admin
tags:
- Admins KindBoxes
/admins/kindboxes/{id}:
get:
consumes:
- application/json
description: This endpoint retrieves a specific kind box by admin
parameters:
- description: Kind box ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminkindboxparam.KindBoxGetResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Get a specific kind box by admin
tags:
- Admins KindBoxes
/admins/kindboxes/{id}/assign-receiver-agent:
patch:
consumes:
- application/json
parameters:
- description: KindBox ID
in: path
name: id
required: true
type: integer
- description: Assign Receiver Agent Request Body
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminkindboxparam.AssignReceiverRequest'
produces:
- application/json
responses:
"204":
description: No Content
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Admin assign receiver agent to kindbox
tags:
- Admins KindBoxes
/admins/kindboxes/{id}/enumerate:
patch:
2024-07-01 17:13:28 +00:00
consumes:
- application/json
parameters:
- description: KindBox ID
2024-07-01 17:13:28 +00:00
in: path
name: id
required: true
type: integer
- description: Request
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminkindboxparam.EnumerateKindBoxRequest'
2024-07-01 17:13:28 +00:00
produces:
- application/json
responses:
"204":
description: No Content
2024-07-01 17:13:28 +00:00
"400":
description: Bad Request
2024-07-01 17:13:28 +00:00
schema:
type: string
"401":
description: invalid or expired jwt
schema:
type: string
"403":
description: user not allowed
schema:
type: string
"422":
description: Unprocessable Entity
schema:
$ref: '#/definitions/httpmsg.ErrorResponse'
"500":
description: something went wrong
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Admin enumerate kindbox
tags:
- Admins KindBoxes
/admins/kindboxes/update/{id}:
put:
consumes:
- application/json
parameters:
- description: Kind Box ID
in: path
name: id
required: true
type: integer
- description: Update KindBox Request Body
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminkindboxparam.KindBoxUpdateRequest'
produces:
- application/json
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
type: string
"401":
description: invalid or expired jwt
schema:
type: string
"403":
description: user not allowed
schema:
type: string
"422":
description: Unprocessable Entity
schema:
$ref: '#/definitions/httpmsg.ErrorResponse'
"500":
description: something went wrong
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Update kind Box by admin
tags:
- Admins KindBoxes
/admins/kindboxreqs:
get:
2024-05-15 07:38:39 +00:00
consumes:
- application/json
description: Retrieves a list of all KindBox requests with filtering, sorting,
and pagination options
2024-05-15 07:38:39 +00:00
parameters:
- description: Filter by ID
in: query
name: filter_id
type: integer
- description: Filter by benefactor ID
in: query
name: filter_benefactor_id
type: integer
- description: Filter by sender agent ID
in: query
name: filter_sender_agent_id
type: integer
- description: Filter by KindBox type
enum:
- on-table
- cylindrical
- stand-up
format: enum
in: query
name: filter_kind_box_type
type: string
- description: Filter by KindBoxReq status
enum:
- pending
- accepted
- assigned-sender-agent
- rejected
- delivered
format: enum
in: query
name: filter_status
type: string
- description: Filter by count requested
in: query
name: filter_count_requested
type: integer
- description: Filter by count accepted
in: query
name: filter_count_accepted
type: integer
- description: Filter by deliver refer time ID
in: query
name: filter_deliver_refer_time_id
type: integer
- description: Filter by deliver refer date
format: date
in: query
name: filter_deliver_refer_date
type: string
- description: Filter by deliver address ID
in: query
name: filter_deliver_address_id
type: integer
- description: Filter by delivered at
format: date
in: query
name: filter_delivered_at
type: string
- description: Page number
in: query
name: page_number
type: integer
- description: Page size
in: query
name: page_size
type: integer
- description: Sort by field
enum:
- id
- benefactor_id
- sender_agent_id
- kind_box_type
- status
- count_requested
- count_accepted
- deliver_refer_time_id
- deliver_refer_date
- deliver_address_id
- delivered_at
in: query
name: sort_field
type: string
- description: Sort order
enum:
- asc
- desc
in: query
name: sort_direction
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminkindboxreqparam.KindBoxReqGetAllResponse'
"400":
description: Bad Request
schema:
type: string
"401":
description: invalid or expired jwt
schema:
type: string
"403":
description: user not allowed
schema:
type: string
"422":
description: Unprocessable Entity
schema:
$ref: '#/definitions/httpmsg.ErrorResponse'
"500":
description: something went wrong
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Admin get all kindboxreq
tags:
- Admins KindBoxReqs
post:
consumes:
- application/json
parameters:
- description: New kind box request details
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminkindboxreqparam.KindBoxReqAddRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminkindboxreqparam.KindBoxReqAddResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Add a new kind box request for a benefactor by admin
tags:
- Admins KindBoxReqs
/admins/kindboxreqs/{id}:
get:
consumes:
- application/json
parameters:
- description: KindBoxReq ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminkindboxreqparam.GetKindBoxReqResponse'
"400":
description: Bad Request
schema:
type: string
"401":
description: invalid or expired jwt
schema:
type: string
"403":
description: user not allowed
schema:
type: string
"422":
description: Unprocessable Entity
schema:
$ref: '#/definitions/httpmsg.ErrorResponse'
"500":
description: something went wrong
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Get a specific kind box req by ID
tags:
- Admins KindBoxReqs
put:
consumes:
- application/json
parameters:
- description: KindBoxReq ID
in: path
name: id
required: true
type: integer
- description: Update KindBoxReq Request Body
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminkindboxreqparam.KindBoxReqUpdateRequest'
produces:
- application/json
responses:
"204":
description: No Content
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Update kind box request by admin
tags:
- Admins KindBoxReqs
/admins/kindboxreqs/{id}/accept-kind-box-req:
2024-05-15 07:38:39 +00:00
patch:
consumes:
- application/json
parameters:
- description: KindBoxReq ID
2024-05-15 07:38:39 +00:00
in: path
name: id
required: true
type: integer
- description: Accept KindBoxReq Request Body
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminkindboxreqparam.KindBoxReqAcceptRequest'
2024-05-15 07:38:39 +00:00
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminkindboxreqparam.KindBoxReqAcceptResponse'
2024-05-15 07:38:39 +00:00
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Accept kind box request by admin
2024-05-15 07:38:39 +00:00
tags:
- Admins KindBoxReqs
/admins/kindboxreqs/{id}/assign-sender-agent:
2024-05-15 07:38:39 +00:00
patch:
consumes:
- application/json
parameters:
- description: KindBoxReq ID
2024-05-15 07:38:39 +00:00
in: path
name: id
required: true
type: integer
- description: Assign Sender Agent Request Body
2024-05-15 07:38:39 +00:00
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminkindboxreqparam.AssignSenderRequest'
2024-05-15 07:38:39 +00:00
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminkindboxreqparam.AssignSenderResponse'
2024-05-15 07:38:39 +00:00
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Admin Assign Sender Agent to kindboxreq
2024-05-15 07:38:39 +00:00
tags:
- Admins KindBoxReqs
/admins/kindboxreqs/{id}/reject-kind-box-req:
patch:
consumes:
- application/json
parameters:
- description: KindBoxReq id
in: path
name: id
required: true
type: integer
- description: KindBoxReq Reject Request Body
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminkindboxreqparam.KindBoxReqRejectRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminkindboxreqparam.KindBoxReqRejectResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Reject a kindboxreq by admin
tags:
- Admins KindBoxReqs
2024-05-15 07:38:39 +00:00
/admins/login-by-phone:
post:
consumes:
- application/json
parameters:
- description: Admin login request body
2024-05-15 07:38:39 +00:00
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminserviceparam.LoginWithPhoneNumberRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminserviceparam.LoginWithPhoneNumberResponse'
"400":
description: Bad request
schema:
type: string
summary: "Admin login by\tPhoneNumber"
2024-05-15 07:38:39 +00:00
tags:
- Admins
/admins/refresh-access:
post:
consumes:
- application/json
parameters:
- description: Refresh access request body
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminserviceparam.RefreshAccessRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminserviceparam.RefreshAccessResponse'
"400":
description: Bad Request
schema:
type: string
"422":
description: invalid or expired jwt
schema:
type: string
"500":
description: something went wrong
schema:
type: string
summary: Get a new access token by providing a refresh token
tags:
- Admins
2024-05-15 07:38:39 +00:00
/admins/register:
post:
consumes:
- application/json
parameters:
- description: Admin Register Request Body
2024-05-15 07:38:39 +00:00
in: body
name: Request
required: true
schema:
$ref: '#/definitions/adminserviceparam.RegisterRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/adminserviceparam.RegisterResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Register an admin by super-admin
2024-05-15 07:38:39 +00:00
tags:
- Admins
/agents/kindboxes:
get:
consumes:
- application/json
description: Retrieves a list of all awaiting return KindBoxes for agent with
filtering, sorting, and pagination options
parameters:
- description: Filter by ID
in: query
name: filter_id
type: integer
- description: Filter by benefactor ID
in: query
name: filter_benefactor_id
type: integer
- description: Filter by KindBox type
enum:
- on-table
- cylindrical
- stand-up
format: enum
in: query
name: filter_type
type: string
- description: Filter by serial number
in: query
name: filter_serial_number
type: string
- description: Filter by return refer time ID
in: query
name: filter_return_refer_time_id
type: integer
- description: Filter by return refer date
format: date
in: query
name: filter_return_refer_date
type: string
- description: Filter by return address ID
in: query
name: filter_return_address_id
type: integer
- description: Page number
in: query
name: page_number
type: integer
- description: Page size
in: query
name: page_size
type: integer
- description: Sort by field
enum:
- id
- benefactor_id
- type
- serial_number
- return_refer_time_id
- return_refer_date
- return_address_id
in: query
name: sort_field
type: string
- description: Sort order
enum:
- asc
- desc
in: query
name: sort_direction
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/agentkindboxparam.GetAllResponse'
"400":
description: Bad Request
schema:
type: string
"401":
description: invalid or expired jwt
schema:
type: string
"403":
description: user not allowed
schema:
type: string
"422":
description: Unprocessable Entity
schema:
$ref: '#/definitions/httpmsg.ErrorResponse'
"500":
description: something went wrong
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Get all awaiting return KindBoxes by agent
tags:
- Agents KindBoxes
/agents/kindboxes/{id}:
get:
consumes:
- application/json
parameters:
- description: KindBox ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/agentkindboxparam.GetKindBoxResponse'
"400":
description: Bad Request
schema:
type: string
"401":
description: invalid or expired jwt
schema:
type: string
"403":
description: user not allowed
schema:
type: string
"422":
description: Unprocessable Entity
schema:
$ref: '#/definitions/httpmsg.ErrorResponse'
"500":
description: something went wrong
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Get a kind box that is awaiting return by agent
tags:
- Agents KindBoxes
/agents/kindboxes/{id}/return:
patch:
consumes:
- application/json
parameters:
- description: KindBox ID
in: path
name: id
required: true
type: integer
- description: Return KindBox Request Body
in: body
name: Request
required: true
schema:
$ref: '#/definitions/agentkindboxparam.ReturnKindBoxRequest'
produces:
- application/json
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
type: string
"401":
description: invalid or expired jwt
schema:
type: string
"403":
description: user not allowed
schema:
type: string
"422":
description: Unprocessable Entity
schema:
$ref: '#/definitions/httpmsg.ErrorResponse'
"500":
description: something went wrong
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Return KindBox from benefactor by agent
tags:
- Agents KindBoxes
2024-09-15 07:36:09 +00:00
/agents/kindboxreqs/{id}/deliver-kind-box-req:
patch:
consumes:
- application/json
parameters:
- description: KindBoxReq ID
in: path
name: id
required: true
type: integer
- description: KindBoxReq deliver request details
in: body
name: Request
required: true
schema:
$ref: '#/definitions/agentkindboxreqparam.DeliverKindBoxReqRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/agentkindboxreqparam.DeliverKindBoxReqResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Agent deliver a kindboxreq
tags:
- Agents KindBoxReqs
/agents/kindboxreqs/awaiting-delivery:
get:
consumes:
- application/json
description: Retrieves a list of all awaiting KindBox requests with filtering,
sorting, and pagination options
parameters:
- description: Filter by ID
in: query
name: filter_id
type: integer
- description: Filter by benefactor ID
in: query
name: filter_benefactor_id
type: integer
- description: Filter by KindBox type
enum:
- on-table
- cylindrical
- stand-up
format: enum
in: query
name: filter_kind_box_type
type: string
- description: Filter by count requested
in: query
name: filter_count_requested
type: integer
- description: Filter by count accepted
in: query
name: filter_count_accepted
type: integer
- description: Filter by deliver refer time ID
in: query
name: filter_deliver_refer_time_id
type: integer
- description: Filter by deliver refer date
format: date
in: query
name: filter_deliver_refer_date
type: string
- description: Filter by deliver address ID
in: query
name: filter_deliver_address_id
type: integer
- description: Page number
in: query
name: page_number
type: integer
- description: Page size
in: query
name: page_size
type: integer
- description: Sort by field
enum:
- id
- benefactor_id
- kind_box_type
- count_requested
- count_accepted
- deliver_refer_time_id
- deliver_refer_date
- deliver_address_id
in: query
name: sort_field
type: string
- description: Sort order
enum:
- asc
- desc
in: query
name: sort_direction
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/agentkindboxreqparam.DeliveryAwaitingGetAllResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Get all awaiting delivery KindBox requests
tags:
- Agents KindBoxReqs
/agents/kindboxreqs/awaiting-delivery/{id}:
get:
consumes:
- application/json
parameters:
- description: KindBoxReq ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/agentkindboxreqparam.DeliveryAwaitingGetResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerAdmin: []
summary: Get a kind box reqs that is awaiting delivery by agent
tags:
- Agents KindBoxReqs
/benefactors/addresses:
get:
consumes:
- application/json
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/addressparam.GetAllAddressesResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Get all benefactor addresses
tags:
- Benefactors Addresses
post:
consumes:
- application/json
description: This endpoint allows an authenticated benefactor to add a new address
to their account.
parameters:
- description: New address details
in: body
name: Request
required: true
schema:
$ref: '#/definitions/addressparam.BenefactorAddAddressRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/addressparam.BenefactorAddAddressResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Add a new address for a benefactor
tags:
- Benefactors Addresses
/benefactors/addresses/{id}:
delete:
description: This endpoint is used to delete an address by benefactor
parameters:
- description: Address ID
in: path
name: id
required: true
type: integer
responses:
"204":
description: No Content
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Delete address by benefactor
tags:
- Benefactors Addresses
get:
consumes:
- application/json
parameters:
- description: Address ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/addressparam.GetAddressResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Get a benefactor address
tags:
- Benefactors Addresses
put:
consumes:
- application/json
parameters:
- description: Address ID
in: path
name: id
required: true
type: integer
- description: Edit address details
in: body
name: Request
required: true
schema:
$ref: '#/definitions/addressparam.UpdateAddressRequest'
produces:
- application/json
responses:
"204":
description: No Content
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Update benefactor address
tags:
- Benefactors Addresses
/benefactors/addresses/cities:
get:
consumes:
- application/json
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/addressparam.GetAllCitiesResponse'
"400":
description: Bad request
schema:
type: string
summary: Get all cities
tags:
- Benefactors Addresses
/benefactors/addresses/provinces:
get:
consumes:
- application/json
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/addressparam.GetAllProvincesResponse'
"400":
description: Bad request
schema:
type: string
summary: Get all provinces
tags:
- Benefactors Addresses
/benefactors/kindboxes:
2024-05-15 07:38:39 +00:00
get:
consumes:
- application/json
description: Retrieves a list of all KindBoxes with filtering, sorting, and
pagination options
parameters:
- description: Filter by ID
in: query
name: filter_id
type: integer
- description: Filter by KindBox request ID
in: query
name: filter_kind_box_req_id
type: integer
- description: Filter by benefactor ID
in: query
name: filter_benefactor_id
type: integer
- description: Filter by KindBox type
enum:
- on-table
- cylindrical
- stand-up
in: query
name: filter_kind_box_type
type: string
- description: Filter by amount
in: query
name: filter_amount
type: integer
- description: Filter by serial number
in: query
name: filter_serial_number
type: string
- description: Filter by status
enum:
- delivered
- ready-to-return
- assigned-receiver-agent
- returned
- enumerated
in: query
name: filter_status
type: string
- description: Filter by delivered at
format: date-time
in: query
name: filter_delivered_at
type: string
- description: Filter by return refer time ID
in: query
name: filter_return_refer_time_id
type: integer
- description: Filter by return refer date
format: date
in: query
name: filter_return_refer_date
type: string
- description: Filter by return address ID
in: query
name: filter_return_address_id
type: integer
- description: Filter by receiver agent ID
in: query
name: filter_receiver_agent_id
type: integer
- description: Filter by returned at
format: date-time
in: query
name: filter_returned_at
type: string
- description: Filter by sender agent ID
in: query
name: filter_sender_agent_id
type: integer
- description: Filter by deliver refer date
format: date
in: query
name: filter_deliver_refer_date
type: string
- description: Filter by deliver address ID
in: query
name: filter_deliver_address_id
type: integer
- description: Filter by deliver refer time ID
in: query
name: filter_deliver_refer_time_id
type: integer
- description: Page number
in: query
name: page_number
type: integer
- description: Page size
in: query
name: page_size
type: integer
- description: Sort by field
enum:
- id
- kind_box_req_id
- benefactor_id
- kind_box_type
- amount
- serial_number
- status
- delivered_at
- return_refer_time_id
- return_refer_date
- return_address_id
- receiver_agent_id
- returned_at
- sender_agent_id
- deliver_refer_date
- deliver_address_id
- deliver_refer_time_id
in: query
name: sort_field
type: string
- description: Sort order
enum:
- asc
- desc
in: query
name: sort_direction
type: string
2024-05-15 07:38:39 +00:00
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/benefactorkindboxparam.KindBoxGetAllResponse'
2024-05-15 07:38:39 +00:00
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Get all KindBoxes by benefactor
2024-05-15 07:38:39 +00:00
tags:
- Benefactors KindBoxes
/benefactors/kindboxes/{id}:
2024-05-15 07:38:39 +00:00
get:
consumes:
- application/json
description: This endpoint retrieves a specific kind box associated with an
authenticated benefactor.
2024-05-15 07:38:39 +00:00
parameters:
- description: Kind box ID
2024-05-15 07:38:39 +00:00
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/benefactorkindboxparam.KindBoxGetResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Get a specific kind box for a benefactor
2024-05-15 07:38:39 +00:00
tags:
- Benefactors KindBoxes
/benefactors/kindboxes/{id}/emptying-requests:
patch:
consumes:
- application/json
parameters:
- description: KindBox ID
in: path
name: id
required: true
type: integer
- description: Request body
in: body
name: Request
required: true
schema:
$ref: '#/definitions/benefactorkindboxparam.KindBoxRegisterEmptyingRequest'
produces:
- application/json
responses:
"204":
description: No content
schema:
type: string
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Register a new emptying request for a kind box by benefactor
tags:
- Benefactors KindBoxes
/benefactors/kindboxreqs:
get:
consumes:
- application/json
description: Retrieves a list of all KindBox requests with filtering, sorting,
and pagination options
parameters:
- description: Filter by ID
in: query
name: filter_id
type: integer
- description: Filter by benefactor ID
in: query
name: filter_benefactor_id
type: integer
- description: Filter by KindBox type
enum:
- on-table
- cylindrical
- stand-up
format: enum
in: query
name: filter_kind_box_type
type: string
- description: Filter by KindBoxReq Status
enum:
- pending
- accepted
- assigned-sender-agent
- rejected
- delivered
in: query
name: filter_status
type: string
- description: Filter by count requested
in: query
name: filter_count_requested
type: integer
- description: Filter by count accepted
in: query
name: filter_count_accepted
type: integer
- description: Filter by deliver refer time ID
in: query
name: filter_deliver_refer_time_id
type: integer
- description: Filter by deliver refer date
format: date
in: query
name: filter_deliver_refer_date
type: string
- description: Filter by deliver address ID
in: query
name: filter_deliver_address_id
type: integer
- description: Page number
in: query
name: page_number
type: integer
- description: Page size
in: query
name: page_size
type: integer
- description: Sort by field
enum:
- id
- benefactor_id
- kind_box_type
- count_requested
- count_accepted
- deliver_refer_time_id
- deliver_refer_date
- deliver_address_id
in: query
name: sort_field
type: string
- description: Sort order
enum:
- asc
- desc
in: query
name: sort_direction
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/benefactorkindboxreqparam.GetAllResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Get all KindBox requests
tags:
- Benefactors KindBoxReqs
2024-05-15 07:38:39 +00:00
post:
consumes:
- application/json
parameters:
- description: New kind box request details
2024-05-15 07:38:39 +00:00
in: body
name: Request
required: true
schema:
$ref: '#/definitions/benefactorkindboxreqparam.KindBoxReqAddRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/benefactorkindboxreqparam.KindBoxReqAddResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Add a new kind box request for a benefactor
2024-05-15 07:38:39 +00:00
tags:
- Benefactors KindBoxReqs
/benefactors/kindboxreqs/{id}:
delete:
consumes:
- application/json
description: This endpoint is used to delete benefactor's kindboxreq at pending
status
parameters:
- description: Kind box request ID
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/benefactorkindboxreqparam.KindBoxReqDeleteResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Delete kindboxreq by benefactor
tags:
- Benefactors KindBoxReqs
2024-05-15 07:38:39 +00:00
get:
consumes:
- application/json
parameters:
- description: Kind box request ID
2024-05-15 07:38:39 +00:00
in: path
name: id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/benefactorkindboxreqparam.KindBoxReqGetResponse'
"400":
description: Bad request
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Get a kind box request for a benefactor
2024-05-15 07:38:39 +00:00
tags:
- Benefactors KindBoxReqs
put:
consumes:
- application/json
parameters:
- description: KindBoxReq ID
in: path
name: id
required: true
type: integer
- description: Update KindBoxReq Request Body
in: body
name: Request
required: true
schema:
$ref: '#/definitions/benefactorkindboxreqparam.KindBoxReqUpdateRequest'
produces:
- application/json
responses:
"204":
description: No Content
"400":
description: Bad Request
schema:
type: string
"401":
description: invalid or expired jwt
schema:
type: string
"403":
description: user not allowed
schema:
type: string
"422":
description: Unprocessable Entity
schema:
$ref: '#/definitions/httpmsg.ErrorResponse'
"500":
description: something went wrong
schema:
type: string
security:
- AuthBearerBenefactor: []
summary: Update kind box request by benefactor
tags:
- Benefactors KindBoxReqs
/benefactors/login-register:
2024-05-14 13:07:09 +00:00
post:
consumes:
- application/json
description: This endpoint is used to authenticate an existing benefactor account
or register a new one.
2024-05-14 13:07:09 +00:00
parameters:
- description: Login or register request details
2024-05-14 13:07:09 +00:00
in: body
name: Request
required: true
schema:
$ref: '#/definitions/benefactoreparam.LoginOrRegisterRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/benefactoreparam.LoginOrRegisterResponse'
"400":
description: Bad request
schema:
type: string
summary: Login or register a benefactor
2024-05-14 13:07:09 +00:00
tags:
- Benefactors
/benefactors/refresh-access:
post:
consumes:
- application/json
parameters:
- description: Refresh access token request body
in: body
name: Request
required: true
schema:
$ref: '#/definitions/benefactoreparam.RefreshAccessRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/benefactoreparam.RefreshAccessResponse'
"400":
description: Bad Request
schema:
type: string
"500":
description: something went wrong
schema:
type: string
summary: Get a new access token by providing your refresh token
tags:
- Benefactors
/benefactors/send-otp:
2024-05-14 13:07:09 +00:00
post:
consumes:
- application/json
description: This endpoint sends an OTP to the benefactor's phone number for
verification purposes.
2024-05-14 13:07:09 +00:00
parameters:
- description: Send OTP request details
2024-05-14 13:07:09 +00:00
in: body
name: Request
required: true
schema:
$ref: '#/definitions/benefactoreparam.SendOtpRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/benefactoreparam.SendOtpResponse'
"400":
description: Bad request
schema:
type: string
summary: Send OTP to benefactor
2024-05-14 13:07:09 +00:00
tags:
- Benefactors
2024-05-14 13:07:09 +00:00
securityDefinitions:
2024-05-15 07:38:39 +00:00
AuthBearerAdmin:
description: Type the word 'Bearer' followed by a space and Admin JWT token.
2024-05-15 07:38:39 +00:00
in: header
name: Authorization
2024-05-15 07:38:39 +00:00
type: apiKey
AuthBearerBenefactor:
description: Type the word 'Bearer' followed by a space and Benefactor JWT token
2024-05-14 13:07:09 +00:00
in: header
name: Authorization
2024-05-14 13:07:09 +00:00
type: apiKey
swagger: "2.0"