Get Customer Invoice List

The Get Customer Invoice List API is used to retrieve a list of published customer invoices. A customer may retrieve only invoices which were generated in the last 12 months.

HTTP URL

 

GET

api/v2/customer/{id}/invoices

Eligibility

The Requestor is eligible to request information on invoices which were assigned to his own customer or his own sub-customers.

API Request

Not applicable

API Response

Response Structure

Parameter Type M/O/CM Description
errorCode String O Failure code. See list below, under ‘Error Codes’ section
errorMessage String O Failure detailed description. See list below, under ‘Error Codes’ section
content Object O Array of main response body object. Displayed when an API call was successful. For a failure it will be empty.
pageable Object O Paging information object. Displayed when an API call was successful. For a failure it will be empty.

Content

Parameter Type M/O/CM Description
id UUID M Invoice Id
invoiceNumber String M The Invoice number
creationTime dateTime M The date and time when the invoice was generated
billingCycleStartTime dateTime M The date and time when the Billing Cycle starts
billingCycleEndTime dateTime M The date and time when the Billing Cycle ends
currency string M Invoice currency code. E.g., GBP, USD, etc.
netAmount decimal M The total accumulated net amount. The amount that tax applies for.
taxAmount decimal M The total calculated tax amount
totalAmount decimal M The total invoice amount, sum of tax amount and net amount
dueDate dateTime O The date that the bill payment is due on

Error Codes

In addition to the general success and failure codes, the following error codes are possible.

Code Message
GLOBAL_1001 Service unavailable. Please try again
CUSTOMER_1002 Customer does not exist
CUSTOMER_1006 Failed to retrieve customer details

Examples

Request Body

Copy
{
}

Response Body: Full Success ACK

Copy
{
  "errorCode": "",
  "errorMessage": "",
  "content": [
    {
      "id": "62e8ba66-3a2d-4919-ae16-f87f35845a4b",
      "invoiceNumber": "1134",
      "creationTime": "2021-07-01T00:00:00.977Z",
      "billingCycleStartDate": "2022-07-01T00:00:00.977Z",
      "billingCycleEndDate": "2023-07-30T23:59:59.977Z",
      "currency": "USD",
      "taxAmount": 25.9,
      "netAmount": 185.1,
      "totalAmount": 211,
      "dueDate": "2023-10-15"
    },
    {
      "id": "d1d2f769-f755-4210-bf76-00fa023623e9",
      "invoiceNumber": "1204",
      "creationTime": "2021-02-01T00:00:00.977Z",
      "billingCycleStartDate": "2022-02-01T00:00:00.977Z",
      "billingCycleEndDate": "2023-02-28T23:59:59.977Z",
      "currency": "USD",
      "taxAmount": 10.1,
      "netAmount": 200,
      "totalAmount": 210.1,
      "dueDate": "2023-11-15"
    }
  ],
  "pageable": null 
}

Response Body: Includes Failure(s) (NAK)

Copy
{
  "bulk": [
    {
      "errorCode": "SUBSCRIBER_1009",
      "errorMessage": "Top-up failure. Balance not found",
      "requestId": "",
      "subscriberIdentifiers": {
        "type": "IMSI",
        "value": "222013090961963"
      },
      "content": {
        "subscriberOfferingId": "ff74dca6-8e7f-4b85-a42b-13860913b370",
        "charge": 20.5,
        "currency": "EUR",
        "expirationDate": "25042023",
        "allowance": [
          {
            "currency": "MB",
            "value": 20
          }
        ]
      }
    }
  ],
  "pageable": {
    "page": 0,
    "size": 10,
    "totalPages": 1,
    "totalElements": 1
  }
}