Navbar 2
Logo
Shell HTTP JavaScript Node.JS Ruby Python Java Go
  • Analyst API v1
  • Authentication
  • Errors
  • Collaterals
  • Customers
  • Deposits
  • Document Associations
  • Document Folders
  • Documents
  • Electronic Tax Return Reader
  • Liens
  • Loan Officers
  • Loan Reconciliation
  • Portfolio Loans
  • Proposed Loans
  • Schemas
  • Analyst API v1

    Sageworks Banking Platform helps financial institutions efficiently grow and improve their customer experience. The platform includes integrated solutions for Lending, Credit Risk and Portfolio Risk, which can drive faster-lending decisions and a more defensible credit risk management framework.

    The Analyst API exposes data and functionality from https://www.sageworksanalyst.com.

    Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

    Authentication

    Example Authentication Request Body

    {
      "client_id": "[your-client-id]",
      "client_secret": "[your-client-secret]",
      "grant_type": "client_credentials"
    }
    

    Example Authentication Response Body

    {
      "access_token": "[your-bearer-token]",
      "expires_in": 900,
      "token_type": "Bearer"
    }
    

    Authentication for the Analyst API goes through Sageworks Auth, an identity provider application built using OAuth 2.0.

    Overview of OAuth 2.0 Workflow for Private Clients

    1. Make a POST request to https://auth.sageworks.com/connect/token with client_id, client_secret, and grant_type specified in the body
    2. Get the Bearer Token (access_token) from the response to your POST request
    3. Use the Bearer Token in your API request, which will return a JSON response if successful

    Errors

    Any error returned by the Analyst API should be in the Sageworks Error format.

    Error codes and descriptions are the following:

    Code Meaning Description
    400 Bad Request User input was invalid and request must be fixed
    401 Unauthorized Access token for request is invalid
    403 Forbidden The associated access token does not have access to the requested endpoint
    404 Not Found No content matching the supplied parameters could be found
    500 Internal Server Error There was an unhandled exception in Sageworks code. Please report these to sageworks.support@sageworks.com

    Collaterals

    GetPaged

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/collaterals \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/collaterals HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/collaterals',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/collaterals',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/collaterals',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/collaterals', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/collaterals");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/collaterals", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/collaterals

    Gets all collaterals

    Parameters

    Parameter In Type Required Description
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)
    customerId query integer(int32) false ID of the customer that pledged the collateral

    Example responses

    200 undefined

    {
      "items": [
        {
          "isDeleted": false,
          "collateralType": "OtherRealEstate",
          "description": "45687 Walker Ave",
          "collateralCode": "330",
          "discountRate": 0.2,
          "originalValue": 990000,
          "mostRecentAppraisalDate": "2018-06-13",
          "mostRecentAppraisalValue": 1250000,
          "customerId": 29377226
        }
      ]
    }
    

    Gets all current, existing, and active collateral in the account

    Responses

    Status Meaning Description Schema
    200 OK Gets all current, existing, and active collateral in the account CollectionResponse<Collateral>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Create

    Code samples

    # You can also use wget
    curl -X POST https://api.sageworks.com/v1/collaterals \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://api.sageworks.com/v1/collaterals HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/collaterals',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "isDeleted": false,
      "collateralType": "OtherRealEstate",
      "description": "45687 Walker Ave",
      "collateralCode": "330",
      "discountRate": 0.2,
      "originalValue": 990000,
      "mostRecentAppraisalDate": "2018-06-13",
      "mostRecentAppraisalValue": 1250000,
      "customerId": 29377226
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/collaterals',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://api.sageworks.com/v1/collaterals',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://api.sageworks.com/v1/collaterals', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/collaterals");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.sageworks.com/v1/collaterals", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /v1/collaterals

    Creates a collateral

    Body parameter

    {
      "isDeleted": false,
      "collateralType": "OtherRealEstate",
      "description": "45687 Walker Ave",
      "collateralCode": "330",
      "discountRate": 0.2,
      "originalValue": 990000,
      "mostRecentAppraisalDate": "2018-06-13",
      "mostRecentAppraisalValue": 1250000,
      "customerId": 29377226
    }
    

    Parameters

    Parameter In Type Required Description
    body body Collateral false The collateral to create

    Example responses

    201 undefined

    {
      "isDeleted": false,
      "collateralType": "OtherRealEstate",
      "description": "45687 Walker Ave",
      "collateralCode": "330",
      "discountRate": 0.2,
      "originalValue": 990000,
      "mostRecentAppraisalDate": "2018-06-13",
      "mostRecentAppraisalValue": 1250000,
      "customerId": 29377226
    }
    

    The collateral has been created successfully. The collateral that was created is returned and has the Sageworks id that was assigned.

    Responses

    Status Meaning Description Schema
    201 Created The collateral has been created successfully. The collateral that was created is returned and has the Sageworks id that was assigned. Collateral
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    GetById

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/collaterals/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/collaterals/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/collaterals/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/collaterals/{id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/collaterals/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/collaterals/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/collaterals/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/collaterals/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/collaterals/{id}

    Gets a collateral by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the collateral to get

    Example responses

    200 undefined

    {
      "isDeleted": false,
      "collateralType": "OtherRealEstate",
      "description": "45687 Walker Ave",
      "collateralCode": "330",
      "discountRate": 0.2,
      "originalValue": 990000,
      "mostRecentAppraisalDate": "2018-06-13",
      "mostRecentAppraisalValue": 1250000,
      "customerId": 29377226
    }
    

    Gets the collateral with the specified id

    Responses

    Status Meaning Description Schema
    200 OK Gets the collateral with the specified id Collateral
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    Delete

    Code samples

    # You can also use wget
    curl -X DELETE https://api.sageworks.com/v1/collaterals/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://api.sageworks.com/v1/collaterals/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/collaterals/{id}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/collaterals/{id}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.delete 'https://api.sageworks.com/v1/collaterals/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://api.sageworks.com/v1/collaterals/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/collaterals/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("DELETE");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://api.sageworks.com/v1/collaterals/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /v1/collaterals/{id}

    Deletes a collateral by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing collateral to delete

    Example responses

    400 undefined

    {
      "errorType": "invalidRequest",
      "message": "string",
      "modelErrors": [
        {
          "propertyName": "string",
          "message": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content The collateral has been deleted successfully. None
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Update

    Code samples

    # You can also use wget
    curl -X PATCH https://api.sageworks.com/v1/collaterals/{id} \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PATCH https://api.sageworks.com/v1/collaterals/{id} HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/collaterals/{id}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "isDeleted": false,
      "collateralType": "OtherRealEstate",
      "description": "45687 Walker Ave",
      "collateralCode": "330",
      "discountRate": 0.2,
      "originalValue": 990000,
      "mostRecentAppraisalDate": "2018-06-13",
      "mostRecentAppraisalValue": 1250000,
      "customerId": 29377226
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/collaterals/{id}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.patch 'https://api.sageworks.com/v1/collaterals/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.patch('https://api.sageworks.com/v1/collaterals/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/collaterals/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PATCH");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://api.sageworks.com/v1/collaterals/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PATCH /v1/collaterals/{id}

    Updates a collateral

    Body parameter

    {
      "isDeleted": false,
      "collateralType": "OtherRealEstate",
      "description": "45687 Walker Ave",
      "collateralCode": "330",
      "discountRate": 0.2,
      "originalValue": 990000,
      "mostRecentAppraisalDate": "2018-06-13",
      "mostRecentAppraisalValue": 1250000,
      "customerId": 29377226
    }
    

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing collateral to update
    body body Collateral false The collateral values to update

    Example responses

    200 undefined

    {
      "isDeleted": false,
      "collateralType": "OtherRealEstate",
      "description": "45687 Walker Ave",
      "collateralCode": "330",
      "discountRate": 0.2,
      "originalValue": 990000,
      "mostRecentAppraisalDate": "2018-06-13",
      "mostRecentAppraisalValue": 1250000,
      "customerId": 29377226
    }
    

    Returns the modified collateral

    Responses

    Status Meaning Description Schema
    200 OK Returns the modified collateral Collateral
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Get

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/portfolio-loans/{id}/collaterals \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/portfolio-loans/{id}/collaterals HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/portfolio-loans/{id}/collaterals',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/portfolio-loans/{id}/collaterals',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/portfolio-loans/{id}/collaterals',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/portfolio-loans/{id}/collaterals', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/portfolio-loans/{id}/collaterals");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/portfolio-loans/{id}/collaterals", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/portfolio-loans/{id}/collaterals

    Gets all collaterals for given portfolio-loan id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the portfolio loan to filter by
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)
    customerId query integer(int32) false ID of the customer that pledged the collateral

    Example responses

    200 undefined

    {
      "items": [
        {
          "isDeleted": false,
          "collateralType": "OtherRealEstate",
          "description": "45687 Walker Ave",
          "collateralCode": "330",
          "discountRate": 0.2,
          "originalValue": 990000,
          "mostRecentAppraisalDate": "2018-06-13",
          "mostRecentAppraisalValue": 1250000,
          "customerId": 29377226
        }
      ]
    }
    

    Gets all collaterals associated with the given portfolio loan id

    Responses

    Status Meaning Description Schema
    200 OK Gets all collaterals associated with the given portfolio loan id CollectionResponse<Collateral>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Customers

    GetPaged

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/customers \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/customers HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/customers',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/customers',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/customers',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/customers', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/customers");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/customers", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/customers

    Gets all customers

    Parameters

    Parameter In Type Required Description
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)
    uniqueIdentifier query string false Unique identifier to filter by

    Example responses

    200 undefined

    {
      "items": [
        {
          "isDeleted": false,
          "name": "Example, LLC",
          "addresses": [
            {
              "line1": "123 Main St",
              "line2": "Apt 4B",
              "city": "Example City",
              "state": "NY",
              "postalCode": "00101",
              "country": "US",
              "addressType": "primary"
            }
          ]
        }
      ]
    }
    

    Gets all current, existing, and active customers in the account

    Responses

    Status Meaning Description Schema
    200 OK Gets all current, existing, and active customers in the account CollectionResponse<Customer>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Create

    Code samples

    # You can also use wget
    curl -X POST https://api.sageworks.com/v1/customers \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://api.sageworks.com/v1/customers HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/customers',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "isDeleted": false,
      "name": "Example, LLC",
      "addresses": [
        {
          "line1": "123 Main St",
          "line2": "Apt 4B",
          "city": "Example City",
          "state": "NY",
          "postalCode": "00101",
          "country": "US",
          "addressType": "primary"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/customers',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://api.sageworks.com/v1/customers',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://api.sageworks.com/v1/customers', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/customers");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.sageworks.com/v1/customers", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /v1/customers

    Creates a new customer

    Body parameter

    {
      "isDeleted": false,
      "name": "Example, LLC",
      "addresses": [
        {
          "line1": "123 Main St",
          "line2": "Apt 4B",
          "city": "Example City",
          "state": "NY",
          "postalCode": "00101",
          "country": "US",
          "addressType": "primary"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    body body Customer false The customer to create

    Example responses

    201 undefined

    {
      "isDeleted": false,
      "name": "Example, LLC",
      "addresses": [
        {
          "line1": "123 Main St",
          "line2": "Apt 4B",
          "city": "Example City",
          "state": "NY",
          "postalCode": "00101",
          "country": "US",
          "addressType": "primary"
        }
      ]
    }
    

    The customer has been created succesfully. The customer that was created is returned and has the Sageworks id that was assigned.

    Responses

    Status Meaning Description Schema
    201 Created The customer has been created succesfully. The customer that was created is returned and has the Sageworks id that was assigned. Customer
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    GetById

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/customers/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/customers/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/customers/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/customers/{id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/customers/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/customers/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/customers/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/customers/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/customers/{id}

    Gets a customer by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the customer to get

    Example responses

    200 undefined

    {
      "isDeleted": false,
      "name": "Example, LLC",
      "addresses": [
        {
          "line1": "123 Main St",
          "line2": "Apt 4B",
          "city": "Example City",
          "state": "NY",
          "postalCode": "00101",
          "country": "US",
          "addressType": "primary"
        }
      ]
    }
    

    Gets the customer with the specified id

    Responses

    Status Meaning Description Schema
    200 OK Gets the customer with the specified id Customer
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Delete

    Code samples

    # You can also use wget
    curl -X DELETE https://api.sageworks.com/v1/customers/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://api.sageworks.com/v1/customers/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/customers/{id}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/customers/{id}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.delete 'https://api.sageworks.com/v1/customers/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://api.sageworks.com/v1/customers/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/customers/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("DELETE");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://api.sageworks.com/v1/customers/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /v1/customers/{id}

    Deletes a customer by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing customer to delete

    Example responses

    400 undefined

    {
      "errorType": "invalidRequest",
      "message": "string",
      "modelErrors": [
        {
          "propertyName": "string",
          "message": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content The customer has been deleted successfully. None
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Update

    Code samples

    # You can also use wget
    curl -X PATCH https://api.sageworks.com/v1/customers/{id} \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PATCH https://api.sageworks.com/v1/customers/{id} HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/customers/{id}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "isDeleted": false,
      "name": "Example, LLC",
      "addresses": [
        {
          "line1": "123 Main St",
          "line2": "Apt 4B",
          "city": "Example City",
          "state": "NY",
          "postalCode": "00101",
          "country": "US",
          "addressType": "primary"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/customers/{id}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.patch 'https://api.sageworks.com/v1/customers/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.patch('https://api.sageworks.com/v1/customers/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/customers/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PATCH");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://api.sageworks.com/v1/customers/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PATCH /v1/customers/{id}

    Updates a customer

    Body parameter

    {
      "isDeleted": false,
      "name": "Example, LLC",
      "addresses": [
        {
          "line1": "123 Main St",
          "line2": "Apt 4B",
          "city": "Example City",
          "state": "NY",
          "postalCode": "00101",
          "country": "US",
          "addressType": "primary"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing customer to update
    body body Customer false The customer values to update

    Example responses

    200 undefined

    {
      "isDeleted": false,
      "name": "Example, LLC",
      "addresses": [
        {
          "line1": "123 Main St",
          "line2": "Apt 4B",
          "city": "Example City",
          "state": "NY",
          "postalCode": "00101",
          "country": "US",
          "addressType": "primary"
        }
      ]
    }
    

    Returns the modified customer

    Responses

    Status Meaning Description Schema
    200 OK Returns the modified customer Customer
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Deposits

    GetPaged

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/deposits \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/deposits HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/deposits',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/deposits',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/deposits',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/deposits', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/deposits");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/deposits", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/deposits

    Gets all deposits

    Parameters

    Parameter In Type Required Description
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)
    customerId query integer(int32) false CustomerId value to filter by

    Example responses

    200 undefined

    {
      "items": [
        {
          "type": "Commercial CD",
          "customerId": 29377226,
          "balance": 12000,
          "isDeleted": false,
          "interestRate": 0.078,
          "annualFees": 100,
          "maturityDate": "2023-05-17",
          "originationDate": "2007-12-01",
          "accountNumber": "12245600014"
        }
      ]
    }
    

    Gets all current, existing, and active deposit accounts in the account

    Responses

    Status Meaning Description Schema
    200 OK Gets all current, existing, and active deposit accounts in the account CollectionResponse<Deposit>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Create

    Code samples

    # You can also use wget
    curl -X POST https://api.sageworks.com/v1/deposits \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://api.sageworks.com/v1/deposits HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/deposits',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "type": "Commercial CD",
      "customerId": 29377226,
      "balance": 12000,
      "isDeleted": false,
      "interestRate": 0.078,
      "annualFees": 100,
      "maturityDate": "2023-05-17",
      "originationDate": "2007-12-01",
      "accountNumber": "12245600014"
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/deposits',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://api.sageworks.com/v1/deposits',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://api.sageworks.com/v1/deposits', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/deposits");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.sageworks.com/v1/deposits", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /v1/deposits

    Creates a deposit

    Body parameter

    {
      "type": "Commercial CD",
      "customerId": 29377226,
      "balance": 12000,
      "isDeleted": false,
      "interestRate": 0.078,
      "annualFees": 100,
      "maturityDate": "2023-05-17",
      "originationDate": "2007-12-01",
      "accountNumber": "12245600014"
    }
    

    Parameters

    Parameter In Type Required Description
    body body Deposit false The deposit to create

    Example responses

    201 undefined

    {
      "type": "Commercial CD",
      "customerId": 29377226,
      "balance": 12000,
      "isDeleted": false,
      "interestRate": 0.078,
      "annualFees": 100,
      "maturityDate": "2023-05-17",
      "originationDate": "2007-12-01",
      "accountNumber": "12245600014"
    }
    

    The deposit has been created successfully. The deposit that was created is returned and has the Sageworks id that was assigned.

    Responses

    Status Meaning Description Schema
    201 Created The deposit has been created successfully. The deposit that was created is returned and has the Sageworks id that was assigned. Deposit
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    GetById

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/deposits/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/deposits/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/deposits/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/deposits/{id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/deposits/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/deposits/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/deposits/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/deposits/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/deposits/{id}

    Gets a deposit by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing deposit to get

    Example responses

    200 undefined

    {
      "type": "Commercial CD",
      "customerId": 29377226,
      "balance": 12000,
      "isDeleted": false,
      "interestRate": 0.078,
      "annualFees": 100,
      "maturityDate": "2023-05-17",
      "originationDate": "2007-12-01",
      "accountNumber": "12245600014"
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Gets the deposit account with the specified id Deposit
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Delete

    Code samples

    # You can also use wget
    curl -X DELETE https://api.sageworks.com/v1/deposits/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://api.sageworks.com/v1/deposits/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/deposits/{id}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/deposits/{id}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.delete 'https://api.sageworks.com/v1/deposits/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://api.sageworks.com/v1/deposits/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/deposits/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("DELETE");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://api.sageworks.com/v1/deposits/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /v1/deposits/{id}

    Deletes a deposit by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing deposit to delete

    Example responses

    400 undefined

    {
      "errorType": "invalidRequest",
      "message": "string",
      "modelErrors": [
        {
          "propertyName": "string",
          "message": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content The deposit has been deleted successfully. None
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Update

    Code samples

    # You can also use wget
    curl -X PATCH https://api.sageworks.com/v1/deposits/{id} \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PATCH https://api.sageworks.com/v1/deposits/{id} HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/deposits/{id}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "type": "Commercial CD",
      "customerId": 29377226,
      "balance": 12000,
      "isDeleted": false,
      "interestRate": 0.078,
      "annualFees": 100,
      "maturityDate": "2023-05-17",
      "originationDate": "2007-12-01",
      "accountNumber": "12245600014"
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/deposits/{id}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.patch 'https://api.sageworks.com/v1/deposits/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.patch('https://api.sageworks.com/v1/deposits/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/deposits/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PATCH");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://api.sageworks.com/v1/deposits/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PATCH /v1/deposits/{id}

    Updates a deposit

    Body parameter

    {
      "type": "Commercial CD",
      "customerId": 29377226,
      "balance": 12000,
      "isDeleted": false,
      "interestRate": 0.078,
      "annualFees": 100,
      "maturityDate": "2023-05-17",
      "originationDate": "2007-12-01",
      "accountNumber": "12245600014"
    }
    

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing deposit to update
    body body Deposit false The deposit values to update

    Example responses

    200 undefined

    {
      "type": "Commercial CD",
      "customerId": 29377226,
      "balance": 12000,
      "isDeleted": false,
      "interestRate": 0.078,
      "annualFees": 100,
      "maturityDate": "2023-05-17",
      "originationDate": "2007-12-01",
      "accountNumber": "12245600014"
    }
    

    Returns the modified deposit

    Responses

    Status Meaning Description Schema
    200 OK Returns the modified deposit Deposit
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Document Associations

    GetPaged

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/document-associations \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/document-associations HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/document-associations',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/document-associations',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/document-associations',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/document-associations', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/document-associations");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/document-associations", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/document-associations

    Gets all document associations

    Parameters

    Parameter In Type Required Description
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)

    Example responses

    200 undefined

    {
      "items": [
        {
          "documentId": 456,
          "objectType": "PortfolioLoan",
          "objectId": 789
        }
      ]
    }
    

    Gets all current, existing, and active document associations

    Responses

    Status Meaning Description Schema
    200 OK Gets all current, existing, and active document associations CollectionResponse<DocumentAssociation>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Create

    Code samples

    # You can also use wget
    curl -X POST https://api.sageworks.com/v1/document-associations \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://api.sageworks.com/v1/document-associations HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/document-associations',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "documentId": 456,
      "objectType": "PortfolioLoan",
      "objectId": 789
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/document-associations',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://api.sageworks.com/v1/document-associations',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://api.sageworks.com/v1/document-associations', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/document-associations");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.sageworks.com/v1/document-associations", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /v1/document-associations

    Creates an association between a document and another object in Sageworks

    PortfolioLoan, ProposedLoan, and Collateral are the currently supported object types for document associations

    Body parameter

    {
      "documentId": 456,
      "objectType": "PortfolioLoan",
      "objectId": 789
    }
    

    Parameters

    Parameter In Type Required Description
    body body DocumentAssociation false The document association to create

    Example responses

    201 undefined

    {
      "documentId": 456,
      "objectType": "PortfolioLoan",
      "objectId": 789
    }
    

    The document association has been created successfully. The document association that was created is returned and has the Sageworks id that was assigned.

    Responses

    Status Meaning Description Schema
    201 Created The document association has been created successfully. The document association that was created is returned and has the Sageworks id that was assigned. DocumentAssociation
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    GetById

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/document-associations/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/document-associations/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/document-associations/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/document-associations/{id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/document-associations/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/document-associations/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/document-associations/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/document-associations/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/document-associations/{id}

    Gets a document association by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing document association to get

    Example responses

    200 undefined

    {
      "documentId": 456,
      "objectType": "PortfolioLoan",
      "objectId": 789
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Gets the document asssociation with the specified id DocumentAssociation
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Delete

    Code samples

    # You can also use wget
    curl -X DELETE https://api.sageworks.com/v1/document-associations/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://api.sageworks.com/v1/document-associations/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/document-associations/{id}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/document-associations/{id}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.delete 'https://api.sageworks.com/v1/document-associations/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://api.sageworks.com/v1/document-associations/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/document-associations/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("DELETE");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://api.sageworks.com/v1/document-associations/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /v1/document-associations/{id}

    Deletes a document association by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing document association to delete

    Example responses

    400 undefined

    {
      "errorType": "invalidRequest",
      "message": "string",
      "modelErrors": [
        {
          "propertyName": "string",
          "message": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content The document association has been deleted successfully. None
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Update

    Code samples

    # You can also use wget
    curl -X PATCH https://api.sageworks.com/v1/document-associations/{id} \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PATCH https://api.sageworks.com/v1/document-associations/{id} HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/document-associations/{id}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "documentId": 456,
      "objectType": "PortfolioLoan",
      "objectId": 789
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/document-associations/{id}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.patch 'https://api.sageworks.com/v1/document-associations/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.patch('https://api.sageworks.com/v1/document-associations/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/document-associations/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PATCH");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://api.sageworks.com/v1/document-associations/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PATCH /v1/document-associations/{id}

    Updates a document association

    Body parameter

    {
      "documentId": 456,
      "objectType": "PortfolioLoan",
      "objectId": 789
    }
    

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing document association to update
    body body DocumentAssociation false The document association values to update

    Example responses

    200 undefined

    {
      "documentId": 456,
      "objectType": "PortfolioLoan",
      "objectId": 789
    }
    

    Returns the modified document association

    Responses

    Status Meaning Description Schema
    200 OK Returns the modified document association DocumentAssociation
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Document Folders

    GetById

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/document-folders/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/document-folders/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/document-folders/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/document-folders/{id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/document-folders/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/document-folders/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/document-folders/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/document-folders/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/document-folders/{id}

    Gets a document folder by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing document folder to get

    Example responses

    200 undefined

    {
      "name": "My Financial Document Folder",
      "type": "customer",
      "isDeleted": false,
      "parentDocumentFolderId": 123
    }
    

    Gets the document folder with the specified id

    Responses

    Status Meaning Description Schema
    200 OK Gets the document folder with the specified id DocumentFolder
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Update

    Code samples

    # You can also use wget
    curl -X PATCH https://api.sageworks.com/v1/document-folders/{id} \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PATCH https://api.sageworks.com/v1/document-folders/{id} HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/document-folders/{id}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "name": "My Financial Document Folder",
      "type": "customer",
      "isDeleted": false,
      "parentDocumentFolderId": 123
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/document-folders/{id}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.patch 'https://api.sageworks.com/v1/document-folders/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.patch('https://api.sageworks.com/v1/document-folders/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/document-folders/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PATCH");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://api.sageworks.com/v1/document-folders/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PATCH /v1/document-folders/{id}

    Updates a folder

    Body parameter

    {
      "name": "My Financial Document Folder",
      "type": "customer",
      "isDeleted": false,
      "parentDocumentFolderId": 123
    }
    

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing folder to update
    body body DocumentFolder false folder object to use for update

    Example responses

    200 undefined

    {
      "name": "My Financial Document Folder",
      "type": "customer",
      "isDeleted": false,
      "parentDocumentFolderId": 123
    }
    

    The updated folder

    Responses

    Status Meaning Description Schema
    200 OK The updated folder DocumentFolder
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    GetPaged

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/document-folders \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/document-folders HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/document-folders',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/document-folders',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/document-folders',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/document-folders', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/document-folders");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/document-folders", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/document-folders

    Gets all document folders

    Parameters

    Parameter In Type Required Description
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)

    Example responses

    200 undefined

    {
      "items": [
        {
          "name": "My Financial Document Folder",
          "type": "customer",
          "isDeleted": false,
          "parentDocumentFolderId": 123
        }
      ]
    }
    

    Gets all current, existing, and active document folders in the account

    Responses

    Status Meaning Description Schema
    200 OK Gets all current, existing, and active document folders in the account CollectionResponse<DocumentFolder>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Create

    Code samples

    # You can also use wget
    curl -X POST https://api.sageworks.com/v1/document-folders \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://api.sageworks.com/v1/document-folders HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/document-folders',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "name": "My Financial Document Folder",
      "type": "customer",
      "isDeleted": false,
      "parentDocumentFolderId": 123
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/document-folders',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://api.sageworks.com/v1/document-folders',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://api.sageworks.com/v1/document-folders', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/document-folders");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.sageworks.com/v1/document-folders", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /v1/document-folders

    Creates a document folder

    Body parameter

    {
      "name": "My Financial Document Folder",
      "type": "customer",
      "isDeleted": false,
      "parentDocumentFolderId": 123
    }
    

    Parameters

    Parameter In Type Required Description
    body body DocumentFolder false The document folder to create

    Example responses

    201 undefined

    {
      "name": "My Financial Document Folder",
      "type": "customer",
      "isDeleted": false,
      "parentDocumentFolderId": 123
    }
    

    The document folder has been created successfully. The document folder that was created is returned and has the Sageworks id that was assigned.

    Responses

    Status Meaning Description Schema
    201 Created The document folder has been created successfully. The document folder that was created is returned and has the Sageworks id that was assigned. DocumentFolder
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    Documents

    GetPaged

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/documents \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/documents HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/documents',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/documents',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/documents',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/documents', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/documents");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/documents", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/documents

    Gets all documents

    Parameters

    Parameter In Type Required Description
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)

    Example responses

    200 undefined

    {
      "items": [
        {
          "description": "Test File",
          "documentDated": "2017-12-31",
          "documentFolderId": 123,
          "name": "Test File.txt"
        }
      ]
    }
    

    Gets all current, existing, and active deposit accounts in the account

    Responses

    Status Meaning Description Schema
    200 OK Gets all current, existing, and active deposit accounts in the account CollectionResponse<Document>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Create

    Code samples

    # You can also use wget
    curl -X POST https://api.sageworks.com/v1/documents \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://api.sageworks.com/v1/documents HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/documents',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "associationCustomerId": 123,
      "document": {
        "description": "Test File",
        "documentDated": "2017-12-31",
        "documentFolderId": 123,
        "name": "Test File.txt"
      },
      "documentContent": {
        "content": "dGVzdCBmaWxlDQp0ZXN0IGZpbGUNCnRlc3QgZmlsZQ0KdGVzdCBmaWxlDQp0ZXN0IGZpbGUNCnRlc3QgZmlsZQ0KdGVzdCBmaWxl"
      }
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/documents',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://api.sageworks.com/v1/documents',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://api.sageworks.com/v1/documents', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/documents");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.sageworks.com/v1/documents", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /v1/documents

    Uploads a document to the library

    Body parameter

    {
      "associationCustomerId": 123,
      "document": {
        "description": "Test File",
        "documentDated": "2017-12-31",
        "documentFolderId": 123,
        "name": "Test File.txt"
      },
      "documentContent": {
        "content": "dGVzdCBmaWxlDQp0ZXN0IGZpbGUNCnRlc3QgZmlsZQ0KdGVzdCBmaWxlDQp0ZXN0IGZpbGUNCnRlc3QgZmlsZQ0KdGVzdCBmaWxl"
      }
    }
    

    Parameters

    Parameter In Type Required Description
    body body DocumentPostRequest false No description

    Example responses

    200 undefined

    {
      "description": "Test File",
      "documentDated": "2017-12-31",
      "documentFolderId": 123,
      "name": "Test File.txt"
    }
    

    Success

    Responses

    Status Meaning Description Schema
    200 OK Success Document
    201 Created The metadata of the succesfully created document None
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    GetById

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/documents/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/documents/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/documents/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/documents/{id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/documents/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/documents/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/documents/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/documents/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/documents/{id}

    Gets a document (without document content) by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing document to get

    Example responses

    200 undefined

    {
      "description": "Test File",
      "documentDated": "2017-12-31",
      "documentFolderId": 123,
      "name": "Test File.txt"
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Gets the document with the specified id Document
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Delete

    Code samples

    # You can also use wget
    curl -X DELETE https://api.sageworks.com/v1/documents/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://api.sageworks.com/v1/documents/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/documents/{id}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/documents/{id}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.delete 'https://api.sageworks.com/v1/documents/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://api.sageworks.com/v1/documents/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/documents/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("DELETE");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://api.sageworks.com/v1/documents/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /v1/documents/{id}

    Deletes a document by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing document to delete
    permanentlyDelete query boolean false Whether or not to permanently delete the document. Default is 'false'

    Example responses

    400 undefined

    {
      "errorType": "invalidRequest",
      "message": "string",
      "modelErrors": [
        {
          "propertyName": "string",
          "message": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content The document has been deleted successfully. None
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Update

    Code samples

    # You can also use wget
    curl -X PATCH https://api.sageworks.com/v1/documents/{id} \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PATCH https://api.sageworks.com/v1/documents/{id} HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/documents/{id}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "description": "Test File",
      "documentDated": "2017-12-31",
      "documentFolderId": 123,
      "name": "Test File.txt"
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/documents/{id}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.patch 'https://api.sageworks.com/v1/documents/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.patch('https://api.sageworks.com/v1/documents/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/documents/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PATCH");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://api.sageworks.com/v1/documents/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PATCH /v1/documents/{id}

    Updates an existing document

    Body parameter

    {
      "description": "Test File",
      "documentDated": "2017-12-31",
      "documentFolderId": 123,
      "name": "Test File.txt"
    }
    

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing document to update
    body body Document false The document values to update

    Example responses

    200 undefined

    {
      "description": "Test File",
      "documentDated": "2017-12-31",
      "documentFolderId": 123,
      "name": "Test File.txt"
    }
    

    Returns the modified document

    Responses

    Status Meaning Description Schema
    200 OK Returns the modified document Document
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    GetContentById

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/documents/{id}/content \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/documents/{id}/content HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/documents/{id}/content',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/documents/{id}/content',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/documents/{id}/content',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/documents/{id}/content', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/documents/{id}/content");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/documents/{id}/content", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/documents/{id}/content

    Gets document content by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing document to get content for

    Example responses

    200 undefined

    {
      "content": "string"
    }
    

    Gets the content of the document with the specified id

    Responses

    Status Meaning Description Schema
    200 OK Gets the content of the document with the specified id DocumentContent
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Electronic Tax Return Reader

    ExtractData

    Code samples

    # You can also use wget
    curl -X POST https://api.sageworks.com/v1/tax-return-reader/parse-pdf \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://api.sageworks.com/v1/tax-return-reader/parse-pdf HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/tax-return-reader/parse-pdf',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "pdfBytes": "string",
      "password": "string"
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/tax-return-reader/parse-pdf',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://api.sageworks.com/v1/tax-return-reader/parse-pdf',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://api.sageworks.com/v1/tax-return-reader/parse-pdf', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/tax-return-reader/parse-pdf");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.sageworks.com/v1/tax-return-reader/parse-pdf", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /v1/tax-return-reader/parse-pdf

    Extracts all data from a tax return PDF file

    Body parameter

    {
      "pdfBytes": "string",
      "password": "string"
    }
    

    Parameters

    Parameter In Type Required Description
    body body TaxReturnReaderParsePdfRequest false Request object containing the base64 encoded (RFC 2045) PDF file and password to open the file (if applicable)

    Example responses

    200 undefined

    {
      "numberOfErrors": 0,
      "taxFormItems": [
        {
          "year": "string",
          "form": "string",
          "schedule": "string",
          "page": 0,
          "line": "string",
          "itemValue": "string"
        }
      ]
    }
    

    The tax return has been processed successfully, and the list of tax return line items that were parsed from the PDF tax return is returned

    Responses

    Status Meaning Description Schema
    200 OK The tax return has been processed successfully, and the list of tax return line items that were parsed from the PDF tax return is returned TaxReturnReaderParsePdfResponse
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    Liens

    GetPaged

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/liens \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/liens HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/liens',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/liens',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/liens',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/liens', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/liens");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/liens", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/liens

    Gets all liens

    Parameters

    Parameter In Type Required Description
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)
    loanId query integer(int32) false The Loan id to filter by

    Example responses

    200 undefined

    {
      "items": [
        {
          "collateralId": 16477786,
          "loanId": 14791684,
          "lienPosition": 1,
          "lienHolder": "My Bank",
          "lienAmount": 20261.12
        }
      ]
    }
    

    Gets all current, existing, and active liens against collateral in the account

    Responses

    Status Meaning Description Schema
    200 OK Gets all current, existing, and active liens against collateral in the account CollectionResponse<Lien>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Create

    Code samples

    # You can also use wget
    curl -X POST https://api.sageworks.com/v1/liens \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://api.sageworks.com/v1/liens HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/liens',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "collateralId": 16477786,
      "loanId": 14791684,
      "lienPosition": 1,
      "lienHolder": "My Bank",
      "lienAmount": 20261.12
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/liens',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://api.sageworks.com/v1/liens',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://api.sageworks.com/v1/liens', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/liens");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.sageworks.com/v1/liens", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /v1/liens

    Creates a lien

    Body parameter

    {
      "collateralId": 16477786,
      "loanId": 14791684,
      "lienPosition": 1,
      "lienHolder": "My Bank",
      "lienAmount": 20261.12
    }
    

    Parameters

    Parameter In Type Required Description
    body body Lien false The lien to create

    Example responses

    201 undefined

    {
      "collateralId": 16477786,
      "loanId": 14791684,
      "lienPosition": 1,
      "lienHolder": "My Bank",
      "lienAmount": 20261.12
    }
    

    The lien has been created successfully. The lien that was created is returned and has the Sageworks id that was assigned.

    Responses

    Status Meaning Description Schema
    201 Created The lien has been created successfully. The lien that was created is returned and has the Sageworks id that was assigned. Lien
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    GetById

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/liens/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/liens/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/liens/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/liens/{id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/liens/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/liens/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/liens/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/liens/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/liens/{id}

    Gets a lien by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the lien to get

    Example responses

    200 undefined

    {
      "collateralId": 16477786,
      "loanId": 14791684,
      "lienPosition": 1,
      "lienHolder": "My Bank",
      "lienAmount": 20261.12
    }
    

    Gets the lien with the specified id

    Responses

    Status Meaning Description Schema
    200 OK Gets the lien with the specified id Lien
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    Delete

    Code samples

    # You can also use wget
    curl -X DELETE https://api.sageworks.com/v1/liens/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://api.sageworks.com/v1/liens/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/liens/{id}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/liens/{id}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.delete 'https://api.sageworks.com/v1/liens/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://api.sageworks.com/v1/liens/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/liens/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("DELETE");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://api.sageworks.com/v1/liens/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /v1/liens/{id}

    Deletes a lien by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing lien to delete

    Example responses

    400 undefined

    {
      "errorType": "invalidRequest",
      "message": "string",
      "modelErrors": [
        {
          "propertyName": "string",
          "message": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content The lien has been deleted successfully. None
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Update

    Code samples

    # You can also use wget
    curl -X PATCH https://api.sageworks.com/v1/liens/{id} \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PATCH https://api.sageworks.com/v1/liens/{id} HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/liens/{id}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "collateralId": 16477786,
      "loanId": 14791684,
      "lienPosition": 1,
      "lienHolder": "My Bank",
      "lienAmount": 20261.12
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/liens/{id}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.patch 'https://api.sageworks.com/v1/liens/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.patch('https://api.sageworks.com/v1/liens/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/liens/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PATCH");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://api.sageworks.com/v1/liens/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PATCH /v1/liens/{id}

    Updates a lien

    Body parameter

    {
      "collateralId": 16477786,
      "loanId": 14791684,
      "lienPosition": 1,
      "lienHolder": "My Bank",
      "lienAmount": 20261.12
    }
    

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing lien to update
    body body Lien false The lien values to update

    Example responses

    200 undefined

    {
      "collateralId": 16477786,
      "loanId": 14791684,
      "lienPosition": 1,
      "lienHolder": "My Bank",
      "lienAmount": 20261.12
    }
    

    Returns the modified lien

    Responses

    Status Meaning Description Schema
    200 OK Returns the modified lien Lien
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Loan Officers

    GetPaged

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/account/loan-officers \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/account/loan-officers HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/account/loan-officers',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/account/loan-officers',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/account/loan-officers',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/account/loan-officers', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/account/loan-officers");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/account/loan-officers", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/account/loan-officers

    Gets a list of all loan officers

    Parameters

    Parameter In Type Required Description
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)

    Example responses

    200 undefined

    {
      "items": [
        {
          "id": 0,
          "firstName": "string",
          "lastName": "string"
        }
      ]
    }
    

    Gets all loan officers that are available for selection in the 'Loan Officer' drop down in Sageworks to associate with loans and other items

    Responses

    Status Meaning Description Schema
    200 OK Gets all loan officers that are available for selection in the 'Loan Officer' drop down in Sageworks to associate with loans and other items CollectionResponse<LoanOfficer>
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Loan Reconciliation

    LoanReconciliationSummary

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/loan-reconciliation-summary?segmentationCode=callCode&coreLoansOnly=true \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/loan-reconciliation-summary?segmentationCode=callCode&coreLoansOnly=true HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/loan-reconciliation-summary',
      method: 'get',
      data: '?segmentationCode=callCode&coreLoansOnly=true',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/loan-reconciliation-summary?segmentationCode=callCode&coreLoansOnly=true',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/loan-reconciliation-summary',
      params: {
      'segmentationCode' => 'string',
    'coreLoansOnly' => 'boolean'
    }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/loan-reconciliation-summary', params={
      'segmentationCode': 'callCode',  'coreLoansOnly': 'true'
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/loan-reconciliation-summary?segmentationCode=callCode&coreLoansOnly=true");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/loan-reconciliation-summary", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/loan-reconciliation-summary

    Gets loan reconciliation values

    Parameters

    Parameter In Type Required Description
    segmentationCode query string true The code to segment aggregations by (callCode, collateralCode, productCode, etc.)
    coreLoansOnly query boolean true True means only loans pulled in from bank's core will be shown
    archiveMonth query integer(int32) false Month of the archive calculation to use for the loan reconciliation summary, will use "Today's Values" if null or empty
    archiveYear query integer(int32) false Year of the archive calculation to use for the loan reconciliation summary, will use "Today's Values" if null or empty

    Enumerated Values

    Parameter Value
    segmentationCode callCode
    segmentationCode collateralCode
    segmentationCode productCode
    segmentationCode loanTypeCode

    Example responses

    200 undefined

    {
      "items": [
        {
          "segmentationCode": "string",
          "totalLoanBalance": 0,
          "totalIndividualLoanBalance": 0,
          "totalPooledLoanBalance": 0,
          "totalOtherLoanBalance": 0,
          "totalPurchasedImpairedLoanBalance": 0,
          "totalPurchasedNonImpairedLoanBalance": 0,
          "totalLoanCount": 0
        }
      ]
    }
    

    Gets loan reconciliation values

    Responses

    Status Meaning Description Schema
    200 OK Gets loan reconciliation values CollectionResponse<LoanSegment>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    Portfolio Loans

    GetPaged

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/portfolio-loans \
      -H 'Accept: 0' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/portfolio-loans HTTP/1.1
    Host: api.sageworks.com
    
    Accept: 0
    
    
    var headers = {
      'Accept':'0',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/portfolio-loans',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'0',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/portfolio-loans',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => '0',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/portfolio-loans',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': '0',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/portfolio-loans', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/portfolio-loans");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"0"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/portfolio-loans", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/portfolio-loans

    Gets all portfolio loans

    Parameters

    Parameter In Type Required Description
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)
    customerId query integer(int32) false CustomerId value to filter by

    Example responses

    Gets all current, existing, and active portfolio loans in the account

    200 undefined

    {
      "items": [
        {
          "paymentType": "fixedPayment",
          "paymentAmount": 5523,
          "unamortizedPremium": 1312,
          "paymentFrequency": "monthly",
          "customerId": 29377226,
          "bookBalance": 573000.32,
          "currentBalance": 573000.32,
          "loanNumber": "100041235",
          "dayCountConvention": "c_30_360",
          "callCode": "1a",
          "purposeCode": "110",
          "remainingTermInMonths": 60,
          "productCode": "Real Estate",
          "loanTypeCode": "Real Estate - Owner Occupied",
          "currentAvailableCredit": 0,
          "collateralCode": "Office Building",
          "troubledDebtRestructure": false,
          "interestRate": 0.097,
          "renewalDate": "2017-12-15",
          "watchList": false,
          "timesPastDue3060": 1,
          "adjustableInterestRate": true,
          "points": 0,
          "refinance": false,
          "originationDate": "2007-01-31",
          "accruedInterest": 274.23,
          "maturityDate": "2030-12-15",
          "timesPastDue6090": 0,
          "timesPastDue90Plus": 1,
          "originalLoanAmount": 1250000,
          "originalTermInMonths": 60,
          "governmentGuaranteed": false,
          "latestPaymentDate": "2018-08-13",
          "daysCurrentlyPastDue": 19,
          "loanOfficerId": 431871,
          "loanToValueRatio": 0.754,
          "netDeferredFeesOrCosts": 1200,
          "nonAccrual": false,
          "riskRating": 4,
          "isDeleted": false
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Gets all current, existing, and active portfolio loans in the account CollectionResponse<PortfolioLoan>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Create

    Code samples

    # You can also use wget
    curl -X POST https://api.sageworks.com/v1/portfolio-loans \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://api.sageworks.com/v1/portfolio-loans HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/portfolio-loans',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "paymentType": "fixedPayment",
      "paymentAmount": 5523,
      "unamortizedPremium": 1312,
      "paymentFrequency": "monthly",
      "customerId": 29377226,
      "bookBalance": 573000.32,
      "currentBalance": 573000.32,
      "loanNumber": "100041235",
      "dayCountConvention": "c_30_360",
      "callCode": "1a",
      "purposeCode": "110",
      "remainingTermInMonths": 60,
      "productCode": "Real Estate",
      "loanTypeCode": "Real Estate - Owner Occupied",
      "currentAvailableCredit": 0,
      "collateralCode": "Office Building",
      "troubledDebtRestructure": false,
      "interestRate": 0.097,
      "renewalDate": "2017-12-15",
      "watchList": false,
      "timesPastDue3060": 1,
      "adjustableInterestRate": true,
      "points": 0,
      "refinance": false,
      "originationDate": "2007-01-31",
      "accruedInterest": 274.23,
      "maturityDate": "2030-12-15",
      "timesPastDue6090": 0,
      "timesPastDue90Plus": 1,
      "originalLoanAmount": 1250000,
      "originalTermInMonths": 60,
      "governmentGuaranteed": false,
      "latestPaymentDate": "2018-08-13",
      "daysCurrentlyPastDue": 19,
      "loanOfficerId": 431871,
      "loanToValueRatio": 0.754,
      "netDeferredFeesOrCosts": 1200,
      "nonAccrual": false,
      "riskRating": 4,
      "isDeleted": false
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/portfolio-loans',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://api.sageworks.com/v1/portfolio-loans',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://api.sageworks.com/v1/portfolio-loans', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/portfolio-loans");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.sageworks.com/v1/portfolio-loans", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /v1/portfolio-loans

    Creates a portfolio loan

    Body parameter

    {
      "paymentType": "fixedPayment",
      "paymentAmount": 5523,
      "unamortizedPremium": 1312,
      "paymentFrequency": "monthly",
      "customerId": 29377226,
      "bookBalance": 573000.32,
      "currentBalance": 573000.32,
      "loanNumber": "100041235",
      "dayCountConvention": "c_30_360",
      "callCode": "1a",
      "purposeCode": "110",
      "remainingTermInMonths": 60,
      "productCode": "Real Estate",
      "loanTypeCode": "Real Estate - Owner Occupied",
      "currentAvailableCredit": 0,
      "collateralCode": "Office Building",
      "troubledDebtRestructure": false,
      "interestRate": 0.097,
      "renewalDate": "2017-12-15",
      "watchList": false,
      "timesPastDue3060": 1,
      "adjustableInterestRate": true,
      "points": 0,
      "refinance": false,
      "originationDate": "2007-01-31",
      "accruedInterest": 274.23,
      "maturityDate": "2030-12-15",
      "timesPastDue6090": 0,
      "timesPastDue90Plus": 1,
      "originalLoanAmount": 1250000,
      "originalTermInMonths": 60,
      "governmentGuaranteed": false,
      "latestPaymentDate": "2018-08-13",
      "daysCurrentlyPastDue": 19,
      "loanOfficerId": 431871,
      "loanToValueRatio": 0.754,
      "netDeferredFeesOrCosts": 1200,
      "nonAccrual": false,
      "riskRating": 4,
      "isDeleted": false
    }
    

    Parameters

    Parameter In Type Required Description
    body body PortfolioLoan false The portfolio loan to create

    Example responses

    201 undefined

    {
      "paymentType": "fixedPayment",
      "paymentAmount": 5523,
      "unamortizedPremium": 1312,
      "paymentFrequency": "monthly",
      "customerId": 29377226,
      "bookBalance": 573000.32,
      "currentBalance": 573000.32,
      "loanNumber": "100041235",
      "dayCountConvention": "c_30_360",
      "callCode": "1a",
      "purposeCode": "110",
      "remainingTermInMonths": 60,
      "productCode": "Real Estate",
      "loanTypeCode": "Real Estate - Owner Occupied",
      "currentAvailableCredit": 0,
      "collateralCode": "Office Building",
      "troubledDebtRestructure": false,
      "interestRate": 0.097,
      "renewalDate": "2017-12-15",
      "watchList": false,
      "timesPastDue3060": 1,
      "adjustableInterestRate": true,
      "points": 0,
      "refinance": false,
      "originationDate": "2007-01-31",
      "accruedInterest": 274.23,
      "maturityDate": "2030-12-15",
      "timesPastDue6090": 0,
      "timesPastDue90Plus": 1,
      "originalLoanAmount": 1250000,
      "originalTermInMonths": 60,
      "governmentGuaranteed": false,
      "latestPaymentDate": "2018-08-13",
      "daysCurrentlyPastDue": 19,
      "loanOfficerId": 431871,
      "loanToValueRatio": 0.754,
      "netDeferredFeesOrCosts": 1200,
      "nonAccrual": false,
      "riskRating": 4,
      "isDeleted": false
    }
    

    The portfolio loan has been created succesfully. The portfolio loan that was created is returned and has the Sageworks id that was assigned.

    Responses

    Status Meaning Description Schema
    201 Created The portfolio loan has been created succesfully. The portfolio loan that was created is returned and has the Sageworks id that was assigned. PortfolioLoan
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    GetById

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/portfolio-loans/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/portfolio-loans/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/portfolio-loans/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/portfolio-loans/{id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/portfolio-loans/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/portfolio-loans/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/portfolio-loans/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/portfolio-loans/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/portfolio-loans/{id}

    Gets a portfolio loan by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the portfolio loan to get

    Example responses

    200 undefined

    {
      "paymentType": "fixedPayment",
      "paymentAmount": 5523,
      "unamortizedPremium": 1312,
      "paymentFrequency": "monthly",
      "customerId": 29377226,
      "bookBalance": 573000.32,
      "currentBalance": 573000.32,
      "loanNumber": "100041235",
      "dayCountConvention": "c_30_360",
      "callCode": "1a",
      "purposeCode": "110",
      "remainingTermInMonths": 60,
      "productCode": "Real Estate",
      "loanTypeCode": "Real Estate - Owner Occupied",
      "currentAvailableCredit": 0,
      "collateralCode": "Office Building",
      "troubledDebtRestructure": false,
      "interestRate": 0.097,
      "renewalDate": "2017-12-15",
      "watchList": false,
      "timesPastDue3060": 1,
      "adjustableInterestRate": true,
      "points": 0,
      "refinance": false,
      "originationDate": "2007-01-31",
      "accruedInterest": 274.23,
      "maturityDate": "2030-12-15",
      "timesPastDue6090": 0,
      "timesPastDue90Plus": 1,
      "originalLoanAmount": 1250000,
      "originalTermInMonths": 60,
      "governmentGuaranteed": false,
      "latestPaymentDate": "2018-08-13",
      "daysCurrentlyPastDue": 19,
      "loanOfficerId": 431871,
      "loanToValueRatio": 0.754,
      "netDeferredFeesOrCosts": 1200,
      "nonAccrual": false,
      "riskRating": 4,
      "isDeleted": false
    }
    

    Gets the portfolio loan with the specified id

    Responses

    Status Meaning Description Schema
    200 OK Gets the portfolio loan with the specified id PortfolioLoan
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Delete

    Code samples

    # You can also use wget
    curl -X DELETE https://api.sageworks.com/v1/portfolio-loans/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://api.sageworks.com/v1/portfolio-loans/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/portfolio-loans/{id}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/portfolio-loans/{id}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.delete 'https://api.sageworks.com/v1/portfolio-loans/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://api.sageworks.com/v1/portfolio-loans/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/portfolio-loans/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("DELETE");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://api.sageworks.com/v1/portfolio-loans/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /v1/portfolio-loans/{id}

    Deletes a portfolio loan by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing portfolio loan to delete

    Example responses

    400 undefined

    {
      "errorType": "invalidRequest",
      "message": "string",
      "modelErrors": [
        {
          "propertyName": "string",
          "message": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content The portfolio loan has been deleted successfully. None
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Update

    Code samples

    # You can also use wget
    curl -X PATCH https://api.sageworks.com/v1/portfolio-loans/{id} \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PATCH https://api.sageworks.com/v1/portfolio-loans/{id} HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/portfolio-loans/{id}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "paymentType": "fixedPayment",
      "paymentAmount": 5523,
      "unamortizedPremium": 1312,
      "paymentFrequency": "monthly",
      "customerId": 29377226,
      "bookBalance": 573000.32,
      "currentBalance": 573000.32,
      "loanNumber": "100041235",
      "dayCountConvention": "c_30_360",
      "callCode": "1a",
      "purposeCode": "110",
      "remainingTermInMonths": 60,
      "productCode": "Real Estate",
      "loanTypeCode": "Real Estate - Owner Occupied",
      "currentAvailableCredit": 0,
      "collateralCode": "Office Building",
      "troubledDebtRestructure": false,
      "interestRate": 0.097,
      "renewalDate": "2017-12-15",
      "watchList": false,
      "timesPastDue3060": 1,
      "adjustableInterestRate": true,
      "points": 0,
      "refinance": false,
      "originationDate": "2007-01-31",
      "accruedInterest": 274.23,
      "maturityDate": "2030-12-15",
      "timesPastDue6090": 0,
      "timesPastDue90Plus": 1,
      "originalLoanAmount": 1250000,
      "originalTermInMonths": 60,
      "governmentGuaranteed": false,
      "latestPaymentDate": "2018-08-13",
      "daysCurrentlyPastDue": 19,
      "loanOfficerId": 431871,
      "loanToValueRatio": 0.754,
      "netDeferredFeesOrCosts": 1200,
      "nonAccrual": false,
      "riskRating": 4,
      "isDeleted": false
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/portfolio-loans/{id}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.patch 'https://api.sageworks.com/v1/portfolio-loans/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.patch('https://api.sageworks.com/v1/portfolio-loans/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/portfolio-loans/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PATCH");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://api.sageworks.com/v1/portfolio-loans/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PATCH /v1/portfolio-loans/{id}

    Updates a loan

    Body parameter

    {
      "paymentType": "fixedPayment",
      "paymentAmount": 5523,
      "unamortizedPremium": 1312,
      "paymentFrequency": "monthly",
      "customerId": 29377226,
      "bookBalance": 573000.32,
      "currentBalance": 573000.32,
      "loanNumber": "100041235",
      "dayCountConvention": "c_30_360",
      "callCode": "1a",
      "purposeCode": "110",
      "remainingTermInMonths": 60,
      "productCode": "Real Estate",
      "loanTypeCode": "Real Estate - Owner Occupied",
      "currentAvailableCredit": 0,
      "collateralCode": "Office Building",
      "troubledDebtRestructure": false,
      "interestRate": 0.097,
      "renewalDate": "2017-12-15",
      "watchList": false,
      "timesPastDue3060": 1,
      "adjustableInterestRate": true,
      "points": 0,
      "refinance": false,
      "originationDate": "2007-01-31",
      "accruedInterest": 274.23,
      "maturityDate": "2030-12-15",
      "timesPastDue6090": 0,
      "timesPastDue90Plus": 1,
      "originalLoanAmount": 1250000,
      "originalTermInMonths": 60,
      "governmentGuaranteed": false,
      "latestPaymentDate": "2018-08-13",
      "daysCurrentlyPastDue": 19,
      "loanOfficerId": 431871,
      "loanToValueRatio": 0.754,
      "netDeferredFeesOrCosts": 1200,
      "nonAccrual": false,
      "riskRating": 4,
      "isDeleted": false
    }
    

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing loan to update
    body body PortfolioLoan false The loan values to update

    Example responses

    200 undefined

    {
      "paymentType": "fixedPayment",
      "paymentAmount": 5523,
      "unamortizedPremium": 1312,
      "paymentFrequency": "monthly",
      "customerId": 29377226,
      "bookBalance": 573000.32,
      "currentBalance": 573000.32,
      "loanNumber": "100041235",
      "dayCountConvention": "c_30_360",
      "callCode": "1a",
      "purposeCode": "110",
      "remainingTermInMonths": 60,
      "productCode": "Real Estate",
      "loanTypeCode": "Real Estate - Owner Occupied",
      "currentAvailableCredit": 0,
      "collateralCode": "Office Building",
      "troubledDebtRestructure": false,
      "interestRate": 0.097,
      "renewalDate": "2017-12-15",
      "watchList": false,
      "timesPastDue3060": 1,
      "adjustableInterestRate": true,
      "points": 0,
      "refinance": false,
      "originationDate": "2007-01-31",
      "accruedInterest": 274.23,
      "maturityDate": "2030-12-15",
      "timesPastDue6090": 0,
      "timesPastDue90Plus": 1,
      "originalLoanAmount": 1250000,
      "originalTermInMonths": 60,
      "governmentGuaranteed": false,
      "latestPaymentDate": "2018-08-13",
      "daysCurrentlyPastDue": 19,
      "loanOfficerId": 431871,
      "loanToValueRatio": 0.754,
      "netDeferredFeesOrCosts": 1200,
      "nonAccrual": false,
      "riskRating": 4,
      "isDeleted": false
    }
    

    Returns the modified loan

    Responses

    Status Meaning Description Schema
    200 OK Returns the modified loan PortfolioLoan
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Proposed Loans

    GetPaged

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/proposed-loans \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/proposed-loans HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/proposed-loans',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/proposed-loans',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/proposed-loans',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/proposed-loans', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/proposed-loans");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/proposed-loans", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/proposed-loans

    Gets all proposed loans

    Parameters

    Parameter In Type Required Description
    page query integer(int32) false The page number of results to retrieve (first page = 1, default = 1)
    perPage query integer(int32) false The number of records to return on each page (minimum = 1, maximum = 1000, default = 200)
    customerId query integer(int32) false CustomerId value to filter by

    Example responses

    200 undefined

    {
      "items": [
        {
          "paymentType": "fixedPayment",
          "customerId": 123456987,
          "riskRating": 3,
          "adjustableInterestRate": true,
          "callCode": "1e1",
          "collateralCode": "Boats",
          "dayCountConvention": "c_Actual_365",
          "interestRate": 0.079,
          "isDeleted": false,
          "loanAmount": 798550,
          "loanName": "70045698",
          "loanOfficerId": 12345778,
          "loanTerm": 60,
          "loanTypeCode": "Marine Establishments",
          "paymentAmount": 27000,
          "paymentFrequency": "quarterly",
          "productCode": "Marine Establishments - East",
          "purposeCode": "Business expansion",
          "status": "approved"
        }
      ]
    }
    

    Gets all of the proposed loans in the account

    Responses

    Status Meaning Description Schema
    200 OK Gets all of the proposed loans in the account CollectionResponse<ProposedLoan>
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Create

    Code samples

    # You can also use wget
    curl -X POST https://api.sageworks.com/v1/proposed-loans \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    POST https://api.sageworks.com/v1/proposed-loans HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/proposed-loans',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "paymentType": "fixedPayment",
      "customerId": 123456987,
      "riskRating": 3,
      "adjustableInterestRate": true,
      "callCode": "1e1",
      "collateralCode": "Boats",
      "dayCountConvention": "c_Actual_365",
      "interestRate": 0.079,
      "isDeleted": false,
      "loanAmount": 798550,
      "loanName": "70045698",
      "loanOfficerId": 12345778,
      "loanTerm": 60,
      "loanTypeCode": "Marine Establishments",
      "paymentAmount": 27000,
      "paymentFrequency": "quarterly",
      "productCode": "Marine Establishments - East",
      "purposeCode": "Business expansion",
      "status": "approved"
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/proposed-loans',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.post 'https://api.sageworks.com/v1/proposed-loans',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.post('https://api.sageworks.com/v1/proposed-loans', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/proposed-loans");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("POST");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.sageworks.com/v1/proposed-loans", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /v1/proposed-loans

    Creates a proposed loan

    Body parameter

    {
      "paymentType": "fixedPayment",
      "customerId": 123456987,
      "riskRating": 3,
      "adjustableInterestRate": true,
      "callCode": "1e1",
      "collateralCode": "Boats",
      "dayCountConvention": "c_Actual_365",
      "interestRate": 0.079,
      "isDeleted": false,
      "loanAmount": 798550,
      "loanName": "70045698",
      "loanOfficerId": 12345778,
      "loanTerm": 60,
      "loanTypeCode": "Marine Establishments",
      "paymentAmount": 27000,
      "paymentFrequency": "quarterly",
      "productCode": "Marine Establishments - East",
      "purposeCode": "Business expansion",
      "status": "approved"
    }
    

    Parameters

    Parameter In Type Required Description
    body body ProposedLoan false The proposed loan to create

    Example responses

    201 undefined

    {
      "paymentType": "fixedPayment",
      "customerId": 123456987,
      "riskRating": 3,
      "adjustableInterestRate": true,
      "callCode": "1e1",
      "collateralCode": "Boats",
      "dayCountConvention": "c_Actual_365",
      "interestRate": 0.079,
      "isDeleted": false,
      "loanAmount": 798550,
      "loanName": "70045698",
      "loanOfficerId": 12345778,
      "loanTerm": 60,
      "loanTypeCode": "Marine Establishments",
      "paymentAmount": 27000,
      "paymentFrequency": "quarterly",
      "productCode": "Marine Establishments - East",
      "purposeCode": "Business expansion",
      "status": "approved"
    }
    

    The proposed loan has been created succesfully. The proposed loan that was created is returned and has the Sageworks id that was assigned.

    Responses

    Status Meaning Description Schema
    201 Created The proposed loan has been created succesfully. The proposed loan that was created is returned and has the Sageworks id that was assigned. ProposedLoan
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None

    GetById

    Code samples

    # You can also use wget
    curl -X GET https://api.sageworks.com/v1/proposed-loans/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    GET https://api.sageworks.com/v1/proposed-loans/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/proposed-loans/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/proposed-loans/{id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.get 'https://api.sageworks.com/v1/proposed-loans/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.get('https://api.sageworks.com/v1/proposed-loans/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/proposed-loans/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.sageworks.com/v1/proposed-loans/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /v1/proposed-loans/{id}

    Gets a proposed loan by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the proposed loan to get

    Example responses

    200 undefined

    {
      "paymentType": "fixedPayment",
      "customerId": 123456987,
      "riskRating": 3,
      "adjustableInterestRate": true,
      "callCode": "1e1",
      "collateralCode": "Boats",
      "dayCountConvention": "c_Actual_365",
      "interestRate": 0.079,
      "isDeleted": false,
      "loanAmount": 798550,
      "loanName": "70045698",
      "loanOfficerId": 12345778,
      "loanTerm": 60,
      "loanTypeCode": "Marine Establishments",
      "paymentAmount": 27000,
      "paymentFrequency": "quarterly",
      "productCode": "Marine Establishments - East",
      "purposeCode": "Business expansion",
      "status": "approved"
    }
    

    Gets the proposed loan with the specified id

    Responses

    Status Meaning Description Schema
    200 OK Gets the proposed loan with the specified id ProposedLoan
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Delete

    Code samples

    # You can also use wget
    curl -X DELETE https://api.sageworks.com/v1/proposed-loans/{id} \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    DELETE https://api.sageworks.com/v1/proposed-loans/{id} HTTP/1.1
    Host: api.sageworks.com
    
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/proposed-loans/{id}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/proposed-loans/{id}',
    {
      method: 'DELETE',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.delete 'https://api.sageworks.com/v1/proposed-loans/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.delete('https://api.sageworks.com/v1/proposed-loans/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/proposed-loans/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("DELETE");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://api.sageworks.com/v1/proposed-loans/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /v1/proposed-loans/{id}

    Deletes a proposed loan by id

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing proposed loan to delete

    Example responses

    400 undefined

    {
      "errorType": "invalidRequest",
      "message": "string",
      "modelErrors": [
        {
          "propertyName": "string",
          "message": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    204 No Content The proposed loan has been deleted successfully. None
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Update

    Code samples

    # You can also use wget
    curl -X PATCH https://api.sageworks.com/v1/proposed-loans/{id} \
      -H 'Content-Type: application/json-patch+json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Bearer {access-token}'
    
    
    PATCH https://api.sageworks.com/v1/proposed-loans/{id} HTTP/1.1
    Host: api.sageworks.com
    Content-Type: application/json-patch+json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    $.ajax({
      url: 'https://api.sageworks.com/v1/proposed-loans/{id}',
      method: 'patch',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "paymentType": "fixedPayment",
      "customerId": 123456987,
      "riskRating": 3,
      "adjustableInterestRate": true,
      "callCode": "1e1",
      "collateralCode": "Boats",
      "dayCountConvention": "c_Actual_365",
      "interestRate": 0.079,
      "isDeleted": false,
      "loanAmount": 798550,
      "loanName": "70045698",
      "loanOfficerId": 12345778,
      "loanTerm": 60,
      "loanTypeCode": "Marine Establishments",
      "paymentAmount": 27000,
      "paymentFrequency": "quarterly",
      "productCode": "Marine Establishments - East",
      "purposeCode": "Business expansion",
      "status": "approved"
    }';
    const headers = {
      'Content-Type':'application/json-patch+json',
      'Accept':'application/json',
      'Authorization':'Bearer {access-token}'
    
    };
    
    fetch('https://api.sageworks.com/v1/proposed-loans/{id}',
    {
      method: 'PATCH',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json-patch+json',
      'Accept' => 'application/json',
      'Authorization' => 'Bearer {access-token}'
    }
    
    result = RestClient.patch 'https://api.sageworks.com/v1/proposed-loans/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json-patch+json',
      'Accept': 'application/json',
      'Authorization': 'Bearer {access-token}'
    }
    
    r = requests.patch('https://api.sageworks.com/v1/proposed-loans/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    URL obj = new URL("https://api.sageworks.com/v1/proposed-loans/{id}");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestMethod("PATCH");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json-patch+json"},
            "Accept": []string{"application/json"},
            "Authorization": []string{"Bearer {access-token}"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PATCH", "https://api.sageworks.com/v1/proposed-loans/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PATCH /v1/proposed-loans/{id}

    Updates a proposed loan

    Body parameter

    {
      "paymentType": "fixedPayment",
      "customerId": 123456987,
      "riskRating": 3,
      "adjustableInterestRate": true,
      "callCode": "1e1",
      "collateralCode": "Boats",
      "dayCountConvention": "c_Actual_365",
      "interestRate": 0.079,
      "isDeleted": false,
      "loanAmount": 798550,
      "loanName": "70045698",
      "loanOfficerId": 12345778,
      "loanTerm": 60,
      "loanTypeCode": "Marine Establishments",
      "paymentAmount": 27000,
      "paymentFrequency": "quarterly",
      "productCode": "Marine Establishments - East",
      "purposeCode": "Business expansion",
      "status": "approved"
    }
    

    Parameters

    Parameter In Type Required Description
    id path integer(int32) true id of the existing proposed loan to update
    body body ProposedLoan false The proposed loan values to update

    Example responses

    200 undefined

    {
      "paymentType": "fixedPayment",
      "customerId": 123456987,
      "riskRating": 3,
      "adjustableInterestRate": true,
      "callCode": "1e1",
      "collateralCode": "Boats",
      "dayCountConvention": "c_Actual_365",
      "interestRate": 0.079,
      "isDeleted": false,
      "loanAmount": 798550,
      "loanName": "70045698",
      "loanOfficerId": 12345778,
      "loanTerm": 60,
      "loanTypeCode": "Marine Establishments",
      "paymentAmount": 27000,
      "paymentFrequency": "quarterly",
      "productCode": "Marine Establishments - East",
      "purposeCode": "Business expansion",
      "status": "approved"
    }
    

    Returns the modified proposed loan

    Responses

    Status Meaning Description Schema
    200 OK Returns the modified proposed loan ProposedLoan
    400 Bad Request Bad Request Error
    401 Unauthorized Unauthorized None
    403 Forbidden Forbidden None
    404 Not Found Not Found None

    Schemas

    Customer

    {
      "isDeleted": false,
      "name": "Example, LLC",
      "addresses": [
        {
          "line1": "123 Main St",
          "line2": "Apt 4B",
          "city": "Example City",
          "state": "NY",
          "postalCode": "00101",
          "country": "US",
          "addressType": "primary"
        }
      ]
    }
    

    Properties

    A financial institution customer

    Name Type Required Description
    id integer(int32) false The id of the customer in Sageworks
    name string false Name of the customer
    dba string false The name that the customer is "doing business as"
    firstName string false First name of the customer (people only)
    lastName string false Last name of the customer (people only)
    creditScore integer(int32) false Credit score of the customer
    businessType string false Type of business (ex: C Corporation, LLC, Partnership, etc.)
    dnbScore string false DNB score of the customer
    namePrefix string false Prefix of the customer's name (ex: Mr, Mrs, Dr, etc.)
    jobTitle string false Job title of the customer
    addresses [Address] true Addresses of the customer. The customer may have multiple addresses (ex: primary, mailing)
    phoneNumbers [PhoneNumber] false Phone numbers of the customer. The customer may have multiple phone numbers (ex: primary, mobile, fax)
    type string true Type of customer (business, person, farm, etc.)
    emailAddress string false Email address of the customer
    industryCode string false The NAICS code related to the customer
    isDeleted boolean false Indicates if this customer has been deleted
    uniqueIdentifier string false Something that uniquely identifies this customer (usually a "customer number" or tax id from the core system)
    taxId string false Tax ID of the customer

    Enumerated Values

    Property Value
    businessType cCorp
    businessType llc
    businessType llp
    businessType partnership
    businessType sCorp
    businessType soleProp
    businessType nonProfit501C1
    businessType other
    businessType nonProfit501C2
    businessType nonProfit501C3
    businessType nonProfit501C4
    businessType nonProfit501C5
    businessType nonProfit501C6
    businessType nonProfit501C7
    businessType nonProfit501C8
    businessType nonProfit501C9
    businessType nonProfit501C10
    businessType nonProfit501C11
    businessType nonProfit501C12
    businessType nonProfit501C13
    businessType nonProfit501C14
    businessType nonProfit501C15
    businessType nonProfit501C16
    businessType nonProfit501C17
    businessType nonProfit501C18
    businessType nonProfit501C19
    businessType nonProfit501C20
    businessType nonProfit501C21
    businessType nonProfit501C22
    businessType nonProfit501C23
    businessType nonProfit501C24
    businessType nonProfit501C25
    businessType nonProfit501C26
    businessType nonProfit501C27
    businessType nonProfit501C28
    businessType nonProfit501C29
    businessType nonProfit501D
    businessType nonProfit501E
    businessType nonProfit501F
    businessType nonProfit501K
    businessType nonProfit501N
    businessType nonProfit501A
    businessType nonProfit527
    type business
    type person
    type farm
    type nonProfit

    Address

    {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "state": "string",
      "postalCode": "string",
      "country": "string",
      "addressType": "primary"
    }
    

    Properties

    Represents an address

    Name Type Required Description
    line1 string false The first line of the address
    line2 string false The second line of the address
    city string false City of the address
    state string false State of the address
    postalCode string false Postal code of the address
    country string false Country of the address
    addressType string false Type of address (primary, mailing)

    Enumerated Values

    Property Value
    addressType primary
    addressType mailing

    PhoneNumber

    {
      "type": "primary",
      "number": "string"
    }
    

    Properties

    Represents a phone number

    Name Type Required Description
    type string false The type of phone number (ex: primary, mobile, fax)
    number string false The phone number

    Enumerated Values

    Property Value
    type primary
    type mobile
    type fax

    Error

    {
      "errorType": "invalidRequest",
      "message": "string",
      "modelErrors": [
        {
          "propertyName": "string",
          "message": "string"
        }
      ]
    }
    

    Properties

    Represents an error that occurred while making processing an API call

    Name Type Required Description
    errorType string false Type of error that occurred
    message string false Error message describing what error occurred and remediation steps for the client (if any)
    modelErrors [ModelError] false Error messages related to input models provided in an API request

    Enumerated Values

    Property Value
    errorType invalidRequest
    errorType serverError
    errorType notFound

    ModelError

    {
      "propertyName": "string",
      "message": "string"
    }
    

    Properties

    Name Type Required Description
    propertyName string false No description
    message string false No description

    PortfolioLoan

    {
      "paymentType": "fixedPayment",
      "paymentAmount": 5523,
      "unamortizedPremium": 1312,
      "paymentFrequency": "monthly",
      "customerId": 29377226,
      "bookBalance": 573000.32,
      "currentBalance": 573000.32,
      "loanNumber": "100041235",
      "dayCountConvention": "c_30_360",
      "callCode": "1a",
      "purposeCode": "110",
      "remainingTermInMonths": 60,
      "productCode": "Real Estate",
      "loanTypeCode": "Real Estate - Owner Occupied",
      "currentAvailableCredit": 0,
      "collateralCode": "Office Building",
      "troubledDebtRestructure": false,
      "interestRate": 0.097,
      "renewalDate": "2017-12-15",
      "watchList": false,
      "timesPastDue3060": 1,
      "adjustableInterestRate": true,
      "points": 0,
      "refinance": false,
      "originationDate": "2007-01-31",
      "accruedInterest": 274.23,
      "maturityDate": "2030-12-15",
      "timesPastDue6090": 0,
      "timesPastDue90Plus": 1,
      "originalLoanAmount": 1250000,
      "originalTermInMonths": 60,
      "governmentGuaranteed": false,
      "latestPaymentDate": "2018-08-13",
      "daysCurrentlyPastDue": 19,
      "loanOfficerId": 431871,
      "loanToValueRatio": 0.754,
      "netDeferredFeesOrCosts": 1200,
      "nonAccrual": false,
      "riskRating": 4,
      "isDeleted": false
    }
    

    Properties

    A loan to a customer of a financial institution

    Name Type Required Description
    id integer(int32) false The id of the loan in Sageworks
    loanNumber string true Loan number assigned to the loan. This is also the unique identifier of the loan in the source system
    customerId integer(int32) true The id of the customer that is the primary borrower for the loan
    currentBalance number(double) false This is the current outstanding amount on the loan prior to any charge-offs and other adjustments
    unamortizedPremium number(double) false Unamortized premium value for the loan
    bookBalance number(double) false This is the balance of the loan after accounting for charge-offs and other adjustments to the current outstanding loan balance.
    riskRating integer(int32) false Risk rating of the loan (typically a number between 1 and 10)
    paymentAmount number(double) false The payment amount for the loan. For fixed principal and fixed payment loans, this will include principal and interest. For lines of credit, this will include interest only.
    paymentFrequency string false The frequency of the payments for the loan (ex: weekly, monthly, annual, etc.)
    paymentType string true The type of payment for the loan (ex: fixed payment, interest only, line of credit, etc.)
    loanOfficerId integer(int32) false if of the loan officer for this loan
    interestRate number(double) false Interest rate for the loan
    callCode string false Code taken from the Report of Condition Schedule RC-C
    collateralCode string false Code to identify the primary type of collateral associated with the loan
    loanTypeCode string false A code to represent the primary type of the loan (ex: CRE, C/I, etc.)
    productCode string false Code for the product that is associated with the loan
    purposeCode string false A code indicating the purpose of the loan
    nonAccrual boolean false Indiciates if the loan has been placed on non accrual
    nonAccrualDate string(date-time) false The date that loan was placed on non accrual
    troubledDebtRestructure boolean false Inidicates if the loan is considered to be a troubled debt restructure
    troubledDebtRestructureDate string(date-time) false The date that the loan became a troubled debt restructure
    adjustableInterestRate boolean false Indiciates if the interest rate for the loan is adjustable
    timesPastDue3060 integer(int32) false Number of times the loan has been past due 30-60 days since origination
    timesPastDue6090 integer(int32) false Number of times the loan has been past due 60-90 days since origination
    timesPastDue90Plus integer(int32) false Number of times the loan has been past due 90 or more days since origination
    daysCurrentlyPastDue integer(int32) false Then number of days that the loan is currently past due
    remainingTermInMonths integer(int32) false Remaining term of the loan in months
    dayCountConvention string false Amortization Days are used to calculate the interest and payment amount for the life of the loan.
    currentAvailableCredit number(double) false Current amount of available credit on the loan
    maturityDate string(date-time) false The date that the loan will expire / mature
    netDeferredFeesOrCosts number(double) false Net deferred loan fees or costs are certain fees and other direct costs associated with originating loans over the life of the loan as an adjustment of yield, net of any related fees received. For purposes of the calculation of reserves for individually analyzed loans, net deferred loan fees or costs should be included in the Total Recorded Investment in the loan
    accruedInterest number(double) false Interest that has accumulated since the principal investment, or since the previous interest payment if there has been one already. For purposes of the calculation of reserves for individually analyzed loans, the accrued interest should be included in the Total Recorded Investment in the loan
    originalLoanAmount number(double) false The amount (full value) of the loan at the time of origination
    originationDate string(date-time) false The date that the loan was originated
    originalTermInMonths integer(int32) false The original term of the loan (in months)
    renewalDate string(date-time) false The renewal date of the loan
    governmentGuaranteed boolean false Indicates if the loan is backed by government guarantees
    governmentGuaranteedPercent number(double) false The percent of the loan balance that is backed by a government guarantee
    governmentGuaranteedBalance number(double) false The dollar amount of the loan balance that is backed by a government guarantee
    watchList boolean false Indicates if the loan has been placed on a watch list
    points number(double) false Points associated with the loan
    refinance boolean false Indicates whether the loan is a refinance
    latestPaymentDate string(date-time) false The date of the most recent payment made on the loan
    loanToValueRatio number(double) false The loan to value (LTV) ratio for the loan
    isDeleted boolean false Indicates if the loan has been deleted

    Enumerated Values

    Property Value
    paymentFrequency annual
    paymentFrequency semiannual
    paymentFrequency quarterly
    paymentFrequency bimonthly
    paymentFrequency monthly
    paymentFrequency semimonthly
    paymentFrequency biweekly
    paymentFrequency weekly
    paymentType fixedPayment
    paymentType fixedPrincipal
    paymentType lineOfCredit
    paymentType revolvingLineOfCredit
    paymentType interestOnly
    paymentType fixedPaymentBalloon
    paymentType fixedPrincipalBalloon
    paymentType singlePaymentBalloon
    paymentType other
    dayCountConvention c_30_360
    dayCountConvention c_30_365
    dayCountConvention c_Actual_360
    dayCountConvention c_Actual_365

    ProposedLoan

    {
      "paymentType": "fixedPayment",
      "customerId": 123456987,
      "riskRating": 3,
      "adjustableInterestRate": true,
      "callCode": "1e1",
      "collateralCode": "Boats",
      "dayCountConvention": "c_Actual_365",
      "interestRate": 0.079,
      "isDeleted": false,
      "loanAmount": 798550,
      "loanName": "70045698",
      "loanOfficerId": 12345778,
      "loanTerm": 60,
      "loanTypeCode": "Marine Establishments",
      "paymentAmount": 27000,
      "paymentFrequency": "quarterly",
      "productCode": "Marine Establishments - East",
      "purposeCode": "Business expansion",
      "status": "approved"
    }
    

    Properties

    A loan to a customer of a financial institution

    Name Type Required Description
    id integer(int32) false The id of the loan in Sageworks
    loanId integer(int32) false The id of the portfolio loan that this proposed loan is associated with (if applicable)
    loanName string true A descriptor that will help identify the loan
    customerId integer(int32) true The id of the customer that is the primary borrower for the loan
    loanAmount number(double) false This is the amount of the proposed loan
    riskRating integer(int32) false Risk rating of the loan (typically a number between 1 and 10)
    paymentAmount number(double) false The payment amount for the loan. For fixed principal and fixed payment loans, this will include principal and interest. For lines of credit, this will include interest only.
    paymentFrequency string false The frequency of the payments for the loan (ex: weekly, monthly, annual, etc.)
    paymentType string true The type of payment for the loan (ex: fixed payment, interest only, line of credit, etc.)
    loanOfficerId integer(int32) false id of the loan officer for this loan
    interestRate number(double) false Interest rate for the loan
    callCode string false Code taken from the Report of Condition Schedule RC-C
    collateralCode string false Code to identify the primary type of collateral associated with the loan
    loanTypeCode string false A code to represent the primary type of the loan (ex: CRE, C/I, etc.)
    productCode string false Code for the product that is associated with the loan
    purposeCode string false A code indicating the purpose of the loan
    adjustableInterestRate boolean false Indiciates if the interest rate for the loan is adjustable
    loanTerm integer(int32) false Total number of payments for the loan
    dayCountConvention string false Amortization Days are used to calculate the interest and payment amount for the life of the loan.
    isDeleted boolean false Indicates if the loan has been deleted
    status string false The status of the proposed loan
    createdDate string(date-time) false READ ONLY - The date that this proposed loan was created
    statusLastUpdatedDate string(date-time) false READ ONLY - The date that the status was last updated for this proposed loan

    Enumerated Values

    Property Value
    paymentFrequency annual
    paymentFrequency semiannual
    paymentFrequency quarterly
    paymentFrequency bimonthly
    paymentFrequency monthly
    paymentFrequency semimonthly
    paymentFrequency biweekly
    paymentFrequency weekly
    paymentType fixedPayment
    paymentType fixedPrincipal
    paymentType lineOfCredit
    paymentType revolvingLineOfCredit
    paymentType interestOnly
    paymentType fixedPaymentBalloon
    paymentType fixedPrincipalBalloon
    paymentType singlePaymentBalloon
    paymentType other
    dayCountConvention c_30_360
    dayCountConvention c_30_365
    dayCountConvention c_Actual_360
    dayCountConvention c_Actual_365
    status approved
    status withdrawn
    status declined
    status associated

    Collateral

    {
      "isDeleted": false,
      "collateralType": "OtherRealEstate",
      "description": "45687 Walker Ave",
      "collateralCode": "330",
      "discountRate": 0.2,
      "originalValue": 990000,
      "mostRecentAppraisalDate": "2018-06-13",
      "mostRecentAppraisalValue": 1250000,
      "customerId": 29377226
    }
    

    Properties

    Collateral used to back a loan

    Name Type Required Description
    id integer(int32) false The id of the collateral in Sageworks
    description string true Description of the collateral
    currentValue number(double) false The current value of the collateral, this value is autocalculated and therefore ignored on POST and PATCH requests
    mostRecentAppraisalValue number(double) false The value of the most recent appraisal for this collateral
    mostRecentAppraisalDate string(date-time) false The date of the most recent appraisal for this collateral
    collateralCode string false A code indicating the type of collateral
    collateralType string false The type of collateral (ex: equipment, land, etc.)
    customerId integer(int32) true Id of the customer that is pledging the collateral
    originalValue number(double) false The original value of the collateral
    discountRate number(double) false Percentage used to "discount" or adjust the current value for this piece of collateral
    isDeleted boolean false Indicates if the collateral has been deleted

    Lien

    {
      "collateralId": 16477786,
      "loanId": 14791684,
      "lienPosition": 1,
      "lienHolder": "My Bank",
      "lienAmount": 20261.12
    }
    

    Properties

    A lien against collateral

    Name Type Required Description
    id integer(int32) false id of the lien in Sageworks
    collateralId integer(int32) true id of the collateral in Sageworks that the lien is associated with
    loanId integer(int32) false id of the loan in Sageworks that the lien is associated with. Not specified if the loan is with a different institution
    lienPosition integer(int32) true The lien position of this loan for this collateral
    lienHolder string false The lien holder for the lien (if the lien is with a different institution)
    lienAmount number(double) false The amount of the lien (if the lien is with a different institution)
    isDeleted boolean false Indicates if the lien has been deleted

    Document

    {
      "description": "Test File",
      "documentDated": "2017-12-31",
      "documentFolderId": 123,
      "name": "Test File.txt"
    }
    

    Properties

    A document in document library

    Name Type Required Description
    id integer(int32) false The id of the document in Sageworks
    documentFolderId integer(int32) false The id of the folder that this document is in
    name string false The name of the document
    sizeInBytes integer(int32) false The size of the file in bytes
    isImage boolean false Indicates if the file is an image
    isDeleted boolean false Indicates if the file has been deleted
    documentDated string(date-time) false The date of the document
    description string false A description of the document
    dateUploaded string(date-time) false Date that the document was uploaded

    DocumentPostRequest

    {
      "associationCustomerId": 123,
      "document": {
        "description": "Test File",
        "documentDated": "2017-12-31",
        "documentFolderId": 123,
        "name": "Test File.txt"
      },
      "documentContent": {
        "content": "dGVzdCBmaWxlDQp0ZXN0IGZpbGUNCnRlc3QgZmlsZQ0KdGVzdCBmaWxlDQp0ZXN0IGZpbGUNCnRlc3QgZmlsZQ0KdGVzdCBmaWxl"
      }
    }
    

    Properties

    A request that includes all the information required to create a new document in document library

    Name Type Required Description
    document Document false No description
    documentContent DocumentContent false No description
    associationCustomerId integer(int32) false CustomerId to associate document with when creating a document in a Customer folder. Not allowed to be specified on documents that are not created in a customer folder

    DocumentContent

    {
      "content": "string"
    }
    

    Properties

    Content of the document

    Name Type Required Description
    content string false Base64 encoded string of the document

    DocumentFolder

    {
      "name": "My Financial Document Folder",
      "type": "customer",
      "isDeleted": false,
      "parentDocumentFolderId": 123
    }
    

    Properties

    A folder in document library

    Name Type Required Description
    id integer(int32) false The id of the folder
    type string false The type of folder
    name string false The name of the folder
    parentDocumentFolderId integer(int32) false The id of the folder that is the parent of this folder, or null if this is a top level folder
    isDeleted boolean false Indicates if the folder has been deleted

    Enumerated Values

    Property Value
    type general
    type customer

    DocumentAssociation

    {
      "documentId": 456,
      "objectType": "PortfolioLoan",
      "objectId": 789
    }
    

    Properties

    An association between a document and another object

    Name Type Required Description
    id integer(int32) false id of the association
    documentId integer(int32) false id of the document that is being associated with another object
    objectType string false The type of object that is being associated with the document
    objectId integer(int32) false The id of the object that is being associated with the document

    Deposit

    {
      "type": "Commercial CD",
      "customerId": 29377226,
      "balance": 12000,
      "isDeleted": false,
      "interestRate": 0.078,
      "annualFees": 100,
      "maturityDate": "2023-05-17",
      "originationDate": "2007-12-01",
      "accountNumber": "12245600014"
    }
    

    Properties

    A deposit account (checking, savings, etc.) in Sageworks

    Name Type Required Description
    id integer(int32) false The id of the deposit account in Sageworks
    accountNumber string true Account number of the deposit
    customerId integer(int32) true The id of the customer that is the owner of this deposit account
    type string true The type of deposit account (ex: Commercial DDA, Personal Savings, etc.)
    balance number(double) false The current balance of the deposit account
    interestRate number(float) false The interest rate of the deposit account
    annualFees number(double) false The annual fees for the deposit account
    originationDate string(date-time) false The date that the deposit account was opened
    maturityDate string(date-time) false The date that the deposit account matures
    isDeleted boolean false Indicates if the deposit account has been deleted

    TaxReturnReaderParsePdfRequest

    {
      "pdfBytes": "string",
      "password": "string"
    }
    

    Properties

    Represents the data required to parse a tax return PDF

    Name Type Required Description
    pdfBytes string false Base64 encoded byte array of the PDF file to parse
    password string false Password of the PDF file (if applicable)

    TaxReturnReaderParsePdfResponse

    {
      "numberOfErrors": 0,
      "taxFormItems": [
        {
          "year": "string",
          "form": "string",
          "schedule": "string",
          "page": 0,
          "line": "string",
          "itemValue": "string"
        }
      ]
    }
    

    Properties

    Result of reading a PDF tax return

    Name Type Required Description
    numberOfErrors integer(int32) false The number of tax form fields that could not be read
    taxFormItems [TaxFormItem] false Represents pieces of tax return data read from the PDF file

    TaxFormItem

    {
      "year": "string",
      "form": "string",
      "schedule": "string",
      "page": 0,
      "line": "string",
      "itemValue": "string"
    }
    

    Properties

    Represents an item from a tax form

    Name Type Required Description
    year string false The year of the tax return that this item appears on (this can be from 2010 - current year)
    form string false The form that this item appears on (1040, 1065, 1120, 8825, or 1120S)
    schedule string false If applicable, the schedule that this item appears on (A, C, D, E, F)
    page integer(int32) false Page number of the tax form that this item appears on
    line string false The line on the tax form that this item corresponds to
    itemValue string false The value of the tax return item after the rawText has been scrubbed

    LoanSegment

    {
      "segmentationCode": "string",
      "totalLoanBalance": 0,
      "totalIndividualLoanBalance": 0,
      "totalPooledLoanBalance": 0,
      "totalOtherLoanBalance": 0,
      "totalPurchasedImpairedLoanBalance": 0,
      "totalPurchasedNonImpairedLoanBalance": 0,
      "totalLoanCount": 0
    }
    

    Properties

    A segment of loans and its associated aggregate balances

    Name Type Required Description
    segmentationCode string false Segmentation code associated with this segment of loans
    totalLoanBalance number(double) false The total balance of all loans in this segment
    totalIndividualLoanBalance number(double) false The total balance of all individual loans in this segment
    totalPooledLoanBalance number(double) false The total balance of all pooled loans in this segment
    totalOtherLoanBalance number(double) false The total balance of all other loans in this segment
    totalPurchasedImpairedLoanBalance number(double) false The total balance of all purchased impaired loans in this segment
    totalPurchasedNonImpairedLoanBalance number(double) false The total balance of all purchased non-impaired loans in this segment
    totalLoanCount integer(int32) false Number of loans in this segment

    LoanOfficer

    {
      "id": 0,
      "firstName": "string",
      "lastName": "string"
    }
    

    Properties

    A loan officer in the Sageworks account

    Name Type Required Description
    id integer(int32) false id of the loan officer
    firstName string false First name of the loan officer
    lastName string false Last name of the loan officer

    CollectionResponse<Customer>

    {
      "items": [
        {
          "isDeleted": false,
          "name": "Example, LLC",
          "addresses": [
            {
              "line1": "123 Main St",
              "line2": "Apt 4B",
              "city": "Example City",
              "state": "NY",
              "postalCode": "00101",
              "country": "US",
              "addressType": "primary"
            }
          ]
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [Customer] false No description

    CollectionResponse<PortfolioLoan>

    {
      "items": [
        {
          "paymentType": "fixedPayment",
          "paymentAmount": 5523,
          "unamortizedPremium": 1312,
          "paymentFrequency": "monthly",
          "customerId": 29377226,
          "bookBalance": 573000.32,
          "currentBalance": 573000.32,
          "loanNumber": "100041235",
          "dayCountConvention": "c_30_360",
          "callCode": "1a",
          "purposeCode": "110",
          "remainingTermInMonths": 60,
          "productCode": "Real Estate",
          "loanTypeCode": "Real Estate - Owner Occupied",
          "currentAvailableCredit": 0,
          "collateralCode": "Office Building",
          "troubledDebtRestructure": false,
          "interestRate": 0.097,
          "renewalDate": "2017-12-15",
          "watchList": false,
          "timesPastDue3060": 1,
          "adjustableInterestRate": true,
          "points": 0,
          "refinance": false,
          "originationDate": "2007-01-31",
          "accruedInterest": 274.23,
          "maturityDate": "2030-12-15",
          "timesPastDue6090": 0,
          "timesPastDue90Plus": 1,
          "originalLoanAmount": 1250000,
          "originalTermInMonths": 60,
          "governmentGuaranteed": false,
          "latestPaymentDate": "2018-08-13",
          "daysCurrentlyPastDue": 19,
          "loanOfficerId": 431871,
          "loanToValueRatio": 0.754,
          "netDeferredFeesOrCosts": 1200,
          "nonAccrual": false,
          "riskRating": 4,
          "isDeleted": false
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [PortfolioLoan] false No description

    CollectionResponse<ProposedLoan>

    {
      "items": [
        {
          "paymentType": "fixedPayment",
          "customerId": 123456987,
          "riskRating": 3,
          "adjustableInterestRate": true,
          "callCode": "1e1",
          "collateralCode": "Boats",
          "dayCountConvention": "c_Actual_365",
          "interestRate": 0.079,
          "isDeleted": false,
          "loanAmount": 798550,
          "loanName": "70045698",
          "loanOfficerId": 12345778,
          "loanTerm": 60,
          "loanTypeCode": "Marine Establishments",
          "paymentAmount": 27000,
          "paymentFrequency": "quarterly",
          "productCode": "Marine Establishments - East",
          "purposeCode": "Business expansion",
          "status": "approved"
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [ProposedLoan] false No description

    CollectionResponse<Collateral>

    {
      "items": [
        {
          "isDeleted": false,
          "collateralType": "OtherRealEstate",
          "description": "45687 Walker Ave",
          "collateralCode": "330",
          "discountRate": 0.2,
          "originalValue": 990000,
          "mostRecentAppraisalDate": "2018-06-13",
          "mostRecentAppraisalValue": 1250000,
          "customerId": 29377226
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [Collateral] false No description

    CollectionResponse<Lien>

    {
      "items": [
        {
          "collateralId": 16477786,
          "loanId": 14791684,
          "lienPosition": 1,
          "lienHolder": "My Bank",
          "lienAmount": 20261.12
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [Lien] false No description

    CollectionResponse<Document>

    {
      "items": [
        {
          "description": "Test File",
          "documentDated": "2017-12-31",
          "documentFolderId": 123,
          "name": "Test File.txt"
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [Document] false No description

    CollectionResponse<DocumentFolder>

    {
      "items": [
        {
          "name": "My Financial Document Folder",
          "type": "customer",
          "isDeleted": false,
          "parentDocumentFolderId": 123
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [DocumentFolder] false No description

    CollectionResponse<DocumentAssociation>

    {
      "items": [
        {
          "documentId": 456,
          "objectType": "PortfolioLoan",
          "objectId": 789
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [DocumentAssociation] false No description

    CollectionResponse<Deposit>

    {
      "items": [
        {
          "type": "Commercial CD",
          "customerId": 29377226,
          "balance": 12000,
          "isDeleted": false,
          "interestRate": 0.078,
          "annualFees": 100,
          "maturityDate": "2023-05-17",
          "originationDate": "2007-12-01",
          "accountNumber": "12245600014"
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [Deposit] false No description

    CollectionResponse<LoanSegment>

    {
      "items": [
        {
          "segmentationCode": "string",
          "totalLoanBalance": 0,
          "totalIndividualLoanBalance": 0,
          "totalPooledLoanBalance": 0,
          "totalOtherLoanBalance": 0,
          "totalPurchasedImpairedLoanBalance": 0,
          "totalPurchasedNonImpairedLoanBalance": 0,
          "totalLoanCount": 0
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [LoanSegment] false No description

    CollectionResponse<LoanOfficer>

    {
      "items": [
        {
          "id": 0,
          "firstName": "string",
          "lastName": "string"
        }
      ]
    }
    

    Properties

    Name Type Required Description
    items [LoanOfficer] false No description