# Get a loan snapshot's details

Get the details of a specific loan history snapshot.

Endpoint: GET /loans/{id}
Version: 1.0.0
Security: ApiKeyAuth, ApiKeySecret

## Path parameters:

  - `id` (string, required)
    The unique identifier created by Belvo used to reference the loan history record.
    Example: "7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d"

## Response 200 fields (application/json):

  - `id` (string, required)
    The unique identifier created by Belvo used to reference this loan history snapshot.

  - `loanId` (string)
    The unique identifier created by Belvo used to reference the parent loan entity.

  - `customerId` (string, required)
    The unique identifier created by Belvo used to reference the customer.

  - `paymentMethodId` (string)
    The unique identifier created by Belvo used to reference the payment method associated with this loan.

  - `merchantCustomerId` (string, required)
    Your merchant-assigned customer identifier.

  - `status` (string, required)
    The loan status. Can be either:
  - active
    The loan is currently being tracked for collection.
  - inactive
    The loan is no longer active.
    Enum: "active", "inactive"

  - `principalAmount` (string, required)
    The principal amount.

  - `totalBalance` (string, required)
    The total outstanding balance.

  - `targetCollectionDate` (string, required)
    The date Belvo will attempt to collect payment, in YYYY-MM-DD format. This date is set as either the day that the request was initially made or for the next business day.

  - `defaultDate` (string, required)
    The date that the customer defaulted on the loan, in YYYY-MM-DD format.

  - `daysOverdue` (integer)
    The number of days the loan is overdue.

  - `issueDate` (string)
    The original issue date, in YYYY-MM-DD format.

  - `loanAmount` (string)
    The original loan amount.

  - `interestAmount` (string)
    The accumulated interest amount.

  - `feesAmount` (string)
    The fees associated with the loan.

  - `latePaymentInterestAmount` (string)
    The interest accrued due to late payments.

  - `openingCommissionAmount` (string)
    The opening commission charged for the loan.

  - `yearlyOrdinalInterestRate` (string)
    The yearly interest rate, with up to 4 decimal places.

  - `customerSalary` (string)
    The customer's salary.

  - `customerAddress` (string)
    The customer's address.

  - `creditStatus` (string)
    The credit status of the loan. Can be either:
  - past_due
    Payment is past the due date.
  - restructured
    The loan has been restructured.
  - canceled
    The loan has been canceled.
  - in_arrears
    The loan is in arrears.
    Enum: "past_due", "restructured", "canceled", "in_arrears"

  - `paidInstallments` (integer)
    The number of installments already paid.

  - `paidAmount` (string)
    The total amount already paid.

  - `lastPaymentDate` (string)
    The date of the last payment.

  - `lastPaymentAmount` (string)
    The amount of the last payment.

  - `mainPhoneNumber` (string)
    The customer's main phone number.

  - `reference` (string)
    Your reference for the loan.

  - `createdDate` (string, required)
    The ISO-8601 timestamp when the loan snapshot was created in Belvo's database.

  - `lastUpdatedDate` (string, required)
    The ISO-8601 timestamp when the loan snapshot was last updated in Belvo's database.

## Response 400 fields (application/json):

  - `statusCode` (integer)
    The HTTP status code for this error.
    Example: 400

  - `error` (string)
    The HTTP status code description for this error.
    Example: "Bad Request"

  - `message` (any)
    A short description of the error, indicating what is wrong with the request.
> Note: We return either a string or an array of strings, depending on the validation error(s). 

The description can be (among others):

  - id must be a UUID
  - Not enough balance
  - amount is not a valid decimal number.
  - currency must be one of the following values: cop, mxn, usd
  - reference must be a string
  - Customer not found for merchant
  - documentType is a required field
    Example: "id must be a UUID"

## Response 401 fields (application/json):

  - `statusCode` (integer)
    The HTTP status code for this error.
    Example: 401

  - `error` (string)
    The HTTP status code description for this error.
    Example: "Unauthorized"

  - `message` (string)
    A short description of the error, indicating what is wrong with the request.
In the case of a 401 Unauthorized error, the message is:

  - Unauthorized credentials
    Example: "Unauthorized credentials"

## Response 404 fields (application/json):

  - `statusCode` (integer)
    The HTTP status code for this error.
    Example: 404

  - `error` (string)
    The HTTP status code description for this error.
    Example: "Not Found"

  - `message` (string)
    A short description of the error, indicating what is wrong with the request.
The description can be (among others):

  - Payout Target not found
  - Payment method not found
  - Customer not found
    Example: "Payout Target not found"


