> For the complete documentation index, see [llms.txt](https://tri.gitbook.io/tri-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tri.gitbook.io/tri-doc/liquidity-pool/get-available-assets.md).

# Get Available Assets

### Liquidity Pool

<mark style="color:blue;">`GET`</mark> <https://sandbox.triangle.digital/api/v2/liquidity\\_pool/clients/{client\\_id}/assets/available\\_assets>

Preview of an invoice purchase: which invoice lines can be bought from the carbon pools right now, which cannot, and whether the Spending Capacity balances cover the basket. Nothing is charged. Amounts are objects with an ISO 4217 currency and a decimal-string amount.

**Path parameters**

<table data-full-width="true" data-search="false"><thead><tr><th width="230">Name</th><th width="110">Type</th><th>Description</th><th width="210">Where to take it from</th></tr></thead><tbody><tr><td><code>client_id</code></td><td>integer</td><td><strong>Required.</strong> The client whose invoices are previewed.</td><td><a href="/tri-doc/liquidity-pool/get-clients.md">Get Clients</a> — <code>client_id</code></td></tr></tbody></table>

**Headers**

<table data-full-width="true"><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr></tbody></table>

**Query parameters**

<table data-full-width="true" data-search="false"><thead><tr><th width="200">Name</th><th width="110">Type</th><th>Description</th><th width="260">Example</th></tr></thead><tbody><tr><td><code>hash</code></td><td>string</td><td><strong>Required.</strong> API key.</td><td>fk5f0iuy-rr06-j4x3-i75b-fy2s67s4ilo1</td></tr><tr><td><code>invoice_ids</code></td><td>array</td><td><strong>Required.</strong> Invoices to preview, e.g. <code>invoice_ids[]=61</code>; duplicates are refused. From <a href="/tri-doc/liquidity-pool/get-invoices.md">Get Invoices</a> — <code>invoice_id</code>.</td><td>[61]</td></tr></tbody></table>

**Response fields**

A previewed line carries the fields of a purchased one in [Purchase Assets](/tri-doc/liquidity-pool/purchase-assets.md) that a preview can answer. What only a completed sale produces — `transaction_id`, `retirement_id`, `payment_intent_id`, `credit_card_last4`, `created_at` — and the Carbon Pool company fields, which an invoice purchase never uses, are not part of a preview line.

<table data-full-width="true" data-search="false"><thead><tr><th width="360">Field</th><th width="110">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>message</code></td><td>string</td><td>Human-readable result of the call.</td></tr><tr><td><code>success</code></td><td>boolean</td><td>Whether the call succeeded; a failed call answers HTTP 400.</td></tr><tr><td><code>data.available_assets[]</code></td><td>object</td><td>Lines the pools can cover — fields below.</td></tr><tr><td><code>data.no_available_assets[]</code></td><td>object</td><td>Lines the pools cannot cover — the same fields, with <code>asset_name</code>, <code>asset_id</code>, <code>viewer</code>, <code>instrument_type</code>, <code>pool_px</code> and <code>notional</code> <code>null</code>: there is no asset to buy from and therefore no price to quote.</td></tr><tr><td><code>data.available_assets[].asset_name</code></td><td>string</td><td>Asset the line would be bought from, under its current name.</td></tr><tr><td><code>data.available_assets[].asset_id</code></td><td>string</td><td>Identifier of that asset — 32 uppercase hexadecimal characters. It is the stable half of the pair: <code>asset_name</code> is the asset's CURRENT name and changes when the asset is renamed, while this value does not. <a href="/tri-doc/liquidity-pool/purchase-assets.md">Purchase Assets</a> and <a href="/tri-doc/liquidity-pool/get-carbon-transactions.md">Get Carbon Transactions</a> answer the same identifier for the line, so a preview, the purchase it turns into and the history all name one asset alike.</td></tr><tr><td><code>data.available_assets[].viewer</code></td><td>string</td><td>Address of the asset's Parameters Viewer — the page holding the parameters of that asset. <code>null</code> when there is no such page: only a Carbon Credit asset has one, and a line of <code>no_available_assets</code> has no asset behind it at all.</td></tr><tr><td><code>data.available_assets[].instrument_type</code></td><td>string</td><td>Instrument Type of that asset, as it is set on the asset now. An asset may carry several; they come back in one string, comma-separated — for example <code>Engineered, Nature-based</code>. <code>null</code> when the asset carries none, and on every line of <code>no_available_assets</code>.</td></tr><tr><td><code>data.available_assets[].employee_id</code></td><td>integer</td><td>Employee who would pay, as in <a href="/tri-doc/liquidity-pool/get-employees.md">Get Employees</a> — <code>employee_id</code>; <code>null</code> on an Individual Consumption line.</td></tr><tr><td><code>data.available_assets[].client_employee_id</code></td><td>string</td><td>Client-facing Employee ID (the <code>employee_number</code> of <a href="/tri-doc/liquidity-pool/get-employees.md">Get Employees</a>); <code>null</code> on an Individual Consumption line.</td></tr><tr><td><code>data.available_assets[].employee_name</code></td><td>string</td><td>Name of the employee who would pay — the same person <code>balance_coverage.employees[]</code> reports the coverage for. Unlike <code>employee_id</code> it is filled on an Individual Consumption line as well, where it repeats the name inside <code>individual_consumption</code>.</td></tr><tr><td><code>data.available_assets[].individual_consumption</code></td><td>object</td><td>Individual Consumption that would be billed — <code>individual_consumption_id</code> (as in <a href="/tri-doc/liquidity-pool/get-individual-consumptions.md">Get Individual Consumptions</a>), <code>name</code>, <code>email</code>; <code>null</code> on other lines and on clients that are not Business accounts.</td></tr><tr><td><code>data.available_assets[].credit_card</code></td><td>boolean</td><td>Whether the payer of the line has a saved card.</td></tr><tr><td><code>data.available_assets[].carbon_type</code></td><td>string</td><td>Expense Type. One of: AI Compute, Air Travel, Vehicle, Lodging or Food.</td></tr><tr><td><code>data.available_assets[].co2</code></td><td>number</td><td>Quantity of the line, tons.</td></tr><tr><td><code>data.available_assets[].pool_px</code></td><td>object</td><td>Price per ton — currency and decimal string.</td></tr><tr><td><code>data.available_assets[].notional</code></td><td>object</td><td>Line total — currency and decimal string.</td></tr><tr><td><code>data.available_assets[].invoice_id</code> / <code>invoice_number</code></td><td>integer / string</td><td>The invoice of the line, as in <a href="/tri-doc/liquidity-pool/get-invoices.md">Get Invoices</a>.</td></tr><tr><td><code>data.balance_coverage.covered</code></td><td>boolean</td><td>Whether every employee's balance covers their lines; <code>false</code> when any is short.</td></tr><tr><td><code>data.balance_coverage.employees[]</code></td><td>object</td><td>Per employee — <code>employee_id</code>, <code>name</code>, <code>required</code> and <code>available</code> (USD), <code>covered</code>, <code>autofill_balance</code>. Each invoice line is paid by the employee of its invoice. <code>autofill_balance</code> is <code>true</code> when a shortfall is covered from that employee's saved card at purchase time, so <code>covered</code> <code>false</code> does not by itself mean the purchase cannot go through.</td></tr><tr><td><code>operations_count</code></td><td>integer</td><td>Always <code>1</code>.</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}
{% code fullWidth="false" %}

