Skip to content

E-invoicing

List sent invoices

List the invoices your business has sent, with paging and filters.

GET{baseUrl}/{stage}/external/{businessId}/fetch-sent-invoices

Retrieve a paginated list of all sent invoices for a business with filtering options.

Request

Headers

Content-Typerequired
application/json or */*
Acceptrequired
application/json or */*
X-Business-Keyrequired

Path Parameters

businessIdstring (UUID)required
Your business FIRS ID

Query Parameters

invoiceTypestring
Filter by invoice typeDefault: INVOICES
pagenumber
Page number (starts at 1)Default: 1
sizenumber
Number of invoices per page (1-100)Default: 100

Invoice Type Options:

  • INVOICES - All invoices
  • CREDIT - Credit notes only
  • DEBIT - Debit notes only

Response

Success (200)

JSON
{
  "responseCode": "00",
  "responseMessage": "Invoices fetched successfully",
  "data": {
    "invoices": [
      {
        "invoiceIrn": "INV237-1070ECE8-20250826",
        "invoiceNumber": "INV237",
        "invoiceIssueDate": "2025-08-26",
        "invoiceDueDate": "2025-08-26",
        "invoicePaymentStatus": "PAID",
        "invoicePayableAmount": 30255.22,
        "invoiceCustomerPartyName": "Dangote Group",
        "invoiceSupplierPartyName": "AEDC Electricity Supply",
        // Full invoice object with all fields
      }
    ],
    "pagination": {
      "currentPage": 1,
      "pageSize": 100,
      "totalPages": 5,
      "totalInvoices": 487
    }
  }
}

Response Fields

invoices
Array of invoice objects (see Get Invoice Details for complete field structure)
pagination.currentPage
Current page number
pagination.pageSize
Number of invoices per page
pagination.totalPages
Total number of pages
pagination.totalInvoices
Total number of invoices matching criteria

Note: Each invoice object in the array contains the same fields as the single invoice endpoint. See "Get Invoice Details" documentation for complete field descriptions.

Errors

404 - Business Not Found

JSON
{
  "responseCode": "404",
  "responseMessage": "Business not found with ID: {businessId}"
}

→ Verify businessId is correct

400 - Invalid Parameters

JSON
{
  "responseCode": "400",
  "responseMessage": "Invalid page or size parameter"
}

→ Ensure page ≥ 1 and size between 1-100

401 - Unauthorized

JSON
{
  "responseCode": "401",
  "responseMessage": "Invalid or expired business key"
}

→ Check Authorization header and business key validity

Example Requests

Get First Page (Default):

cURL
curl -X GET "{baseUrl}/{stage}/external/{businessID}/fetch-sent-invoices" \
  --header 'X-Business-Key: BK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-DEV-XXXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \"

Get Specific Page:

cURL
curl -X GET "{baseUrl}/{stage}/external/{businessID}/fetch-sent-invoices?page=2&size=50" \
  --header 'X-Business-Key: BK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-DEV-XXXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \"

Filter by Invoice Type:

cURL
curl -X GET "{baseUrl}/{stage}/external/{businessID}/fetch-sent-invoices?invoiceType=CREDIT_NOTES&page=1&size=20" \
  --header 'X-Business-Key: BK-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-DEV-XXXXXXXXXXXX' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \"

Pagination

Navigation: First page = page=1, increment for next pages, use totalPages for last

Best Practices:

  • Default size (100) for most cases, smaller (20-50) for better performance
  • Cache responses to reduce API calls

Common Issues

Empty results → No sent invoices or filtered out by invoiceType
"Invalid page" → Must be ≥ 1
"Invalid size" → Must be 1-100
Slow response → Reduce page size

Performance Tips

  • Use appropriate page size (20-50 for UI, 100 for batch)
  • Cache frequently accessed pages
  • Filter with invoiceType to reduce results

Related:

  • GET /invoices/{invoiceIrn} - Get single invoice details
  • POST /invoices - Create invoice
  • POST /invoices/update-payment/{invoiceIrn} - Update payment status

Support: support@nairainvoice.com | Docs: developer.nairainvoice.com