Skip to content

API reference

Proata API 1.0.0

Pro-rata federal loan calculator API implementing RISE NPRM §685.203(m)(1). See https://docs.loanlimit.app for documentation.


Contact: api@desata.io

Servers

Description URL
Production https://loanlimit.app

Endpoints


POST /v1/calculate

Calculate prorated loan limits for one student

Request body

=== "application/json"

```json
{
    "academic_year_terms": null,
    "cost_of_attendance": null,
    "degree_level": "undergraduate",
    "dependency_status": "dependent",
    "grade_level": null,
    "is_legacy_borrower": true,
    "plus_denied": true,
    "subsidized_amount": null,
    "terms": [
        {
            "actual_final_credits": null,
            "credits_enrolled": null,
            "full_time_credits": null,
            "label": "string",
            "prior_disbursement_grad_plus": null,
            "prior_disbursement_sub": null,
            "prior_disbursement_unsub": null
        }
    ],
    "total_limit": null
}
```
<span class="small-note">⚠️</span>&nbsp;<em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em>



??? hint "Schema of the request body"
    ```json
    {
        "properties": {
            "academic_year_terms": {
                "anyOf": [
                    {
                        "maximum": 4,
                        "minimum": 2,
                        "type": "integer"
                    },
                    {
                        "type": "null"
                    }
                ],
                "default": null,
                "title": "Academic Year Terms"
            },
            "cost_of_attendance": {
                "anyOf": [
                    {
                        "type": "number"
                    },
                    {
                        "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                        "type": "string"
                    },
                    {
                        "type": "null"
                    }
                ],
                "default": null,
                "title": "Cost Of Attendance"
            },
            "degree_level": {
                "default": "undergraduate",
                "enum": [
                    "undergraduate",
                    "graduate",
                    "professional"
                ],
                "title": "Degree Level",
                "type": "string"
            },
            "dependency_status": {
                "enum": [
                    "dependent",
                    "independent"
                ],
                "title": "Dependency Status",
                "type": "string"
            },
            "grade_level": {
                "anyOf": [
                    {
                        "enum": [
                            "first_year",
                            "second_year",
                            "third_year_and_beyond"
                        ],
                        "type": "string"
                    },
                    {
                        "type": "null"
                    }
                ],
                "default": null,
                "title": "Grade Level"
            },
            "is_legacy_borrower": {
                "default": false,
                "title": "Is Legacy Borrower",
                "type": "boolean"
            },
            "plus_denied": {
                "default": false,
                "title": "Plus Denied",
                "type": "boolean"
            },
            "subsidized_amount": {
                "anyOf": [
                    {
                        "minimum": 0.0,
                        "type": "number"
                    },
                    {
                        "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                        "type": "string"
                    }
                ],
                "default": "0",
                "title": "Subsidized Amount"
            },
            "terms": {
                "items": {
                    "$ref": "#/components/schemas/Term"
                },
                "title": "Terms",
                "type": "array"
            },
            "total_limit": {
                "anyOf": [
                    {
                        "exclusiveMinimum": 0.0,
                        "type": "number"
                    },
                    {
                        "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                        "type": "string"
                    },
                    {
                        "type": "null"
                    }
                ],
                "default": null,
                "title": "Total Limit"
            }
        },
        "required": [
            "dependency_status",
            "terms"
        ],
        "title": "CalculationRequest",
        "type": "object"
    }
    ```

Responses

=== "200 OK"