```json
{
    "message": "Data received successfully.",
    "success": true,
    "data": {
        "available_assets": [
            {
                "asset_name": "Walker Ranch UAT 2",
                "asset_id": "D689021E04987FB9476852972D0AE958",
                "viewer": "https://sandbox.triangle.digital/v/16924",
                "instrument_type": "Nature-based",
                "employee_id": 18,
                "client_employee_id": "D2354324",
                "employee_name": "John Smith",
                "individual_consumption": null,
                "credit_card": true,
                "carbon_type": "Air Travel",
                "co2": 1.0,
                "pool_px": { "currency": "USD", "amount": "120.00" },
                "notional": { "currency": "USD", "amount": "120.00" },
                "invoice_id": 61,
                "invoice_number": "56WFFS23"
            }
        ],
        "no_available_assets": [],
        "balance_coverage": {
            "covered": false,
            "employees": [
                {
                    "employee_id": 18,
                    "name": "John Smith",
                    "required": 120.0,
                    "available": 25.0,
                    "covered": false,
                    "autofill_balance": false
                }
            ]
        }
    },
    "operations_count": 1
}
```

{% endcode %}
{% endtab %}

{% tab title="400" %}
The hash is unknown, an invoice does not belong to this client, or `invoice_ids` contains duplicates; the message says what exactly.

```json
{
    "message": "Error! No such hash.",
    "success": false
}
```

{% endtab %}
{% endtabs %}
