Django API: How to get all objects that match certain value - ForeignKey that is UUID

Hi, I got a solution from another site, this was the solution for me:
Thank you very much for your patience and help!!

It looks like the query is not matching the uuid pk field in the get queryset method. Assuming that the company uuid is being passed in the kwargs, the query should match on the pk of the Company model.

CompanyContactsListView was not getting called, because the urls path /contacts/ was matching on the router, not the view class.
Lets also change the param name in the kwargs to be more explict. company_uuid

company/urls.py

router = DefaultRouter()
router.register("companys", CompanyViewSet)
router.register("benefits", BenefitsViewSet)
router.register("contacts", ContactViewSet)
router.register("jobpost", JobpostViewset)


urlpatterns = [
    path('', include(router.urls)),
    path('contact-list/<uuid:company_uuid>/', CompanyContactsListView.as_view(), name='contacts'),
]

contract_viewset.py

class CompanyContactsListView(generics.ListAPIView):
    serializer_class = ContactSerializer

    def get_queryset(self):
        company_uuid = self.kwargs['company_uuid']
        return Contact.objects.filter(company__id=company_uuid)