django TypeError: get() got multiple values for keyword argument 'invoice_id' : <p>I am relatively new in python and django,</p>

<p>i have following rest api view,</p>

<pre><code>class InvoiceDownloadApiView(RetrieveAPIView):
    """
    This API view will retrieve and send Terms and Condition file for download
    """

    permission_classes = (IsAuthenticated,)

    def get(self, invoice_id, *args, **kwargs):

        if self.request.user.is_authenticated():
            try:
                invoice = InvoiceService(user=self.request.user, organization=self.request.organization).invoice_download(
                invoice_id=invoice_id)
            except ObjectDoesNotExist as e:
                return Response(e.message, status=status.HTTP_404_NOT_FOUND)

            if invoice:
                response = HttpResponse(
                invoice, content_type='application/pdf')
                response['Content-Disposition'] = 'inline; filename={0}'.format(
                invoice.name.split('/')[-1])
                response['X-Sendfile'] = smart_str(invoice)
                return response
            else:
                return Response({"data": "Empty File"}, status=status.HTTP_400_BAD_REQUEST)
</code></pre>

<p>using following urls,</p>

<pre><code>urlpatterns = [
    url(r'^invoice/(?P&lt;invoice_id&gt;[0-9]+)/download/$', views.InvoiceDownloadApiView.as_view()),
</code></pre>

<p>]</p>

<p>root url pattern is as following,</p>

<pre><code>url(r'^api/payments/', include('payments.rest_api.urls', namespace="payments")),   
</code></pre>

<p>when i call the endpoint,</p>

<pre><code>localhost:8000/api/payments/invoice/2/download/
</code></pre>

<p>it arise the following error,</p>

<pre><code>TypeError at /api/payments/invoice/2/download/
get() got multiple values for keyword argument 'invoice_id'
</code></pre>

<p>can't figure it out what actually causing this error</p>
