Retrieve invoice details. If a specific invoice UUID is provided, retrieve details for that invoice. If no UUID is provided, return a list of all invoices.
Overview
The /company/invoices/
endpoint is designed to fetch invoice details from a partner's system. This endpoint supports two main functionalities:
- Retrieve details for a specific invoice when an invoice ID is provided.
- Retrieve a list of all invoices associated with the company if no invoice ID is provided.
This flexibility supports both transaction-specific operations and broader underwriting processes.
When Will Lendica Call This Route?
Lendica will call this endpoint in the following scenarios:
- Transaction-Specific Retrieval: When a user clicks on the FundNow button associated with a specific invoice, Lendica will call this route with the specific
partner_invoice_uuid
to fetch the details of that invoice. - Underwriting: Lendica may call this route without a specific
partner_invoice_uuid
to fetch a list of historical invoices associated with the company. This data aids in the underwriting process, helping to assess the creditworthiness and financial stability of the company.
Authentication
Requests to this endpoint should be authenticated using the company's API key (partner_token
) retrieved from the GET /company/token
endpoint.
Usage
To Retrieve a Specific Invoice:
- HTTP Method: GET
- URL:
/company/invoices/
- Query Parameters:
partner_invoice_uuid
: The unique identifier of the invoice Lendica wishes to retrieve.
To Retrieve a List of All Invoices:
- HTTP Method: GET
- URL:
/company/invoices/
- Query Parameters: None required.
Required Fields in Response
The response must be a JSON object. If retrieving a specific invoice, the object should represent the invoice. If retrieving a list of invoices, the object should be an array of invoices.
Each invoice object must contain the following fields:
partner_invoice_uuid
: Unique identifier for the invoice in the partner's system.tax
: The tax amount on the invoice.subtotal
: The subtotal of the invoice, excluding tax and shipping.shipping_total
: The total shipping costs on the invoice.total
: The total amount of the invoice, including tax and shipping.order_date
: The date on which the order was placed.due_date
: The date by which the invoice must be paid.company
: An object containing details of the company.partner_company_uuid
: Unique identifier for the company in the partner's system.company_name
: The name of the company.
customer
: An object containing details of the customer.partner_company_uuid
: Unique identifier for the customer in the partner's systemcompany_name
: The name of the customer's company.
Example Response
NOTE: For a complete example of a response with all possible fields and types, click on the "EXAMPLES" dropdown to the right and select the
200
status code. Alternatively, scroll down to the bottom and click on the200
response.
{
"partner_invoice_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tax": 50.00,
"subtotal": 950.00,
"shipping_total": 20.00,
"total": 1020.00,
"order_date": "2023-10-25T14:30:00Z",
"due_date": "2023-11-01T14:30:00Z",
"company": {
"partner_company_uuid": "123e4567-e89b-12d3-a456-426614174111",
"company_name": "Acme Inc."
},
"customer": {
"partner_company_uuid": "123e4567-e89b-12d3-a456-426614174222",
"company_name": "Customer Inc."
}
}