---
updatedAt: 2026-05-28T11:38:46.000Z
agentTools:
  projectIndex: https://developer.sivo.com/llms.txt
---

# Create a Loan

Create a new loan, or update an existing loan if it exists.

When you send loans to Sivo, it is important to send the records for all your portfolio and not just the ones that are pledged to Sivo. This allows for calculation of key portfolio metrics that are required by our risk team.\
You use the `funded_by` property to indicate how a loan is funded:

* **sivo** means that this loan is funded by a Sivo debt line
* **balance\_sheet** means that the loan is funded by your company's balance sheet (i.e. with equity)
* **other** means that the loan is funded by another capital source

Loans funded by Sivo require that you provide the appropriate ID of the debt line that they are pledged to (see `debt_line_id` below). You can obtain this id from the Sivo dashboard, by navigating to the appropriate debt line.

![](https://files.readme.io/957a803-Screenshot_2022-11-18_at_1.21.30_PM.png)

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Banking",
    "description": "SIVO public Api REST",
    "version": "0.0.1"
  },
  "x-amazon-apigateway-api-key-source": "AUTHORIZER",
  "servers": [
    {
      "url": "https://dev.sivo.com/v1",
      "description": "Sandbox server (user test data)"
    }
  ],
  "paths": {
    "/loans": {
      "post": {
        "summary": "Create a Loan",
        "description": "Create a new loan, or update an existing loan if it exists.",
        "operationId": "postLoan",
        "tags": [
          "Loans and Cards"
        ],
        "requestBody": {
          "description": "Create a loan",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/receivable"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/savedReceivable"
                }
              }
            }
          },
          "405": {
            "description": "Invalid input"
          }
        },
        "security": [
          {
            "prod-sandbox-sivo-api-authorizer": [
              "aws.cognito.signin.user.admin"
            ]
          }
        ],
        "x-amazon-apigateway-integration": {
          "httpMethod": "POST",
          "type": "AWS_PROXY",
          "uri": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/${Token[TOKEN.2317]}:Alias/invocations"
        }
      }
    }
  },
  "components": {
    "schemas": {
      "moneyAmount": {
        "type": "integer",
        "description": "See [Money](https://developer.sivo.com/reference/money) for details"
      },
      "currencyIso4217": {
        "type": "string",
        "description": "A currency identifier in ISO-4217 format",
        "pattern": "^[A-Z]{3}$"
      },
      "text": {
        "type": "string",
        "minLength": 1
      },
      "dateTimeIso8601": {
        "type": "string",
        "description": "See [Dates and Times](https://developer.sivo.com/reference/dates-and-times) for details",
        "format": "date-time"
      },
      "integer": {
        "type": "integer",
        "minimum": 0,
        "maximum": 2147483647
      },
      "dateIso8601": {
        "type": "string",
        "description": "See [Dates and Times](https://developer.sivo.com/reference/dates-and-times) for details",
        "format": "date"
      },
      "bool": {
        "type": "boolean",
        "description": "A boolean value"
      },
      "percentAmount": {
        "type": "number",
        "description": "Should be a value between 0 and 1. For example, 0.05 represents 5%",
        "minimum": -10,
        "maximum": 10
      },
      "fundedBy": {
        "type": "string",
        "enum": [
          "sivo",
          "balance_sheet",
          "other"
        ]
      },
      "periodicFee": {
        "type": "object",
        "properties": {
          "cycle_type": {
            "$ref": "#/components/schemas/cycleType",
            "description": "How often does the borrower pay for this fee."
          },
          "amount": {
            "$ref": "#/components/schemas/moneyAmount",
            "description": "Fee amount that is paid by the borrower on each period. See [Money](https://developer.sivo.com/reference/money) for details"
          }
        },
        "required": [
          "cycle_type",
          "amount"
        ],
        "additionalProperties": false
      },
      "cycleType": {
        "type": "string",
        "pattern": "^\\d+ (day|week|month|year)s?$"
      },
      "loan": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "receivable_type": {
            "type": "string",
            "enum": [
              "loan"
            ],
            "description": "The type of receivable"
          },
          "delinquent_days": {
            "$ref": "#/components/schemas/integer",
            "description": "If the loan has overdue payments, indicate the number of days that have passed since the due date. Set to zero if the loan does not have overdue payments."
          },
          "delinquent_amount": {
            "$ref": "#/components/schemas/moneyAmount",
            "description": "If the loan has overdue payments, indicate the total amount that is overdue. Set to zero if the loan does not have overdue payments. See [Money](https://developer.sivo.com/reference/money) for details"
          },
          "delinquent_times": {
            "$ref": "#/components/schemas/integer",
            "description": "Indicate how many times has the loan had overdue payments. This value should be provided even if the loan is currently up-to-date with its payments. Set to zero if the loan has never had overdue payments."
          },
          "interest_rate": {
            "$ref": "#/components/schemas/percentAmount",
            "description": "The annual interest rate charged on outstanding principal. Leave empty if the loan does not charge any interest. Should be a value between 0 and 1. For example, 0.05 represents 5%"
          },
          "credit_limit": {
            "$ref": "#/components/schemas/moneyAmount",
            "description": "If the loan allows for multiple draws or disbursements (e.g. credit cards, line of credit), indicate what is the credit limit. Leave empty if the loan only has a single disbursement. See [Money](https://developer.sivo.com/reference/money) for details"
          },
          "payment_frequency": {
            "$ref": "#/components/schemas/cycleType",
            "description": "How often are payments expected from borrower."
          },
          "credit_type": {
            "$ref": "#/components/schemas/creditTypez93l",
            "description": "The credit type"
          },
          "id": {
            "$ref": "#/components/schemas/text",
            "description": "You need to provide your own ID for the loan. This ID must be unique across all your loans."
          },
          "funded_by": {
            "$ref": "#/components/schemas/fundedBy",
            "description": "Indicates whether this loan is funded by sivo, your own balance sheet, or a third party capital source"
          },
          "program": {
            "$ref": "#/components/schemas/text",
            "description": "The name or identifier of the program associated with this receivable. This is useful if you need to report receivables for programs that sivo would not fund, or if you have different debt lines for different programs."
          },
          "fund_name": {
            "$ref": "#/components/schemas/text",
            "description": "If the loan is funded by another capital source, provide its name."
          },
          "borrower_id": {
            "$ref": "#/components/schemas/text",
            "description": "The borrower associated with this loan."
          },
          "origination_date": {
            "$ref": "#/components/schemas/dateIso8601",
            "description": "The date on which this loan was originated. See [Dates and Times](https://developer.sivo.com/reference/dates-and-times) for details"
          },
          "origination_fee": {
            "$ref": "#/components/schemas/moneyAmount",
            "description": "The origination fee that was charged to the borrower. Leave empty if you don't have origination fees. See [Money](https://developer.sivo.com/reference/money) for details"
          },
          "periodic_fee": {
            "$ref": "#/components/schemas/periodicFee",
            "description": "Periodic fees paid by the borrower. Leave empty if the loan has no periodic fees."
          },
          "collateral": {
            "$ref": "#/components/schemas/collateralAssetTypexnua",
            "description": "The type of collateral used to secure this loan. Leave empty if the loan is unsecured."
          },
          "term": {
            "$ref": "#/components/schemas/cycleType",
            "description": "The term for this loan. Leave empty for revolving loans like credit cards or lines of credit."
          },
          "currency": {
            "$ref": "#/components/schemas/currencyIso4217",
            "description": "The currency of the loan. A currency identifier in ISO-4217 format"
          }
        },
        "required": [
          "borrower_id",
          "credit_type",
          "currency",
          "delinquent_amount",
          "delinquent_days",
          "delinquent_times",
          "funded_by",
          "id",
          "origination_date",
          "receivable_type"
        ]
      },
      "lease": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "receivable_type": {
            "type": "string",
            "enum": [
              "lease"
            ],
            "description": "The type of receivable"
          },
          "initial_value": {
            "$ref": "#/components/schemas/moneyAmount",
            "description": "The value of the asset at the time that the lease started. See [Money](https://developer.sivo.com/reference/money) for details"
          },
          "purchase_price": {
            "$ref": "#/components/schemas/moneyAmount",
            "description": "The amount paid to purchase the asset. See [Money](https://developer.sivo.com/reference/money) for details"
          },
          "discount": {
            "$ref": "#/components/schemas/percentAmount",
            "description": "The discount applied to this lease. Should be a value between 0 and 1. For example, 0.05 represents 5%"
          },
          "is_idle": {
            "$ref": "#/components/schemas/bool",
            "description": "Is this asset currently leased?. A boolean value"
          },
          "id": {
            "$ref": "#/components/schemas/text",
            "description": "You need to provide your own ID for the loan. This ID must be unique across all your loans."
          },
          "funded_by": {
            "$ref": "#/components/schemas/fundedBy",
            "description": "Indicates whether this loan is funded by sivo, your own balance sheet, or a third party capital source"
          },
          "program": {
            "$ref": "#/components/schemas/text",
            "description": "The name or identifier of the program associated with this receivable. This is useful if you need to report receivables for programs that sivo would not fund, or if you have different debt lines for different programs."
          },
          "fund_name": {
            "$ref": "#/components/schemas/text",
            "description": "If the loan is funded by another capital source, provide its name."
          },
          "borrower_id": {
            "$ref": "#/components/schemas/text",
            "description": "The borrower associated with this loan."
          },
          "origination_date": {
            "$ref": "#/components/schemas/dateIso8601",
            "description": "The date on which this loan was originated. See [Dates and Times](https://developer.sivo.com/reference/dates-and-times) for details"
          },
          "origination_fee": {
            "$ref": "#/components/schemas/moneyAmount",
            "description": "The origination fee that was charged to the borrower. Leave empty if you don't have origination fees. See [Money](https://developer.sivo.com/reference/money) for details"
          },
          "periodic_fee": {
            "$ref": "#/components/schemas/periodicFee",
            "description": "Periodic fees paid by the borrower. Leave empty if the loan has no periodic fees."
          },
          "collateral": {
            "$ref": "#/components/schemas/collateralAssetTypexnua",
            "description": "The type of collateral used to secure this loan. Leave empty if the loan is unsecured."
          },
          "term": {
            "$ref": "#/components/schemas/cycleType",
            "description": "The term for this loan. Leave empty for revolving loans like credit cards or lines of credit."
          },
          "currency": {
            "$ref": "#/components/schemas/currencyIso4217",
            "description": "The currency of the loan. A currency identifier in ISO-4217 format"
          }
        },
        "required": [
          "borrower_id",
          "currency",
          "discount",
          "funded_by",
          "id",
          "initial_value",
          "is_idle",
          "origination_date",
          "purchase_price",
          "receivable_type"
        ]
      },
      "receivable": {
        "type": "object",
        "discriminator": {
          "propertyName": "receivable_type"
        },
        "required": [
          "receivable_type"
        ],
        "oneOf": [
          {
            "$ref": "#/components/schemas/loan"
          },
          {
            "$ref": "#/components/schemas/lease"
          }
        ]
      },
      "savedReceivable": {
        "anyOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "created_at": {
                "$ref": "#/components/schemas/dateTimeIso8601"
              },
              "updated_at": {
                "$ref": "#/components/schemas/dateTimeIso8601"
              },
              "receivable_type": {
                "type": "string",
                "enum": [
                  "loan"
                ],
                "description": "The type of receivable"
              },
              "delinquent_days": {
                "$ref": "#/components/schemas/integer",
                "description": "If the loan has overdue payments, indicate the number of days that have passed since the due date. Set to zero if the loan does not have overdue payments."
              },
              "delinquent_amount": {
                "$ref": "#/components/schemas/moneyAmount",
                "description": "If the loan has overdue payments, indicate the total amount that is overdue. Set to zero if the loan does not have overdue payments."
              },
              "delinquent_times": {
                "$ref": "#/components/schemas/integer",
                "description": "Indicate how many times has the loan had overdue payments. This value should be provided even if the loan is currently up-to-date with its payments. Set to zero if the loan has never had overdue payments."
              },
              "interest_rate": {
                "$ref": "#/components/schemas/percentAmount",
                "description": "The annual interest rate charged on outstanding principal. Leave empty if the loan does not charge any interest."
              },
              "credit_limit": {
                "$ref": "#/components/schemas/moneyAmount",
                "description": "If the loan allows for multiple draws or disbursements (e.g. credit cards, line of credit), indicate what is the credit limit. Leave empty if the loan only has a single disbursement."
              },
              "payment_frequency": {
                "$ref": "#/components/schemas/cycleType",
                "description": "How often are payments expected from borrower."
              },
              "credit_type": {
                "$ref": "#/components/schemas/creditTypez93l",
                "description": "The credit type"
              },
              "id": {
                "$ref": "#/components/schemas/text",
                "description": "You need to provide your own ID for the loan. This ID must be unique across all your loans."
              },
              "funded_by": {
                "$ref": "#/components/schemas/fundedBy",
                "description": "Indicates whether this loan is funded by sivo, your own balance sheet, or a third party capital source"
              },
              "program": {
                "$ref": "#/components/schemas/text",
                "description": "The name or identifier of the program associated with this receivable. This is useful if you need to report receivables for programs that sivo would not fund, or if you have different debt lines for different programs"
              },
              "fund_name": {
                "$ref": "#/components/schemas/text",
                "description": "If the loan is funded by another capital source, provide its name"
              },
              "borrower_id": {
                "$ref": "#/components/schemas/text",
                "description": "The borrower associated with this loan"
              },
              "origination_date": {
                "$ref": "#/components/schemas/dateIso8601",
                "description": "The date on which this loan was originated"
              },
              "origination_fee": {
                "$ref": "#/components/schemas/moneyAmount",
                "description": "The origination fee that was charged to the borrower. Leave empty if you don't have origination fees."
              },
              "periodic_fee": {
                "$ref": "#/components/schemas/periodicFee",
                "description": "Periodic fees paid by the borrower. Leave empty if the loan has no periodic fees."
              },
              "collateral": {
                "$ref": "#/components/schemas/collateralAssetTypexnua",
                "description": "The type of collateral used to secure this loan. Leave empty if the loan is unsecured."
              },
              "term": {
                "$ref": "#/components/schemas/cycleType",
                "description": "The term for this loan. Leave empty for revolving loans like credit cards or lines of credit."
              },
              "currency": {
                "$ref": "#/components/schemas/currencyIso4217",
                "description": "The currency of the loan"
              }
            },
            "required": [
              "borrower_id",
              "created_at",
              "credit_type",
              "currency",
              "delinquent_amount",
              "delinquent_days",
              "delinquent_times",
              "funded_by",
              "id",
              "origination_date",
              "receivable_type",
              "updated_at"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "created_at": {
                "$ref": "#/components/schemas/dateTimeIso8601"
              },
              "updated_at": {
                "$ref": "#/components/schemas/dateTimeIso8601"
              },
              "receivable_type": {
                "type": "string",
                "enum": [
                  "lease"
                ],
                "description": "The type of receivable"
              },
              "initial_value": {
                "$ref": "#/components/schemas/moneyAmount",
                "description": "The value of the asset at the time that the lease started"
              },
              "purchase_price": {
                "$ref": "#/components/schemas/moneyAmount",
                "description": "The amount paid to purchase the asset"
              },
              "discount": {
                "$ref": "#/components/schemas/percentAmount",
                "description": "The discount applied to this lease"
              },
              "is_idle": {
                "$ref": "#/components/schemas/bool",
                "description": "Is this asset currently leased?"
              },
              "id": {
                "$ref": "#/components/schemas/text",
                "description": "You need to provide your own ID for the loan. This ID must be unique across all your loans."
              },
              "funded_by": {
                "$ref": "#/components/schemas/fundedBy",
                "description": "Indicates whether this loan is funded by sivo, your own balance sheet, or a third party capital source"
              },
              "program": {
                "$ref": "#/components/schemas/text",
                "description": "The name or identifier of the program associated with this receivable. This is useful if you need to report receivables for programs that sivo would not fund, or if you have different debt lines for different programs"
              },
              "fund_name": {
                "$ref": "#/components/schemas/text",
                "description": "If the loan is funded by another capital source, provide its name"
              },
              "borrower_id": {
                "$ref": "#/components/schemas/text",
                "description": "The borrower associated with this loan"
              },
              "origination_date": {
                "$ref": "#/components/schemas/dateIso8601",
                "description": "The date on which this loan was originated"
              },
              "origination_fee": {
                "$ref": "#/components/schemas/moneyAmount",
                "description": "The origination fee that was charged to the borrower. Leave empty if you don't have origination fees."
              },
              "periodic_fee": {
                "$ref": "#/components/schemas/periodicFee",
                "description": "Periodic fees paid by the borrower. Leave empty if the loan has no periodic fees."
              },
              "collateral": {
                "$ref": "#/components/schemas/collateralAssetTypexnua",
                "description": "The type of collateral used to secure this loan. Leave empty if the loan is unsecured."
              },
              "term": {
                "$ref": "#/components/schemas/cycleType",
                "description": "The term for this loan. Leave empty for revolving loans like credit cards or lines of credit."
              },
              "currency": {
                "$ref": "#/components/schemas/currencyIso4217",
                "description": "The currency of the loan"
              }
            },
            "required": [
              "borrower_id",
              "created_at",
              "currency",
              "discount",
              "funded_by",
              "id",
              "initial_value",
              "is_idle",
              "origination_date",
              "purchase_price",
              "receivable_type",
              "updated_at"
            ]
          }
        ]
      },
      "collateralAssetTypexnua": {
        "type": "string",
        "enum": [
          "cash",
          "vehicle",
          "equipment",
          "all_business_assets",
          "receivables",
          "residential_property",
          "commercial_property",
          "other"
        ]
      },
      "creditTypez93l": {
        "type": "string",
        "enum": [
          "term_loan",
          "line_of_credit",
          "buy_now_pay_later",
          "credit_card",
          "invoice_factoring",
          "revenue_based_financing",
          "earned_wage_access",
          "leasing"
        ]
      }
    },
    "securitySchemes": {
      "prod-sandbox-sivo-api-authorizer": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-amazon-apigateway-authtype": "cognito_user_pools",
        "x-amazon-apigateway-authorizer": {
          "type": "cognito_user_pools",
          "providerARNs": [
            "${Token[TOKEN.1762]}"
          ]
        }
      }
    }
  },
  "x-amazon-apigateway-minimum-compression-size": 0
}
```