> For the complete documentation index, see [llms.txt](https://developers.bloomcredit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.bloomcredit.io/docs/v2.1/enablement-services/queries/tradelinequery.md).

# Tradeline

{% hint style="info" icon="lock" %}
**Authorization**

Requires user scoped authorization via session token. See the 'Session Token Authentication' section in [Enablement Services Authorization](/docs/v2.1/enablement-services/enablement-services-getting-started/enablement-services-authentication.md) guide for reference.
{% endhint %}

The `tradeline` query allows you to retrieve a specific tradeline by `ID`. These query requires authentication and requires your session token to be passed along with the request. (See how to authenticate [here](/docs/v2.1/enablement-services/enablement-services-getting-started/enablement-services-authentication.md)).

### Query

{% code title="Query" %}

```graphql
query Tradeline {
    tradeline(id: ID!) {
        id
        merchant
        category
        isOpen
        isEligible
        paymentFrequency
        serviceAddress
        servicePhone
        leaseStartDate
        utilityTypes
        serviceAddressType
        createdAt
        updatedAt
        transactions(input: { first: Int, after: String }) {
            totalCount
            edges {
                node {
                    id
                    date
                    value {
                        amount
                        currency
                    }
                }
            }
        }
    }
}

```

{% endcode %}

#### Input Attributes from Full User Query

| Attribute | Description                                                                                                                                                              |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **id**    | The unique identifier for the tradeline you are querying.                                                                                                                |
| **first** | This is a pagination parameter. (I.e. get the first `N` records). - Optional. Only required if you are wanting to query for the `transactions`as well.                   |
| **after** | This is a pagination parameter. (I.e. get the first `N`records `AFTER`this cursor). - Optional. Only required if you are wanting to query for the `transactions`as well. |

***

#### Output Attributes from Query

| Attribute              | Description                                                                                                                                    |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **id**                 | Unique identifier for the organization                                                                                                         |
| **merchant**           | Merchant Name.                                                                                                                                 |
| **category**           | The tradeline's category. See [TradelineCategory](/docs/v2.1/enablement-services/models/tradeline/tradelinecategory.md)                        |
| **isEligible**         | A boolean of whether or not the tradeline is eligible for reporting to credit bureaus. .                                                       |
| **paymentFrequency**   | How often this tradline is paid. See[PaymentFrequency](/docs/v2.1/enablement-services/models/paymentfrequency.md)                              |
| **serviceAddress**     | The address associated with the tradeline, if applicable.                                                                                      |
| **servicePhone**       | The phone number associated with the tradeline, if applicable.                                                                                 |
| **leaseStartDate**     | The least start date, if applicable.                                                                                                           |
| **utilityTypes**       | Array of the types of utility, if applicable. See [UtilityType](/docs/v2.1/enablement-services/models/utilitytype.md)                          |
| **serviceAddressType** | The type of the address that is associated with the tradeline. See [AddressType](/docs/v2.1/enablement-services/models/address/addresstype.md) |
| **createdAt**          | When this tradeline was created in the database.                                                                                               |
| **updatedAt**          | When this tradeline was last updated in the database.                                                                                          |
| **transactions**       | The transactions for this particular tradeline. See [Transactions](/docs/v2.1/enablement-services/models/transactionsconnection.md)            |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.bloomcredit.io/docs/v2.1/enablement-services/queries/tradelinequery.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
