Skip to content

Download Invoice

Endpoint

GET /api/v1/invoices/DownloadCustomerInvoice/{id}

This endpoint allows the authenticated subscriber to download a specific invoice by its ID.


Authorization

  • Type: Bearer Token
  • Header:
    Authorization: Bearer <your_token_here>
    

Path Parameters

Parameter Type Required Description
id integer Yes Unique ID of the invoice to download.

Example Request

curl -X GET "https://yourispcrmdomain/api/v1/invoices/DownloadCustomerInvoice/123" \
-H "Authorization: Bearer YOURAPITOKENHERE"

Response

Success Response (200 OK)

Content-Type: application/pdf

The response will include a PDF file of the requested invoice.


Example Response

  • Headers:
HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Disposition: attachment; filename="invoice_123.pdf"
  • Body:

The PDF file content for the invoice.


Error Responses

404 Not Found

{
  "success": false,
  "message": "Subscriber not found"
}

Explanation: - This error occurs if the subscriber or the specified invoice cannot be found.


Example Error Response

{
  "success": false,
  "message": "Invoice not found"
}

For further assistance, contact our support team at support@netgroot.com.