{
  "status": "COMPLETED",
  "message": [
    {
      "file": "Calderwood_Freight_S66_S67_S72.pdf",
      "file_execution_id": "01bd23a9-0b52-4d0b-acf4-6cb8ef57e179",
      "status": "Success",
      "result": {
        "output": {
          "distance_miles": "450 miles",
          "total_fuel_cost": "£81.00",
          "fuel_rate_per_mile": "£0.18 per mile"
        },
        "metrics": {
          "_file": {
            "text_extraction": {
              "time_taken(s)": 10.62802393801394
            }
          },
          "distance_miles": {
            "extraction_llm": {
              "time_taken(s)": 0.601
            },
            "context_retrieval": {
              "time_taken(s)": 0.00502
            }
          },
          "total_fuel_cost": {
            "extraction_llm": {
              "time_taken(s)": 0.494
            },
            "context_retrieval": {
              "time_taken(s)": 0.005426
            }
          },
          "fuel_rate_per_mile": {
            "extraction_llm": {
              "time_taken(s)": 0.829
            },
            "context_retrieval": {
              "time_taken(s)": 0.005386
            }
          }
        },
        "metadata": {
          "run_id": "01bd23a9-0b52-4d0b-acf4-6cb8ef57e179",
          "context": {
            "distance_miles": [
              "\n\n                                                                                                              INVOICE \nCalderwood Freight Services \nUK ROAD HAULAGE                                                                                   Dispatch Date: 03 March 2026 \n\nBILL TO                                                                           Invoice number              CFS-7710 \n\nVantage Retail Distribution                                                       Consignment ref             CFS-CN-40821 \nUnit 12, Portway Business Park                                                    Payment terms               14 days net \nPortsmouth PO3 5RJ \n\nROUTE                                                                                                              DISTANCE \nLeeds Depot    Portsmouth Distribution Centre                                                                      450 miles \n\nFUEL RATE                                                                                       VEHICLE \n£0.18 per mile                                                                                   18-tonne rigid, reg. CF19 LKM \n\n    Goods were collected from our Leeds depot and dispatched on 03 March 2026 following the agreed collection schedule with the \n    client. Goods were received and signed for at the destination distribution centre on 07 March 2026, confirming safe delivery of the \n    full consignment. \n\nContinued on page 2 - charges, totals and remittance details follow. \n\nCFS-7710                                                                                                           Page 1 of 3 \n<<<\f\n\nCalderwood Freight Services                                                                                   Invoice CFS-7710 \n\n  Description                                                                                                      Amount \n\n  Freight charge, Leeds - Portsmouth (full load)                                                                   £640.00 \n\n  Handling fee, destination depot                                                                                   £45.00 \n\n                                                                       Subtotal                                      £685.00 \n\n                                                                       VAT at 20%                                    £137.00 \n\n                                                                       Total Due                                  £822.00 \n\nPayment is due within 14 days of invoice date to Calderwood Freight Services, Northbridge Commercial Bank, Acc. 6641 0028 71, Sort Code \n55-02-19. \n\nContinued on page 3 - damage & exceptions record follows. \n\nCFS-7710                                                                                                           Page 2 of 3 \n<<<\f\n\nCalderwood Freight Services                                                                                 Invoice CFS-7710 \n\nDamage & exceptions \n\n                           No damage or exceptions were reported for this consignment. \n     The consignment was inspected on arrival and signed for without qualification. No cargo damage, shortage, or delivery exception \n                                     was recorded against consignment ref CFS-CN-40821. \n\nInspected by                       R. Okafor, Goods-In Supervisor \n\nInspection date                    07 March 2026 \n\nCFS-7710                                                                                                         Page 3 of 3 \n<<<\f"
            ],
            "total_fuel_cost": [
              "\n\n                                                                                                              INVOICE \nCalderwood Freight Services \nUK ROAD HAULAGE                                                                                   Dispatch Date: 03 March 2026 \n\nBILL TO                                                                           Invoice number              CFS-7710 \n\nVantage Retail Distribution                                                       Consignment ref             CFS-CN-40821 \nUnit 12, Portway Business Park                                                    Payment terms               14 days net \nPortsmouth PO3 5RJ \n\nROUTE                                                                                                              DISTANCE \nLeeds Depot    Portsmouth Distribution Centre                                                                      450 miles \n\nFUEL RATE                                                                                       VEHICLE \n£0.18 per mile                                                                                   18-tonne rigid, reg. CF19 LKM \n\n    Goods were collected from our Leeds depot and dispatched on 03 March 2026 following the agreed collection schedule with the \n    client. Goods were received and signed for at the destination distribution centre on 07 March 2026, confirming safe delivery of the \n    full consignment. \n\nContinued on page 2 - charges, totals and remittance details follow. \n\nCFS-7710                                                                                                           Page 1 of 3 \n<<<\f\n\nCalderwood Freight Services                                                                                   Invoice CFS-7710 \n\n  Description                                                                                                      Amount \n\n  Freight charge, Leeds - Portsmouth (full load)                                                                   £640.00 \n\n  Handling fee, destination depot                                                                                   £45.00 \n\n                                                                       Subtotal                                      £685.00 \n\n                                                                       VAT at 20%                                    £137.00 \n\n                                                                       Total Due                                  £822.00 \n\nPayment is due within 14 days of invoice date to Calderwood Freight Services, Northbridge Commercial Bank, Acc. 6641 0028 71, Sort Code \n55-02-19. \n\nContinued on page 3 - damage & exceptions record follows. \n\nCFS-7710                                                                                                           Page 2 of 3 \n<<<\f\n\nCalderwood Freight Services                                                                                 Invoice CFS-7710 \n\nDamage & exceptions \n\n                           No damage or exceptions were reported for this consignment. \n     The consignment was inspected on arrival and signed for without qualification. No cargo damage, shortage, or delivery exception \n                                     was recorded against consignment ref CFS-CN-40821. \n\nInspected by                       R. Okafor, Goods-In Supervisor \n\nInspection date                    07 March 2026 \n\nCFS-7710                                                                                                         Page 3 of 3 \n<<<\f"
            ],
            "fuel_rate_per_mile": [
              "\n\n                                                                                                              INVOICE \nCalderwood Freight Services \nUK ROAD HAULAGE                                                                                   Dispatch Date: 03 March 2026 \n\nBILL TO                                                                           Invoice number              CFS-7710 \n\nVantage Retail Distribution                                                       Consignment ref             CFS-CN-40821 \nUnit 12, Portway Business Park                                                    Payment terms               14 days net \nPortsmouth PO3 5RJ \n\nROUTE                                                                                                              DISTANCE \nLeeds Depot    Portsmouth Distribution Centre                                                                      450 miles \n\nFUEL RATE                                                                                       VEHICLE \n£0.18 per mile                                                                                   18-tonne rigid, reg. CF19 LKM \n\n    Goods were collected from our Leeds depot and dispatched on 03 March 2026 following the agreed collection schedule with the \n    client. Goods were received and signed for at the destination distribution centre on 07 March 2026, confirming safe delivery of the \n    full consignment. \n\nContinued on page 2 - charges, totals and remittance details follow. \n\nCFS-7710                                                                                                           Page 1 of 3 \n<<<\f\n\nCalderwood Freight Services                                                                                   Invoice CFS-7710 \n\n  Description                                                                                                      Amount \n\n  Freight charge, Leeds - Portsmouth (full load)                                                                   £640.00 \n\n  Handling fee, destination depot                                                                                   £45.00 \n\n                                                                       Subtotal                                      £685.00 \n\n                                                                       VAT at 20%                                    £137.00 \n\n                                                                       Total Due                                  £822.00 \n\nPayment is due within 14 days of invoice date to Calderwood Freight Services, Northbridge Commercial Bank, Acc. 6641 0028 71, Sort Code \n55-02-19. \n\nContinued on page 3 - damage & exceptions record follows. \n\nCFS-7710                                                                                                           Page 2 of 3 \n<<<\f\n\nCalderwood Freight Services                                                                                 Invoice CFS-7710 \n\nDamage & exceptions \n\n                           No damage or exceptions were reported for this consignment. \n     The consignment was inspected on arrival and signed for without qualification. No cargo damage, shortage, or delivery exception \n                                     was recorded against consignment ref CFS-CN-40821. \n\nInspected by                       R. Okafor, Goods-In Supervisor \n\nInspection date                    07 March 2026 \n\nCFS-7710                                                                                                         Page 3 of 3 \n<<<\f"
            ]
          },
          "file_name": "Calderwood_Freight_S66_S67_S72.pdf",
          "line_numbers": {
            "distance_miles": [],
            "total_fuel_cost": [],
            "fuel_rate_per_mile": []
          },
          "whisper_hash": "",
          "extracted_text": "\n\n                                                                                                              INVOICE \nCalderwood Freight Services \nUK ROAD HAULAGE                                                                                   Dispatch Date: 03 March 2026 \n\nBILL TO                                                                           Invoice number              CFS-7710 \n\nVantage Retail Distribution                                                       Consignment ref             CFS-CN-40821 \nUnit 12, Portway Business Park                                                    Payment terms               14 days net \nPortsmouth PO3 5RJ \n\nROUTE                                                                                                              DISTANCE \nLeeds Depot    Portsmouth Distribution Centre                                                                      450 miles \n\nFUEL RATE                                                                                       VEHICLE \n£0.18 per mile                                                                                   18-tonne rigid, reg. CF19 LKM \n\n    Goods were collected from our Leeds depot and dispatched on 03 March 2026 following the agreed collection schedule with the \n    client. Goods were received and signed for at the destination distribution centre on 07 March 2026, confirming safe delivery of the \n    full consignment. \n\nContinued on page 2 - charges, totals and remittance details follow. \n\nCFS-7710                                                                                                           Page 1 of 3 \n<<<\f\n\nCalderwood Freight Services                                                                                   Invoice CFS-7710 \n\n  Description                                                                                                      Amount \n\n  Freight charge, Leeds - Portsmouth (full load)                                                                   £640.00 \n\n  Handling fee, destination depot                                                                                   £45.00 \n\n                                                                       Subtotal                                      £685.00 \n\n                                                                       VAT at 20%                                    £137.00 \n\n                                                                       Total Due                                  £822.00 \n\nPayment is due within 14 days of invoice date to Calderwood Freight Services, Northbridge Commercial Bank, Acc. 6641 0028 71, Sort Code \n55-02-19. \n\nContinued on page 3 - damage & exceptions record follows. \n\nCFS-7710                                                                                                           Page 2 of 3 \n<<<\f\n\nCalderwood Freight Services                                                                                 Invoice CFS-7710 \n\nDamage & exceptions \n\n                           No damage or exceptions were reported for this consignment. \n     The consignment was inspected on arrival and signed for without qualification. No cargo damage, shortage, or delivery exception \n                                     was recorded against consignment ref CFS-CN-40821. \n\nInspected by                       R. Okafor, Goods-In Supervisor \n\nInspection date                    07 March 2026 \n\nCFS-7710                                                                                                         Page 3 of 3 \n<<<\f",
          "required_fields": {
            "distance_miles": null,
            "total_fuel_cost": null,
            "fuel_rate_per_mile": null
          },
          "extraction_llm": [
            {
              "model_name": "gpt-4o",
              "cost_in_dollars": "0.0049575",
              "input_tokens": 1935,
              "output_tokens": 12,
              "total_tokens": 1947
            }
          ]
        }
      },
      "error": null,
      "metadata": {
        "source_name": "Calderwood_Freight_S66_S67_S72.pdf",
        "source_hash": "1bcc6c7b945956c5b6f5a87d223ed3d578a62aa2c56c5fc1e3abedb4cc4de72e",
        "organization_id": "org_0pMusmf6SGq5PdXO",
        "workflow_id": "02a22c54-7a1a-4b57-ae83-246a88388596",
        "execution_id": "afa65221-7ec5-4397-8c08-bced1e1f4f39",
        "file_execution_id": "01bd23a9-0b52-4d0b-acf4-6cb8ef57e179",
        "tags": [],
        "workflow_start_time": 1795515089.1710587,
        "tool_metadata": [
          {
            "tool_name": "structure_tool",
            "output_type": "JSON",
            "elapsed_time": 13.369973505032249
          }
        ],
        "total_elapsed_time": 13.536378622055054,
        "usage": {
          "embedding_tokens": 0,
          "prompt_tokens": 1935,
          "completion_tokens": 12,
          "total_tokens": 1947,
          "cost_in_dollars": 0.0049575,
          "file_execution_id": "01bd23a9-0b52-4d0b-acf4-6cb8ef57e179"
        },
        "total_pages_processed": 3,
        "hitl": {
          "file_sent_to_hitl": false,
          "reason": "API deployment without file history - HITL not applicable"
        }
      },
      "extracted_text": "\n\n                                                                                                              INVOICE \nCalderwood Freight Services \nUK ROAD HAULAGE                                                                                   Dispatch Date: 03 March 2026 \n\nBILL TO                                                                           Invoice number              CFS-7710 \n\nVantage Retail Distribution                                                       Consignment ref             CFS-CN-40821 \nUnit 12, Portway Business Park                                                    Payment terms               14 days net \nPortsmouth PO3 5RJ \n\nROUTE                                                                                                              DISTANCE \nLeeds Depot    Portsmouth Distribution Centre                                                                      450 miles \n\nFUEL RATE                                                                                       VEHICLE \n£0.18 per mile                                                                                   18-tonne rigid, reg. CF19 LKM \n\n    Goods were collected from our Leeds depot and dispatched on 03 March 2026 following the agreed collection schedule with the \n    client. Goods were received and signed for at the destination distribution centre on 07 March 2026, confirming safe delivery of the \n    full consignment. \n\nContinued on page 2 - charges, totals and remittance details follow. \n\nCFS-7710                                                                                                           Page 1 of 3 \n<<<\f\n\nCalderwood Freight Services                                                                                   Invoice CFS-7710 \n\n  Description                                                                                                      Amount \n\n  Freight charge, Leeds - Portsmouth (full load)                                                                   £640.00 \n\n  Handling fee, destination depot                                                                                   £45.00 \n\n                                                                       Subtotal                                      £685.00 \n\n                                                                       VAT at 20%                                    £137.00 \n\n                                                                       Total Due                                  £822.00 \n\nPayment is due within 14 days of invoice date to Calderwood Freight Services, Northbridge Commercial Bank, Acc. 6641 0028 71, Sort Code \n55-02-19. \n\nContinued on page 3 - damage & exceptions record follows. \n\nCFS-7710                                                                                                           Page 2 of 3 \n<<<\f\n\nCalderwood Freight Services                                                                                 Invoice CFS-7710 \n\nDamage & exceptions \n\n                           No damage or exceptions were reported for this consignment. \n     The consignment was inspected on arrival and signed for without qualification. No cargo damage, shortage, or delivery exception \n                                     was recorded against consignment ref CFS-CN-40821. \n\nInspected by                       R. Okafor, Goods-In Supervisor \n\nInspection date                    07 March 2026 \n\nCFS-7710                                                                                                         Page 3 of 3 \n<<<\f"
    }
  ]
}