Skip to content

Get Invoices

Endpoint

GET /api/v1/subscriber/getCustomersInvoices

This endpoint retrieves a list of invoices for the authenticated subscriber.


Authorization

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

Query Parameters

Parameter Type Required Description
id integer No Invoice ID (optional).

Example Request

Get All Invoices

curl -X GET "https://yourispcrmdomain/api/v1/subscriber/getCustomersInvoices" \
-H "Authorization: Bearer YOURAPITOKENHERE"

Get Specific Invoice

curl -X GET "https://yourispcrmdomain/api/v1/subscriber/getCustomersInvoices?id=123" \
-H "Authorization: Bearer YOURAPITOKENHERE"

Response

Success Response (200 OK)

{
  "success": true,
  "data": [
    {
      "invoice_id": 123,
      "amount": 50.00,
      "status": "Paid",
      "date": "2023-12-01T10:00:00Z",
      "due_date": "2023-12-15T10:00:00Z",
      "description": "Monthly Internet Subscription"
    },
    {
      "invoice_id": 124,
      "amount": 30.00,
      "status": "Pending",
      "date": "2023-11-01T10:00:00Z",
      "due_date": "2023-11-15T10:00:00Z",
      "description": "Monthly IPTV Subscription"
    }
  ]
}

Explanation: - success - Indicates if the request was successful. - data - An array of invoices: - invoice_id - Unique ID of the invoice. - amount - Invoice amount. - status - Status of the invoice (e.g., Paid, Pending). - date - Date of invoice creation. - due_date - Invoice due date. - description - Description of 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 Response

{
  "success": true,
  "data": [
    {
      "invoice_id": 123,
      "amount": 50.00,
      "status": "Paid",
      "date": "2023-12-01T10:00:00Z",
      "due_date": "2023-12-15T10:00:00Z",
      "description": "Monthly Internet Subscription"
    },
    {
      "invoice_id": 124,
      "amount": 30.00,
      "status": "Pending",
      "date": "2023-11-01T10:00:00Z",
      "due_date": "2023-11-15T10:00:00Z",
      "description": "Monthly IPTV Subscription"
    }
  ]
}

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