---
updatedAt: 2026-01-22T13:19:12.000Z
agentTools:
  projectIndex: https://canopy-api.readme.io/v2/llms.txt
---

# Retrieve a given loan by its line_item_id.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Canopy Servicing Core API - Latest",
    "description": "**API Overview** \n Canopy allows you to easily manage credit, installment, or other more complex lending programs from a servicing and compliance perspective - whether newly launched or migrated from existing systems. Using Canopy, you can track balances and transactions for each customer of your product, both in real-time and historically. You can see how various policy and product changes would impact your customers, and readily generate compliance reports and minimize your risk with all real-time information always on hand. \n \n Canopy additionally surfaces information around all of your lending activity through its intuitive UI which provides a customer support interface as well as at-a-glance data needed for compliance and insights. \n \n Simply configure your product’s policies through our Create Product API endpoint, and then you can immediately begin adding customer accounts and relying on Canopy for accurate servicing information.",
    "termsOfService": "https://canopyservicing.com/terms/",
    "contact": {
      "email": "support@canopyservicing.com"
    },
    "version": "1.14.0-rc.2"
  },
  "x-topics": [
    {
      "title": "Getting Started",
      "content": "To create your organization within Canopy, [reach out to our sales team](https://canopyservicing.com/start). We currently do some lead qualification before granting access to our sandbox and require at least an initial meeting, but if you are clear and deliberate about your vision and objectives, we should be able to grant sandbox access quickly. Once you have sandbox access, you will receive access to a private sandbox with fully isolated single-tenant infrastructure. At this point, our team will provide you with a shared Postman collection contextualized to your developer workflow to make it very quick and easy to get started. You can also find a full guide to authenticating in Canopy in our [developer onboarding tutorial](https://learn.canopyservicing.com/dev-setup)."
    },
    {
      "title": "Pagination",
      "content": "Canopy uses a two-factor basis to drive the order of responses in `GET` requests with an array of results. They are first ordered by `effective_at` by when the entity is effective in the system, and second by an internal index to make sure the order is always universal. From the caller's perspective, you can let Canopy know where to start its pagination response by providing a `starting_after` or `ending_before` string value. If neither a `starting_after` nor `ending_before` value is provided, we'll assume you're requesting the very first page of responses. In subsequent requests, you can simply grab these values from the `paging` key in the response body from your previous request. If you're aiming to provide your users with a link to the previous page, use the `ending_before` query parameter in your next request. If going to the next page, use the `starting_after` value instead."
    },
    {
      "title": "Document Versioning",
      "content": "Canopy currently supports two methods of identifying resources in our API endpoints. Please see your [organization's features](https://docs.canopyservicing.com/doc/latest#operation-get-organization) for which document describes your implementation. \n If `strict_entity_client_id = true`, then see our latest documentation [here](https://docs.canopyservicing.com/doc/latest). \n Otherwise, please see our legacy documentation [here](https://docs.canopyservicing.com/doc/legacy)"
    }
  ],
  "servers": [
    {
      "url": "Contact sales to enable your sandbox",
      "description": "Your private sandbox environment"
    },
    {
      "url": "https://demo-api.us.canopyservicing.com",
      "description": "Demo environment"
    }
  ],
  "security": [
    {
      "oAuth2": []
    }
  ],
  "paths": {
    "/accounts/{account_id}/line_items/loans/{line_item_id}": {
      "get": {
        "tags": [
          "Loans"
        ],
        "summary": "Retrieve a given loan by its line_item_id.",
        "description": "",
        "operationId": "getLoan",
        "parameters": [
          {
            "name": "account_id",
            "in": "path",
            "description": "The ID of the account.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "example": "can_123"
            }
          },
          {
            "name": "line_item_id",
            "in": "path",
            "description": "The line_item_id of the loan.",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string",
              "example": "can_456"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Detailed info about a specific loan",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "required": [
                    "account_id",
                    "line_item_id",
                    "effective_at",
                    "created_at",
                    "loan_status",
                    "loan_terms",
                    "loan_summary"
                  ],
                  "properties": {
                    "account_id": {
                      "type": "string",
                      "description": "The account associated with the loan.",
                      "example": "can_1"
                    },
                    "line_item_id": {
                      "type": "string",
                      "description": "The ID associated with the loan line item.",
                      "example": "can_1"
                    },
                    "effective_at": {
                      "type": "string",
                      "description": "The `Date-Time` at which this loan became active.",
                      "format": "date-time",
                      "example": "2018-07-20T09:12:30+00:00"
                    },
                    "created_at": {
                      "type": "string",
                      "description": "The `Date-Time` at which this loan was created.",
                      "format": "date-time",
                      "example": "2018-06-20T09:12:30+00:00"
                    },
                    "loan_status": {
                      "type": "string",
                      "description": "The current status of the loan line item. Note that this is a system generated status only and cannot be changed.",
                      "enum": [
                        "VALID",
                        "INVALID"
                      ],
                      "example": "VALID"
                    },
                    "description": {
                      "type": "string",
                      "description": "The description associated to the loan.",
                      "example": "House mortgage"
                    },
                    "notes": {
                      "type": "string",
                      "description": "Any notes associated to the loan.",
                      "example": "Customer requested more favorable terms"
                    },
                    "restructured_to_line_item_id": {
                      "type": "string",
                      "description": "The line item ID of the new loan, if this loan has been restructured.",
                      "example": "can_1"
                    },
                    "restructured_at": {
                      "type": "string",
                      "description": "The `Date-Time` at which this loan was restructured.",
                      "format": "date-time",
                      "example": "2018-07-20T09:12:30+00:00"
                    },
                    "restructured_from_line_item_ids": {
                      "type": "array",
                      "description": "If this loan is the result of a restructure, this is the line item ID(s) of the original loan(s).",
                      "items": {
                        "type": "string",
                        "example": [
                          "can_123",
                          "can_456"
                        ]
                      }
                    },
                    "loan_creation_payload": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "original_amount_cents",
                        "am_len"
                      ],
                      "properties": {
                        "line_item_id": {
                          "type": "string",
                          "pattern": "^(?!can_).*$",
                          "description": "The ID associated to be with the line item for future requests. If not provided on line item creation, Canopy will generate this field.",
                          "example": "0x1234"
                        },
                        "line_item_status": {
                          "type": "string",
                          "description": "The status of a line item.",
                          "enum": [
                            "VALID",
                            "INVALID",
                            "OFFSET",
                            "PENDING",
                            "AUTHORIZED",
                            "DECLINED",
                            "VOID",
                            "POSTED"
                          ],
                          "example": "VALID",
                          "default": "VALID"
                        },
                        "original_amount_cents": {
                          "type": "integer",
                          "description": "The amount charged (in cents).",
                          "example": 200,
                          "default": 0
                        },
                        "interest_policies": {
                          "type": "object",
                          "nullable": true,
                          "description": "Policies for interest on this specific line item.",
                          "properties": {
                            "interest_percent": {
                              "type": "number",
                              "description": "Annual interest in percentage.",
                              "default": 0,
                              "example": 2.34
                            },
                            "is_limited_to_loan_duration": {
                              "type": "boolean",
                              "description": "If true, loan interest will only accrue for the expected duration of the loan. Otherwise, interest will accrue as long as there is an outstanding balance.",
                              "default": false,
                              "example": true
                            }
                          }
                        },
                        "effective_at": {
                          "type": "string",
                          "description": "The `Date-Time` that the charge is made applicable to the account. Note that loans always follow the statement cycle of the related account, meaning the first cycle will become due at the time of the statement most closely following this `effective_at`.",
                          "format": "date-time",
                          "example": "2020-07-20T09:11:28+00:00"
                        },
                        "min_pay_type": {
                          "type": "string",
                          "enum": [
                            "AM",
                            "AM_INTEREST"
                          ],
                          "description": "Only applicable to `LOAN` type line_items. Optionally override the `min_pay_type` for this loan. For the minimum payment to include principal and interest each cycle, use `AM`. For the minimum payment to include only accrued interest for all cycles except the final cycle, and all principal and accrued interest in the final cycle, use `AM_INTEREST`. If not included, the loan will use the Account's `min_pay_type` value.",
                          "example": "AM",
                          "nullable": true
                        },
                        "am_len": {
                          "type": "integer",
                          "description": "For amortizing line items (loans), the number of cycles over which the line item amortizes.",
                          "example": 4
                        },
                        "description": {
                          "type": "string",
                          "description": "A description for the Loan",
                          "example": "Personal LOC Draw"
                        },
                        "fee_policies": {
                          "type": "object",
                          "nullable": true,
                          "description": "Policies for an origination fee related to this loan",
                          "properties": {
                            "origination_fee_cents": {
                              "type": "integer",
                              "description": "The fee charged at the time of loan origination",
                              "default": 0,
                              "example": 2000
                            },
                            "origination_fee_percent": {
                              "type": "number",
                              "description": "The fee as a percent of `initial_principal_cents` charged at the time of loan origination",
                              "default": 0,
                              "example": 2.34
                            },
                            "is_origination_fee_lesser_value": {
                              "type": "boolean",
                              "description": "If this flag is `false`, the default, the origination fee will be assessed as the greater value of `origination_fee_cents` and `origination_fee_percent / 100 * initial_principal_cents`. If this flag is `true`, not the default, the origination fee will be assessed as the lesser value of `origination_fee_cents` and `origination_fee_percent / 100 * initial_principal_cents`.",
                              "default": false
                            }
                          }
                        },
                        "merchant_data": {
                          "type": "object",
                          "nullable": true,
                          "description": "",
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            },
                            "mcc_code": {
                              "type": "string"
                            },
                            "phone_number": {
                              "type": "string"
                            }
                          }
                        },
                        "issuer_processor_metadata": {
                          "type": "object",
                          "properties": {
                            "lithic": {
                              "type": "object",
                              "properties": {
                                "last_four": {
                                  "type": "string",
                                  "description": "Last four digits of the card against which the spend was made."
                                }
                              }
                            }
                          }
                        },
                        "external_fields": {
                          "anyOf": [
                            {
                              "type": "array",
                              "maxItems": 1000,
                              "nullable": true,
                              "description": "An Array of External Fields. These should be used to connect entities created in Canopy to data in your system and any connected external systems.",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "key": {
                                    "type": "string",
                                    "description": "key: key for the external field",
                                    "example": "external_id"
                                  },
                                  "value": {
                                    "type": "string",
                                    "description": "value: i.e. an External Account ID",
                                    "example": "22445702-a389-431f-927d-07b8d0750787"
                                  }
                                },
                                "required": [
                                  "key"
                                ]
                              }
                            },
                            {
                              "type": "object",
                              "maxItems": 1000,
                              "nullable": true,
                              "description": "A JSON Object."
                            }
                          ]
                        }
                      }
                    },
                    "loan_terms": {
                      "type": "object",
                      "required": [
                        "am_len"
                      ],
                      "properties": {
                        "min_pay_type": {
                          "type": "string",
                          "enum": [
                            "AM",
                            "AM_INTEREST"
                          ],
                          "description": "Only applicable to `LOAN` type line_items. Optionally override the `min_pay_type` for this loan. For the minimum payment to include principal and interest each cycle, use `AM`. For the minimum payment to include only accrued interest for all cycles except the final cycle, and all principal and accrued interest in the final cycle, use `AM_INTEREST`. If not included, the loan will use the Account's `min_pay_type` value.",
                          "example": "AM",
                          "nullable": true
                        },
                        "am_len": {
                          "type": "integer",
                          "description": "For amortizing line items (loans), the number of cycles over which the line item amortizes.",
                          "example": 4
                        },
                        "origination_fee_cents": {
                          "type": "integer",
                          "description": "The fee charged at the time of account origination",
                          "default": 0,
                          "example": 2000
                        },
                        "interest_policies": {
                          "type": "array",
                          "description": "If this loan is the result of a restructure, this is the line item ID(s) of the original loan(s).",
                          "items": {
                            "type": "object",
                            "required": [
                              "interest_percent",
                              "interest_effective_inclusive_start",
                              "interest_effective_exclusive_end"
                            ],
                            "properties": {
                              "interest_percent": {
                                "type": "number",
                                "description": "Annual interest in percentage.",
                                "default": 0,
                                "example": 2.34
                              },
                              "interest_effective_inclusive_start": {
                                "type": "string",
                                "description": "The `Date-Time` at which this interest rate became active.",
                                "format": "date-time",
                                "example": "2018-07-20T09:12:30+00:00"
                              },
                              "interest_effective_exclusive_end": {
                                "type": "string",
                                "description": "The `Date-Time` at which this interest rate was no longer active.",
                                "format": "date-time",
                                "example": "2018-08-20T09:12:30+00:00"
                              }
                            }
                          }
                        }
                      }
                    },
                    "loan_summary": {
                      "type": "object",
                      "required": [
                        "original_amount_cents",
                        "total_repayment_cents",
                        "balance_cents",
                        "principal_balance_cents",
                        "interest_balance_cents",
                        "fee_balance_cents",
                        "total_principal_paid_to_date_cents",
                        "total_interest_paid_to_date_cents",
                        "total_fees_paid_to_date_cents"
                      ],
                      "properties": {
                        "original_amount_cents": {
                          "type": "integer",
                          "description": "The total amount of principal at the time the loan was originated.",
                          "example": 2484
                        },
                        "total_repayment_cents": {
                          "type": "integer",
                          "description": "The total amount including fees and interest that a borrower has to pay for a loan.",
                          "example": 3600
                        },
                        "balance_cents": {
                          "type": "integer",
                          "description": "The total sum of balances related to this loan.",
                          "example": 3600
                        },
                        "principal_balance_cents": {
                          "type": "integer",
                          "description": "The remaining unpaid portion of principal on this loan.",
                          "example": 2400
                        },
                        "interest_balance_cents": {
                          "type": "integer",
                          "description": "The remaining unpaid portion of all interest specific to this loan.",
                          "example": 1100
                        },
                        "fee_balance_cents": {
                          "type": "integer",
                          "description": "The remaining unpaid portion of all fees specific to this loan.",
                          "example": 0
                        },
                        "total_principal_paid_to_date_cents": {
                          "type": "integer",
                          "description": "The total amount of payments, including balance reducing line items such as debit offsets, that have poured to principal balances on this loan.",
                          "example": -1600
                        },
                        "total_interest_paid_to_date_cents": {
                          "type": "integer",
                          "description": "The total amount of payments, including balance reducing line items such as debit offsets, that have poured to interest balances on this loan.",
                          "example": -16
                        },
                        "total_fees_paid_to_date_cents": {
                          "type": "integer",
                          "description": "The total amount of payments, including balance reducing line items such as debit offsets, that have poured to fees balances on this loan..",
                          "example": -100
                        },
                        "loan_paid_off_date": {
                          "type": "string",
                          "description": "The `Date-Time` at which all obligations on the loan were paid in full. Note that this value may change based on activity on the loan, such as the case of a payment reversal.",
                          "format": "date-time",
                          "example": "2018-07-20T09:12:30+00:00"
                        }
                      }
                    },
                    "external_fields": {
                      "anyOf": [
                        {
                          "type": "array",
                          "maxItems": 1000,
                          "nullable": true,
                          "description": "An Array of External Fields. These should be used to connect entities created in Canopy to data in your system and any connected external systems.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "key": {
                                "type": "string",
                                "description": "key: key for the external field",
                                "example": "external_id"
                              },
                              "value": {
                                "type": "string",
                                "description": "value: i.e. an External Account ID",
                                "example": "22445702-a389-431f-927d-07b8d0750787"
                              }
                            },
                            "required": [
                              "key"
                            ]
                          }
                        },
                        {
                          "type": "object",
                          "maxItems": 1000,
                          "nullable": true,
                          "description": "A JSON Object."
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized."
          },
          "403": {
            "description": "Forbidden."
          },
          "404": {
            "description": "Account not found."
          },
          "422": {
            "description": "Invalid input."
          },
          "429": {
            "description": "Too many requests."
          },
          "default": {
            "description": "Unexpected Error."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oAuth2": {
        "type": "oauth2",
        "description": "This API uses OAuth 2 with the Resource Owner Password grant flow for human access and the Client Credentials grant flow for programmatic access.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://dev-fi8iwkk1.us.auth0.com/oauth/token",
            "scopes": {}
          },
          "password": {
            "tokenUrl": "https://dev-fi8iwkk1.us.auth0.com/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  }
}
```