Skip to content

All Invoices

Invoices Read Only

Retrieve a paginated list of all invoices generated from confirmed bookings. Invoices are automatically created when a booking payment is confirmed and contain detailed billing information.

Paginated
Response Format
Auto-Generated
Invoice Creation
PDF Ready
Export Format

Endpoint

GET {{base_url}}/invoice

Query Parameters

Parameter Type Required Description
page integer No Page number for pagination (default: 1)
limit integer No Number of invoices per page (default: 15)

Sample Request

curl --request GET \
  --url '{{ base_url }}/invoice?page=1&limit=15' \
  --header 'Authorization: Bearer {{ token }}'

Response

{
  "statusCode": 200,
  "data": {
    "invoices": [
      {
        "invoiceId": "INV-2024-001234",
        "bookingId": "BK-987654321",
        "customerId": "CUST-123456",
        "customerName": "John Doe",
        "customerEmail": "john.doe@example.com",
        "invoiceDate": "2024-01-15T10:30:00Z",
        "dueDate": "2024-01-30T23:59:59Z",
        "status": "PAID",
        "currency": "NGN",
        "subtotal": 15000.0,
        "vat": 1125.0,
        "discount": 0.0,
        "totalAmount": 16125.0,
        "items": [
          {
            "description": "Shipping Service - Lagos to Abuja",
            "quantity": 1,
            "unitPrice": 12000.0,
            "amount": 12000.0
          },
          {
            "description": "Insurance Coverage",
            "quantity": 1,
            "unitPrice": 3000.0,
            "amount": 3000.0
          }
        ],
        "paymentMethod": "CARD",
        "paidAt": "2024-01-15T11:45:00Z",
        "createdAt": "2024-01-15T10:30:00Z",
        "updatedAt": "2024-01-15T11:45:00Z"
      },
      {
        "invoiceId": "INV-2024-001235",
        "bookingId": "BK-987654322",
        "customerId": "CUST-789012",
        "customerName": "Jane Smith",
        "customerEmail": "jane.smith@example.com",
        "invoiceDate": "2024-01-16T14:20:00Z",
        "dueDate": "2024-01-31T23:59:59Z",
        "status": "PENDING",
        "currency": "USD",
        "subtotal": 250.0,
        "vat": 18.75,
        "discount": 25.0,
        "totalAmount": 243.75,
        "items": [
          {
            "description": "International Shipping - Nigeria to UK",
            "quantity": 1,
            "unitPrice": 250.0,
            "amount": 250.0
          }
        ],
        "paymentMethod": null,
        "paidAt": null,
        "createdAt": "2024-01-16T14:20:00Z",
        "updatedAt": "2024-01-16T14:20:00Z"
      }
    ],
    "pagination": {
      "currentPage": 1,
      "totalPages": 5,
      "totalItems": 68,
      "itemsPerPage": 15,
      "hasNextPage": true,
      "hasPreviousPage": false
    }
  },
  "message": "Invoices retrieved successfully"
}

Response Fields

Invoice Object

Field Type Description
invoiceId string Unique identifier for the invoice
bookingId string Associated booking ID
customerId string Customer identifier
customerName string Full name of the customer
customerEmail string Customer's email address
invoiceDate string Date when invoice was generated (ISO 8601)
dueDate string Payment due date (ISO 8601)
status string Invoice status: PENDING, PAID, OVERDUE, CANCELLED
currency string Currency code (NGN, USD, GBP, etc.)
subtotal number Total before VAT and discounts
vat number VAT amount (typically 7.5% in Nigeria)
discount number Any applied discounts
totalAmount number Final amount due
items array Line items on the invoice
paymentMethod string Method used for payment (if paid)
paidAt string Timestamp of payment (if paid)
createdAt string Record creation timestamp
updatedAt string Last update timestamp

Pagination Object

Field Type Description
currentPage integer Current page number
totalPages integer Total number of pages
totalItems integer Total count of invoices
itemsPerPage integer Items returned per page
hasNextPage boolean Whether more pages exist
hasPreviousPage boolean Whether previous pages exist

Invoice Statuses

Status Description
PENDING Invoice generated, awaiting payment
PAID Payment received and confirmed
OVERDUE Payment past due date
CANCELLED Invoice has been cancelled

Filtering Invoices

Use the pagination parameters to efficiently navigate through large invoice lists. Consider implementing client-side filtering by status or date range for better user experience.