Lodol Docs

Smart Actions by Lodol

API actions for the Smart Actions by Lodol integration.

Smart Actions by Lodol

Perform intelligent actions like validation and extraction using Lodol's built-in Smart Actions.


Classify an expense transaction

Sort an expense into one of your categories, with an optional sub-category, and flag anything uncertain or miscellaneous for review.

Parameters

ParameterTypeRequiredDescription
transaction_dataobjectYesThe expense to classify, with its date, amount, currency, merchant, and description.
category_listarrayYesThe list of categories to choose from, such as your general ledger (GL) codes. Include 'Miscellaneous' in the list if you want that option available.

Response

{
  "explanation": "Classified as travel based on flight-related merchant and description.",
  "primary_category": "Travel",
  "requires_review": false,
  "sub_category": "Airfare"
}

Extract fields from a document

Pull the fields you name out of a document and save them for later steps.

Parameters

ParameterTypeRequiredDescription
filepathstringYesUpload the source document or enter a URL.
fieldsarrayYesThe names of the fields to pull from the document.

Response

{
  "fields": [
    {}
  ]
}

Extract and validate an invoice

Read the key details from an invoice, assign a general ledger (GL) code, check that the line items and totals add up, and flag any problems found.

Parameters

ParameterTypeRequiredDescription
filestringYesUpload an invoice or enter a URL.

Response

{
  "currency": "USD",
  "due_date": "2025-01-31",
  "gl_code": "Software Subscription",
  "invoice_date": "2025-01-01",
  "invoice_number": "INV-1001",
  "line_items": [
    {
      "description": "Software subscription",
      "quantity": 1,
      "total": 99.0,
      "unit_price": 99.0
    }
  ],
  "requires_review": false,
  "subtotal": 99.0,
  "tax": 0.0,
  "total": 99.0,
  "validation_errors": [],
  "vendor_name": "Example Vendor"
}

Check if a lead fits your ideal customer profile

Check whether a lead matches your ideal customer profile. Returns a yes-or-no decision with a fit score and the reason.

Parameters

ParameterTypeRequiredDescription
companystringYesThe company name to evaluate.
emailstringNoThe contact's email address, for extra context.
namestringNoThe contact's name, for extra context.

Response

{
  "company": "Acme Corp",
  "email": "jane@example.com",
  "is_qualified": true,
  "name": "Jane Doe",
  "reason": "Company matches target profile criteria.",
  "score": 85
}

Reconcile invoices against a purchase order

Read one or more invoices and compare them against a purchase order to find any mismatches.

Parameters

ParameterTypeRequiredDescription
invoice_filesarrayYesUpload invoices or enter URLs.
purchase_orderarrayYesThe lines on the purchase order. For each one, give the description, quantity, and price per unit.
totalnumberYesThe total amount for the purchase order.

Response

{
  "discrepancies": [],
  "requires_review": false
}

Validate a receipt for reimbursement

Read the details from a receipt and check it against your expense policy. Flags spending-limit breaches, duplicate submissions, late submissions, and mismatches with the recorded transaction.

Parameters

ParameterTypeRequiredDescription
receipt_filestringYesUpload a receipt or enter a URL.
transactionobjectNoOptional details of the matching payment (date, amount, currency, merchant, and category) to compare the receipt against.
require_itemizationbooleanNoSet to true to require the receipt to list individual line items. Defaults to true.
category_policiesobjectNoOptional rules for each expense category. For a category you can set the most days allowed between the purchase and submission, and the highest receipt amount allowed.
fallback_max_days_after_transactionnumberNoThe most days allowed between purchase and submission when a category has no rule of its own. Defaults to 30.
fallback_spending_limitnumberNoThe highest receipt amount allowed when a category has no rule of its own. Defaults to 500.

Response

{
  "currency": "USD",
  "merchant_name": "mock_value",
  "policy_compliant": true,
  "policy_violations": [],
  "total_amount": 42.0,
  "transaction_date": "2025-01-01"
}

Validate a resume against job requirements

Check a resume against the job requirements you provide.

Parameters

ParameterTypeRequiredDescription
filepathstringYesUpload a resume PDF or enter a URL.
requirementsstringYesThe job requirements to check the resume against.

Response

{}

On this page