πŸ’° Accounting (Quick Start)

Generic Workflow for Accounting

  1. Read out the bookings subject to accounting (= confirmed bookings, flagged ready to invoice)
  2. Get their details (price and cost data)
  3. Get the list of invoices
  4. Get the PDF invoice document(s)

1. Get a List of Bookings

Your app can call FL3XX regularly (e. g., nightly) to receive a list of new bookings subject to accounting.

GET /api/external/quote/bookings

Use the filter = READY_TO_INVOICE, and lastRequest parameter.

Please mind the "bookingId". Each booking in the list has the unique "bookingId", which is required in the later steps.

},  
            "quoteNumber": "A-BE20-014410",  
            "status": "F",  
            "bookingIdentifier": "WUCIA",  
            "bookingid": 47071,  
            "tripNumber": 500039,

}

2. Get Accounting Data for a Booking

Retrieve all available price and cost data for a given booking using the "bookingId".

GET /api/external/accounting/booking/{bookingId}

3. Get a List of Invoices for a Booking

GET /api/external/accounting/booking/{bookingId}/invoices

Below is a sample of one document. Please mind "uuid" element, which you can use in the next step to get the actual PDF document , and the "timestamp" of the last modification.

"invoiceNumber": null,  
        "invoiceDate": "2020-12-10T15:07:01.277Z",  
        "invoiceType": "PROFORMA_INVOICE",  
        "document": {  
            "id": 65402,  
            "name": "20201210-160701-39-GIUVG_Proforma_Invoice.pdf",  
            "uuid": "da3ecf75-4f17-4c17-9ab7-70e0ed572a1c",  
            "customName": null,  
            "originalName": "GIUVG_Proforma_Invoice.pdf",  
            "fileSize": 160688,  
            "imageSizeX": 0,  
            "imageSizeY": 0,
          ...
          
          {  
        "timestamp": "2020-12-10T15:22:16.267Z",  
        "user": {  
            "externalReference": "fl3xx_78562",  
            "internalId": 78562,  
          
          ...

4. Get PDF

Using the "uuid" from the previous step, you can download the actual PDF.

GET /api/external/accounting/attachments/{uuid}