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 postal_code: example: "1234567890" type: string type: object addressparam.BenefactorAddAddressResponse: properties: data: $ref: '#/definitions/addressparam.Data' field_errors: additionalProperties: type: string type: object type: object addressparam.Data: 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 type: object addressparam.GetAllAddressesResponse: properties: data: items: $ref: '#/definitions/addressparam.Data' type: array type: object addressparam.GetAllCitiesResponse: properties: data: items: $ref: '#/definitions/entity.City' type: array type: object addressparam.GetAllProvincesResponse: properties: data: 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: properties: receiver_agent_id: 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 adminkindboxparam.KindBoxGetAllResponse: properties: data: items: $ref: '#/definitions/adminkindboxparam.Data' type: array field_errors: additionalProperties: type: string type: object 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 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.DeliverKindBoxReqRequest: properties: serial_numbers: example: - "1" - "2" - "3" items: type: string type: array type: object adminkindboxreqparam.DeliverKindBoxReqResponse: properties: field_errors: additionalProperties: type: string type: object type: object adminkindboxreqparam.DeliveryAwaitingGetAllResponse: properties: data: items: $ref: '#/definitions/adminkindboxreqparam.Data' type: array field_errors: additionalProperties: type: string type: object pagination: $ref: '#/definitions/param.PaginationResponse' type: object adminkindboxreqparam.DeliveryAwaitingGetResponse: properties: data: $ref: '#/definitions/adminkindboxreqparam.Data' field_errors: additionalProperties: type: string type: object type: object adminkindboxreqparam.GetKindBoxReqResponse: properties: data: $ref: '#/definitions/adminkindboxreqparam.Data' field_errors: additionalProperties: type: string type: object type: object adminkindboxreqparam.KindBoxReqAcceptRequest: properties: count_accepted: type: integer type: object adminkindboxreqparam.KindBoxReqAcceptResponse: properties: data: $ref: '#/definitions/adminkindboxreqparam.Data' field_errors: additionalProperties: type: string type: object 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-02 15:04:05" type: string 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 adminkindboxreqparam.KindBoxReqGetAllResponse: properties: data: items: $ref: '#/definitions/adminkindboxreqparam.Data' type: array field_errors: additionalProperties: type: string type: object pagination: $ref: '#/definitions/param.PaginationResponse' type: object adminkindboxreqparam.KindBoxReqRejectRequest: properties: description: example: description type: string type: object adminkindboxreqparam.KindBoxReqRejectResponse: properties: data: $ref: '#/definitions/adminkindboxreqparam.Data' field_errors: additionalProperties: type: string type: object 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: properties: description: example: This is a description type: string email: example: example@gmail.com type: string first_name: example: John type: string gender: allOf: - $ref: '#/definitions/entity.Gender' example: male id: example: 1 type: integer last_name: example: Doe type: string phone_number: example: "09123456789" type: string role: allOf: - $ref: '#/definitions/entity.AdminRole' example: 2 status: allOf: - $ref: '#/definitions/entity.AdminStatus' example: active type: object adminserviceparam.LoginWithPhoneNumberRequest: properties: password: example: password123 type: string phone_number: example: "09123456789" type: string type: object adminserviceparam.LoginWithPhoneNumberResponse: properties: data: $ref: '#/definitions/adminserviceparam.Data' field_errors: additionalProperties: type: string type: object tokens: $ref: '#/definitions/adminserviceparam.Tokens' type: object adminserviceparam.RegisterRequest: properties: description: example: this is a description type: string email: example: miaad.66@gmail.com type: string first_name: example: miaad type: string gender: allOf: - $ref: '#/definitions/entity.Gender' example: male last_name: example: shahi type: string password: example: Abc123456 type: string phone_number: example: "09183723447" type: string role: allOf: - $ref: '#/definitions/entity.AdminRole' example: 2 status: allOf: - $ref: '#/definitions/entity.AdminStatus' example: active type: object adminserviceparam.RegisterResponse: properties: data: $ref: '#/definitions/adminserviceparam.Data' field_errors: additionalProperties: type: string type: object 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 benefactoreparam.Data: properties: first_name: example: mehdi type: string id: example: 1 type: integer last_name: example: rez type: string role: allOf: - $ref: '#/definitions/entity.UserRole' example: benefactor type: object benefactoreparam.LoginOrRegisterRequest: properties: phone_number: example: "09198829528" type: string verification_code: example: "12345" type: string type: object benefactoreparam.LoginOrRegisterResponse: properties: data: $ref: '#/definitions/benefactoreparam.Data' field_errors: additionalProperties: type: string type: object tokens: $ref: '#/definitions/benefactoreparam.Tokens' type: object 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 phone_number: example: "09198829528" type: string type: object benefactoreparam.Tokens: properties: access_token: type: string refresh_token: type: string type: object benefactorkindboxparam.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 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' type: object benefactorkindboxreqparam.KindBoxReqAddRequest: properties: 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 benefactorkindboxreqparam.KindBoxReqAddResponse: properties: data: $ref: '#/definitions/benefactorkindboxreqparam.Data' field_errors: additionalProperties: type: string type: object type: object benefactorkindboxreqparam.KindBoxReqDeleteResponse: properties: field_errors: additionalProperties: type: string type: object type: object benefactorkindboxreqparam.KindBoxReqGetResponse: properties: data: $ref: '#/definitions/benefactorkindboxreqparam.Data' field_errors: additionalProperties: type: string type: object 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 entity.AdminRole: enum: - 1 - 2 - 3 type: integer x-enum-varnames: - AdminSuperAdminRole - AdminAdminRole - AdminAgentRole entity.AdminStatus: enum: - active - inactive type: string x-enum-varnames: - AdminActiveStatus - AdminInactiveStatus entity.City: properties: id: type: integer name: type: string provinceID: type: integer type: object entity.Gender: enum: - male - female type: string x-enum-varnames: - MaleGender - FemaleGender entity.KindBoxReqStatus: enum: - pending - accepted - assigned-sender-agent - rejected - delivered type: string x-enum-varnames: - KindBoxReqPendingStatus - KindBoxReqAcceptedStatus - KindBoxReqAssignedSenderAgentStatus - KindBoxReqRejectedStatus - KindBoxReqDeliveredStatus entity.KindBoxStatus: enum: - delivered - ready-to-return - assigned-receiver-agent - returned - enumerated type: string x-enum-varnames: - KindBoxDeliveredStatus - KindBoxReadyToReturnStatus - KindBoxAssignedReceiverAgentStatus - KindBoxReturnedStatus - KindBoxEnumeratedStatus entity.KindBoxType: enum: - on-table - cylindrical - stand-up type: string x-enum-varnames: - KindBoxOnTable - KindBoxCylindrical - KindBoxStandUp 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 param.PaginationResponse: properties: page_number: example: 1 type: integer page_size: example: 10 type: integer total: example: 100 type: integer type: object info: contact: {} paths: /admins/agents: 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 tags: - Admins /admins/kindboxes: 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 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: consumes: - application/json parameters: - description: KindBox ID in: path name: id required: true type: integer - description: Request in: body name: Request required: true schema: $ref: '#/definitions/adminkindboxparam.EnumerateKindBoxRequest' 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: 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: 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 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: patch: consumes: - application/json parameters: - description: KindBoxReq ID in: path name: id required: true type: integer - description: Accept KindBoxReq Request Body in: body name: Request required: true schema: $ref: '#/definitions/adminkindboxreqparam.KindBoxReqAcceptRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/adminkindboxreqparam.KindBoxReqAcceptResponse' "400": description: Bad request schema: type: string security: - AuthBearerAdmin: [] summary: Accept kind box request by admin tags: - Admins KindBoxReqs /admins/kindboxreqs/{id}/assign-sender-agent: patch: consumes: - application/json parameters: - description: KindBoxReq ID in: path name: id required: true type: integer - description: Assign Sender Agent Request Body in: body name: Request required: true schema: $ref: '#/definitions/adminkindboxreqparam.AssignSenderRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/adminkindboxreqparam.AssignSenderResponse' "400": description: Bad request schema: type: string security: - AuthBearerAdmin: [] summary: Admin Assign Sender Agent to kindboxreq tags: - Admins KindBoxReqs /admins/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/adminkindboxreqparam.DeliverKindBoxReqRequest' produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/adminkindboxreqparam.DeliverKindBoxReqResponse' "400": description: Bad request schema: type: string security: - AuthBearerAdmin: [] summary: Admin deliver a kindboxreq 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 /admins/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/adminkindboxreqparam.DeliveryAwaitingGetAllResponse' "400": description: Bad request schema: type: string security: - AuthBearerAdmin: [] summary: Get all awaiting delivery KindBox requests tags: - Admins KindBoxReqs /admins/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/adminkindboxreqparam.DeliveryAwaitingGetResponse' "400": description: Bad request schema: type: string security: - AuthBearerAdmin: [] summary: Get a kind box reqs that is awaiting delivery by agent tags: - Admins KindBoxReqs /admins/login-by-phone: post: consumes: - application/json parameters: - description: Admin login request body 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" tags: - Admins /admins/register: post: consumes: - application/json parameters: - description: Admin Register Request Body 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 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 /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: 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 produces: - application/json responses: "200": description: OK schema: $ref: '#/definitions/benefactorkindboxparam.KindBoxGetAllResponse' "400": description: Bad request schema: type: string security: - AuthBearerBenefactor: [] summary: Get all KindBoxes by benefactor tags: - Benefactors KindBoxes /benefactors/kindboxes/{id}: get: consumes: - application/json description: This endpoint retrieves a specific kind box associated with an authenticated benefactor. parameters: - description: Kind box ID 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 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 post: consumes: - application/json parameters: - description: New kind box request details 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 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 get: consumes: - application/json 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.KindBoxReqGetResponse' "400": description: Bad request schema: type: string security: - AuthBearerBenefactor: [] summary: Get a kind box request for a benefactor 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: post: consumes: - application/json description: This endpoint is used to authenticate an existing benefactor account or register a new one. parameters: - description: Login or register request details 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 tags: - Benefactors /benefactors/send-otp: post: consumes: - application/json description: This endpoint sends an OTP to the benefactor's phone number for verification purposes. parameters: - description: Send OTP request details 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 tags: - Benefactors securityDefinitions: AuthBearerAdmin: description: Type the word 'Bearer' followed by a space and Admin JWT token. in: header name: Authorization type: apiKey AuthBearerBenefactor: description: Type the word 'Bearer' followed by a space and Benefactor JWT token in: header name: Authorization type: apiKey swagger: "2.0"