> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashquotes.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Invoices

> Retrieve invoice IDs and URLs associated with a booking

This endpoint returns the invoice IDs and encrypted invoice URLs associated with a specific booking.

### Response

The response includes:

* `bookingId`: The ID of the booking
* `invoiceIds`: Array of invoice IDs associated with the booking
* `invoiceUrls`: Array of encrypted invoice URLs that can be used to access the invoices

### Example Usage

Here's an example of how to use this endpoint with curl:

```bash theme={null}
curl -X GET 'https://app.flashquotes.com/api/invoice/book_123' \
-H 'x-api-key: your_api_key_here'
```

### Common Use Cases

* Retrieving invoice URLs for a booking
* Accessing invoice documents through encrypted URLs
* Tracking which invoices are associated with a booking


## OpenAPI

````yaml GET /api/invoice/{booking_id}
openapi: 3.0.1
info:
  title: Flashquotes API
  description: API for managing invoices in Flashquotes
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.flashquotes.com/
security:
  - apiKeyAuth: []
paths:
  /api/invoice/{booking_id}:
    get:
      description: Returns all invoices associated with a booking
      parameters:
        - name: booking_id
          in: path
          description: ID of the booking to retrieve invoices for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: List of invoices for the booking
          content:
            application/json:
              schema:
                type: object
                required:
                  - bookingId
                  - invoiceIds
                  - invoiceUrls
                properties:
                  bookingId:
                    type: string
                    description: The ID of the booking
                  invoiceIds:
                    type: array
                    items:
                      type: string
                    description: Array of invoice IDs associated with the booking
                  invoiceUrls:
                    type: array
                    items:
                      type: string
                    description: Array of encrypted invoice URLs
              example:
                bookingId: book_123
                invoiceIds:
                  - inv_456
                  - inv_789
                invoiceUrls:
                  - https://app.flashquotes.com/invoices/encrypted/abc123
                  - https://app.flashquotes.com/invoices/encrypted/def456
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              example:
                message: Invalid API key
        '404':
          description: Booking not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                message: Booking not found
components:
  schemas:
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          description: A human-readable error message
      example:
        message: An error occurred
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````