=== "application/json"


    ```json
    {
        "annual_basic_eligibility_grad_plus": 0,
        "annual_basic_eligibility_sub": 0,
        "annual_basic_eligibility_unsub": 0,
        "annual_ft_credits": null,
        "reduced_annual_pct": 0,
        "show_both_options": true,
        "terms": [
            {
                "adjustment_explanation": "string",
                "adjustment_grad_plus": 0,
                "adjustment_source_index": null,
                "adjustment_sub": 0,
                "adjustment_unsub": 0,
                "credits_enrolled": null,
                "disbursement_pct": 0,
                "enrollment_intensity_pct": 0,
                "enrollment_status": "string",
                "equal": {
                    "grad_plus": 0,
                    "subsidized": 0,
                    "unsubsidized": 0
                },
                "final_term_overdisbursement": true,
                "full_time_credits": null,
                "label": "string",
                "proportional": null,
                "warning": "string"
            }
        ],
        "total_equal": null,
        "total_proportional": null,
        "warnings": [
            "string"
        ]
    }
    ```
    <span class="small-note">⚠️</span>&nbsp;<em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em>



    ??? hint "Schema of the response body"
        ```json
        {
            "properties": {
                "annual_basic_eligibility_grad_plus": {
                    "default": 0,
                    "title": "Annual Basic Eligibility Grad Plus",
                    "type": "integer"
                },
                "annual_basic_eligibility_sub": {
                    "title": "Annual Basic Eligibility Sub",
                    "type": "integer"
                },
                "annual_basic_eligibility_unsub": {
                    "title": "Annual Basic Eligibility Unsub",
                    "type": "integer"
                },
                "annual_ft_credits": {
                    "anyOf": [
                        {
                            "type": "number"
                        },
                        {
                            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                            "type": "string"
                        }
                    ],
                    "title": "Annual Ft Credits"
                },
                "reduced_annual_pct": {
                    "title": "Reduced Annual Pct",
                    "type": "integer"
                },
                "show_both_options": {
                    "title": "Show Both Options",
                    "type": "boolean"
                },
                "terms": {
                    "items": {
                        "$ref": "#/components/schemas/TermResult"
                    },
                    "title": "Terms",
                    "type": "array"
                },
                "total_equal": {
                    "$ref": "#/components/schemas/DisbursementOption"
                },
                "total_proportional": {
                    "$ref": "#/components/schemas/DisbursementOption"
                },
                "warnings": {
                    "items": {
                        "type": "string"
                    },
                    "title": "Warnings",
                    "type": "array"
                }
            },
            "required": [
                "annual_ft_credits",
                "reduced_annual_pct",
                "annual_basic_eligibility_sub",
                "annual_basic_eligibility_unsub",
                "terms",
                "total_equal",
                "total_proportional",
                "show_both_options",
                "warnings"
            ],
            "title": "CalculationResult",
            "type": "object"
        }
        ```

=== "400 Bad Request"

=== "application/json"


    ```json
    {
        "code": "invalid_json",
        "message": "string"
    }
    ```
    <span class="small-note">⚠️</span>&nbsp;<em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em>



    ??? hint "Schema of the response body"
        ```json
        {
            "description": "Standard error envelope for v1 responses.",
            "properties": {
                "code": {
                    "enum": [
                        "invalid_json",
                        "unsupported_media_type",
                        "validation_error",
                        "internal_error",
                        "unauthenticated",
                        "invalid_token",
                        "expired_token",
                        "revoked_token",
                        "quota_exceeded"
                    ],
                    "title": "Code",
                    "type": "string"
                },
                "message": {
                    "title": "Message",
                    "type": "string"
                }
            },
            "required": [
                "code",
                "message"
            ],
            "title": "Error",
            "type": "object"
        }
        ```

=== "415 Unsupported Media Type"

=== "application/json"


    ```json
    {
        "code": "invalid_json",
        "message": "string"
    }
    ```
    <span class="small-note">⚠️</span>&nbsp;<em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em>



    ??? hint "Schema of the response body"
        ```json
        {
            "description": "Standard error envelope for v1 responses.",
            "properties": {
                "code": {
                    "enum": [
                        "invalid_json",
                        "unsupported_media_type",
                        "validation_error",
                        "internal_error",
                        "unauthenticated",
                        "invalid_token",
                        "expired_token",
                        "revoked_token",
                        "quota_exceeded"
                    ],
                    "title": "Code",
                    "type": "string"
                },
                "message": {
                    "title": "Message",
                    "type": "string"
                }
            },
            "required": [
                "code",
                "message"
            ],
            "title": "Error",
            "type": "object"
        }
        ```

=== "422 Unprocessable Content"

=== "application/json"



    ??? hint "Schema of the response body"
        ```json
        {
            "oneOf": [
                {
                    "$ref": "#/components/schemas/FieldValidationErrorBody"
                },
                {
                    "$ref": "#/components/schemas/Error"
                }
            ]
        }
        ```

=== "500 Internal Server Error"

=== "application/json"


    ```json
    {
        "code": "invalid_json",
        "message": "string"
    }
    ```
    <span class="small-note">⚠️</span>&nbsp;<em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em>



    ??? hint "Schema of the response body"
        ```json
        {
            "description": "Standard error envelope for v1 responses.",
            "properties": {
                "code": {
                    "enum": [
                        "invalid_json",
                        "unsupported_media_type",
                        "validation_error",
                        "internal_error",
                        "unauthenticated",
                        "invalid_token",
                        "expired_token",
                        "revoked_token",
                        "quota_exceeded"
                    ],
                    "title": "Code",
                    "type": "string"
                },
                "message": {
                    "title": "Message",
                    "type": "string"
                }
            },
            "required": [
                "code",
                "message"
            ],
            "title": "Error",
            "type": "object"
        }
        ```

POST /v1/calculate/bulk

Calculate prorated loan limits for many students

Request body

=== "text/csv"

```json
"string"
```
<span class="small-note">⚠️</span>&nbsp;<em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em>



