Prerequisites

Before you begin, you’ll need: 

To get started, request developer access here. This allows you to test the APIs and evaluate if they meet your specific needs before committing to a full account.

Authentication Process

Generate Session Key

Your first API call should be to the login endpoint to obtain a : 

curl -d "Username=[USERNAME]&Password=[PASSWORD]" -X POST "https://api.creditriskmonitor.com/v1/Users/Login"

A successful login returns a response containing a : 

{"Success":true,"Data":{"SessionKey":"1/1/2025 2:00:00 abcd1234ABCD1234abcd1234ABCD1234"}}

There is a rate limit based on the type of user account you have:

User TypeRequests per hour
Ordinary10
API Developer200
API Userno limit

Each request will return three headers that describe the rate limit values.

Header NameDescription
X-RateLimit-LimitThe maximum number of request the user is allowed per hour.
X-RateLimit-RemainingThe number of requests remaining for the current hour.
X-RateLimit-ResetThe number of seconds until a new quota of requests is allocated to the user.

Use Session Key

Include the in the header of all subsequent API requests. For example, a subsequent request to the News endpoint would be:

curl -H "Authorization: Bearer 1/1/2025 2:00:00 abcd1234ABCD1234abcd1234ABCD1234" -X GET "https://api.creditriskmonitor.com/v1/News"

Important notes:

  • All API endpoints require a valid
  • Requests without a valid session key will return an error
  • Session keys expire after a period of inactivity
  • If your session key expires, simply generate a new one by logging in again

The API can respond in either XML or JSON, defined by setting the parameter.

curl -H "Authorization: Bearer 1/1/2025 2:00:00 abcd1234ABCD1234abcd1234ABCD1234" -X GET "https://api.creditriskmonitor.com/v1/News?type=xml"

Querying Business Info

In this example, we will write Python code to get basic business info using CreditRiskMonitor API.

Let’s define our CRMZApi class function.

import requests

class CRMZApi:
    baseUrl = 'https://api.creditriskmonitor.com/v1'

    def __init__(self):
        self.sessionKey = None

    def postRequest(self, inputs, endpoint):
        response = requests.post(self.baseUrl + endpoint, data=inputs)
        return json.loads(response.text)
    
    def getRequest(self, endpoint):  
        response = requests.get(self.baseUrl + endpoint, params = '',headers={'Authorization': 'Bearer ' + self.sessionKey})
        return json.loads(response.text)
    
    def login(self, username, password):
        creds = {
            'Username': username,
            'Password': password
        }
        response = self.postRequest(creds, '/Users/Login')
        print(f"Login response: {response}")  
        
        if response["Success"] == True:
            self.sessionKey = response["Data"]["SessionKey"]
            print(f"SessionKey: {self.sessionKey}")  # Added print statement
            return True
        else:
            print("Login failed")  # Added print statement
            return False
    
    def getBusinessInfo(self, BusinessId):
        return self.getRequest('/Business/IdentificationGroup?id=' + str(BusinessId))

# Initialize the CRMZ API
crmz_api = CRMZApi()
username = 'your_username'
password = 'your_password'

Finally, let’s create a function to get information from a business:

def return_business_info(business_id):
    if not crmz_api.sessionKey:
        if not crmz_api.login(username, password):
            return "Failed to login to CRMZ API"
    return crmz_api.getBusinessInfo(business_id)
     
return_business_info(16177150)

By running this code, you will get the output for Tesla Inc as follows:

{'Success': True,
 'Data': {
  'Name': 'Tesla Inc',
  'ParentBusinessId': None,
  'ParentBusinessName': None,
  'BusinessId': 16177150,
  'Address1': '1 Tesla Road',
  'CityName': 'AUSTIN',
  'StateProvinceName': 'TX',
  'PostalCode': '78725',
  'CountryName': 'United States',
  'PhoneNumber': None,
  'FaxNumber': None,
  'EmailAddress': None,
  'TradingStatus': 'A',
  'IncorporatedDate': '2024-06-14',
  'IncorporatedIn': 'USA',
  'IncorporatedInState': 'TX',
  'FederalTaxId': '912197729',
  'CIKNumber': '0001318605',
  'TickerSymbol': 'TSLA',
  'StockExchange': 'NASD',
  'MarketCap': 1267781000000,
  'Employees': 140473,
  'EmployeesAsOfDate': '2023-12-31T00:00:00',
  'PAYCEScore': None,
  'PAYCEScoreDate': None,
  'FriskScore': 10,
  'FriskScoreDate': '2025-01-10T00:00:00',
  'ZScore': 4.2153,
  'ZScoreDate': '2024-09-30T00:00:00',
  'DBTIndex': 9,
  'DBTIndexDate': '2024-11-01T00:00:00',
  'FSRScore': None,
  'FSRScoreDate': None,
  'PublicFilings': 85,
  'WebSite': 'https://www.tesla.com/',
  'SIC': '3711',
  'NAICS': '336110',
  'LatestStatementDate': '2024-09-30T00:00:00',
  'CurrentFiscalYear': 2024,
  'CurrentFiscalQuarter': 3,
  'BankruptcyType': None,
  'BankruptcyDate': None,
  'BankruptcyExitDate': None,
  'TradeAccounts': 315,
  'TotalDue': 400155491,
  'PastDue': 67169118,
  'HighRiskLink': None,
  'CaseStudyLink': None,
  'LastBlogLink': None,
  'FRISKLastChangeDate': '2024-12-20T00:00:00',
  'PAYCELastChangeDate': None,
  'ZScoreLastChangeDate': '2024-10-25T00:00:00',
  'FinancialsLastChangeDate': '2024-10-25T00:00:00',
  'MarketGuideSectorName': 'Consumer Cyclical',
  'MarketGuideIndustryName': 'Auto & Truck Manufacturers',
  'CreditLimitMedian': 386270,
  'CreditLimitVeryHigh': 4775669,
  'ParentFriskScore': None,
  'ParentFriskDate': None,
  'ParentPayceScore': None,
  'ParentPayceDate': None,
  'ParentZScore': None,
  'ParentZDate': None,
  'ParentFSRScore': None,
  'ParentFSRDate': None,
  'ParentDBTIndex': None,
  'ParentDBTDate': None
  }}

Add more API endpoints to the CRMZ API Class to easily access other data points in your code.

This fast configuration demonstrates how to create a basic code to extract data from CreditRiskMonitor. You can go ahead and expand on this workflow to suit your particular requirements.

Next Steps

Having engaged swiftly with our APIs, it’s now the moment to delve into additional possibilities:

Was this page helpful?