curl -d "Username=[USERNAME]&Password=[PASSWORD]" -X POST "https://api.creditriskmonitor.com/v1/Users/Login"
Returns
{"Success":true,"Data":{"SessionKey":"1/1/2019 2:00:00 abcd1234ABCD1234abcd1234ABCD1234"}}
All requests will return a Success and Data field.
If Success is True the request succeded and the Data field will have the resulting data.
If Success is False the request failed and the Data field will have a description of the problem.
A subsequent request to the News endpoint would be
curl -H "Authorization: Bearer 1/1/2019 2:00:00 abcd1234ABCD1234abcd1234ABCD1234" -X GET "https://api.creditriskmonitor.com/v1/News"
If you are a member of our Trade Contributor program you may access Businesses using the CustomerId provided in your trade file by using the CustomerId parameter.
curl -H "Authorization: Bearer 1/1/2019 2:00:00 abcd1234ABCD1234abcd1234ABCD1234" -X GET "https://api.creditriskmonitor.com/v1/Business/IdentificationGroup?CustomerId=[CUSTOMER_ID]"
If you have multiple TradeProviderIds you can GET from or POST to the /v1/Trade/TradeProviders endpoint to get or set your current TradeProviderId. This setting effects any endpoint that recieves the CustomerId parameter.
To get a list of your Accounts use the /v1/Trade/TradeProviders/Accounts endpoint.
There is a rate limit based on the type of user account you have.
User Type | Number of Requests |
---|---|
Ordinary User | 10/hr |
API Developer | 200/hr |
API User | infinite |
Each request will return three headers that describe the rate limit values.
curl -i -H "Authorization: Bearer 1/1/2019 2:00:00 abcd1234ABCD1234abcd1234ABCD1234" -X GET "https://api.creditriskmonitor.com/v1/News"
X-RateLimit-Limit: 200
X-RateLimit-Remaining: 176
X-RateLimit-Reset: 1924
Header Name | Description |
---|---|
X-RateLimit-Limit | The maximum number of request the user is allowed per hour. |
X-RateLimit-Remaining | The number of requests remaining for the current hour. |
X-RateLimit-Reset | The number of seconds until a new quota of requests is allocated to the user. |
The API can respond in either XML or JSON. The response type is set by setting the type parameter.
curl -H "Authorization: Bearer 1/1/2019 2:00:00 abcd1234ABCD1234abcd1234ABCD1234" -X GET "https://api.creditriskmonitor.com/v1/News?type=xml"
<Response>
<Data>
<News>
<description>CRMZ News Service 2019-01-01 00:00:00</description>
<link>https://info.creditriskmonitor.com/NewsStory.aspx?NewsId=1</link>
<pubDate>Tue, 1 Jan 2019 00:00:00 EST</pubDate>
<title>News Title</title>
</News>
</Data>
<Success>true</Success>
</Response>
curl -H "Authorization: Bearer 1/1/2019 2:00:00 abcd1234ABCD1234abcd1234ABCD1234" -X GET "https://api.creditriskmonitor.com/v1/News?type=json"
{
"Success": true,
"Data":
[
{
"title": "News Title",
"link": "https://info.creditriskmonitor.com/NewsStory.aspx?NewsId=1",
"description": "CRMZ News Service 2019-01-01 00:00:00",
"pubDate": "Tue, 1 Jan 2019 00:00:00 EST"
}
]
}