??? hint "Schema of the request body"
    ```json
    {
        "type": "string"
    }
    ```

Responses

=== "200 OK"

=== "text/csv"


    ```json
    "string"
    ```
    <span class="small-note">⚠️</span>&nbsp;<em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em>



    ??? hint "Schema of the response body"
        ```json
        {
            "type": "string"
        }
        ```

=== "400 Bad Request"

=== "application/json"


    ```json
    {
        "code": "invalid_json",
        "message": "string"
    }
    ```
    <span class="small-note">⚠️</span>&nbsp;<em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em>



    ??? hint "Schema of the response body"
        ```json
        {
            "description": "Standard error envelope for v1 responses.",
            "properties": {
                "code": {
                    "enum": [
                        "invalid_json",
                        "unsupported_media_type",
                        "validation_error",
                        "internal_error",
                        "unauthenticated",
                        "invalid_token",
                        "expired_token",
                        "revoked_token",
                        "quota_exceeded"
                    ],
                    "title": "Code",
                    "type": "string"
                },
                "message": {
                    "title": "Message",
                    "type": "string"
                }
            },
            "required": [
                "code",
                "message"
            ],
            "title": "Error",
            "type": "object"
        }
        ```

=== "406 Not Acceptable"

=== "application/json"


    ```json
    {
        "code": "invalid_json",
        "message": "string"
    }
    ```
    <span class="small-note">⚠️</span>&nbsp;<em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em>



    ??? hint "Schema of the response body"
        ```json
        {
            "description": "Standard error envelope for v1 responses.",
            "properties": {
                "code": {
                    "enum": [
                        "invalid_json",
                        "unsupported_media_type",
                        "validation_error",
                        "internal_error",
                        "unauthenticated",
                        "invalid_token",
                        "expired_token",
                        "revoked_token",
                        "quota_exceeded"
                    ],
                    "title": "Code",
                    "type": "string"
                },
                "message": {
                    "title": "Message",
                    "type": "string"
                }
            },
            "required": [
                "code",
                "message"
            ],
            "title": "Error",
            "type": "object"
        }
        ```

=== "415 Unsupported Media Type"

=== "application/json"


    ```json
    {
        "code": "invalid_json",
        "message": "string"
    }
    ```
    <span class="small-note">⚠️</span>&nbsp;<em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em>



    ??? hint "Schema of the response body"
        ```json
        {
            "description": "Standard error envelope for v1 responses.",
            "properties": {
                "code": {
                    "enum": [
                        "invalid_json",
                        "unsupported_media_type",
                        "validation_error",
                        "internal_error",
                        "unauthenticated",
                        "invalid_token",
                        "expired_token",
                        "revoked_token",
                        "quota_exceeded"
                    ],
                    "title": "Code",
                    "type": "string"
                },
                "message": {
                    "title": "Message",
                    "type": "string"
                }
            },
            "required": [
                "code",
                "message"
            ],
            "title": "Error",
            "type": "object"
        }
        ```

GET /v1/openapi.json

Retrieve this OpenAPI specification

Responses

=== "200 OK"

=== "application/json"



    ??? hint "Schema of the response body"
        ```json
        {
            "type": "object"
        }
        ```

Schemas

BulkResult

Name Type Description
error
result
student_id string

CalculationRequest

Name Type Description
academic_year_terms
cost_of_attendance
degree_level string
dependency_status string
grade_level
is_legacy_borrower boolean
plus_denied boolean
subsidized_amount
terms Array<Term>
total_limit

CalculationResult

Name Type Description
annual_basic_eligibility_grad_plus integer
annual_basic_eligibility_sub integer
annual_basic_eligibility_unsub integer
annual_ft_credits
reduced_annual_pct integer
show_both_options boolean
terms Array<TermResult>
total_equal DisbursementOption
total_proportional DisbursementOption
warnings Array<string>

DisbursementOption

Name Type Description
grad_plus integer
subsidized integer
unsubsidized integer

Error

Name Type Description
code string
message string

FieldValidationErrorBody

Name Type Description
code string
field_errors

Term

Name Type Description
actual_final_credits
credits_enrolled
full_time_credits
label string
prior_disbursement_grad_plus
prior_disbursement_sub
prior_disbursement_unsub

TermResult

Name Type Description
adjustment_explanation string
adjustment_grad_plus integer
adjustment_source_index
adjustment_sub integer
adjustment_unsub integer
credits_enrolled
disbursement_pct integer
enrollment_intensity_pct integer
enrollment_status string
equal DisbursementOption
final_term_overdisbursement boolean
full_time_credits
label string
proportional DisbursementOption
warning string

Security schemes

Name Type Scheme Description
bearerAuth http bearer