AGORA API
AGORA supports importing data over an HTTP-based API. It accepts the native export formats of various DMS systems to make it as simple as possible to create your own integration without needing to worry about adapting your data.
Authentication
All API requests are authenticated through HTTP Basic Authentication, in addition to an API key unique to your account.
Prerequisites
You must have an AGORA account in order to use the API. Further, an API key is required. This is only visible to the account administrator (normally, the user that created the account) and should only be shared with users you want to grant API access.
To retrieve your API key, click on your user name in the upper right portion of the application and select the 'User Settings' option. At the bottom of the screen you will find the API key for this account.
Testing the API
For all of our examples we will use cURL, a command-line utility for sending HTTP requests. If you do not have cURL the examples should be adaptable to whatever utility to prefer.
curl --user 'username:password' -H 'X-AGORA-API-KEY: your_api_key' -H 'Content-Type: text/plain' https://api.agoradata.com/api/v1/import
If you have setup the request correctly you should receive a response like the following:
AGORA:
performing: https://api.agoradata.com/api/v1/import/agora
non-performing: https://api.agoradata.com/api/v1/import/agora/nonPerforming
bankruptcy: https://api.agoradata.com/api/v1/import/agora/bankruptcy
transactions: https://api.agoradata.com/api/v1/import/agora/transactionHistory
collection notes: https://api.agoradata.com/api/v1/import/agora/collectionNotes
DealerCenter:
performing: https://api.agoradata.com/api/v1/import/dealerCenter
non-performing: https://api.agoradata.com/api/v1/import/dealerCenter/nonPerforming
bankruptcy: https://api.agoradata.com/api/v1/import/dealerCenter/bankruptcy
transactions: https://api.agoradata.com/api/v1/import/dealerCenter/transactionHistory
collection notes: https://api.agoradata.com/api/v1/import/dealerCenter/collectionNotes
Frazer:
performing: https://api.agoradata.com/api/v1/import/frazer
non-performing: Not Supported
bankruptcy: Not Supported
transactions: https://api.agoradata.com/api/v1/import/frazer/transactionHistory
collection notes: https://api.agoradata.com/api/v1/import/frazer/collectionNotes
Wayne Reaves:
performing: https://api.agoradata.com/api/v1/import/wayneReaves
non-performing: https://api.agoradata.com/api/v1/import/wayneReaves/nonPerforming
bankruptcy: https://api.agoradata.com/api/v1/import/wayneReaves/bankruptcy
transactions: https://api.agoradata.com/api/v1/import/wayneReaves/transactionHistory
collection notes: https://api.agoradata.com/api/v1/import/wayneReaves/collectionNotes
If you don't get a response try adding the -vv
flag to the command line. If you aren't getting a 200 response then check that your username/password and API key are correct.
The response contains the endpoints for the DMS systems that AGORA currently supports. This list is subject to change as new DMS systems are integrated.
Importing Data
To import your data, first generate an export from your supported DMS. Place the file somewhere on your file system where you can test an import with the following command.
curl --user 'username:password' -H "Content-Type: text/csv" -H "X-AGORA-API-KEY: your_api_key" -X POST --data-binary "@/path/to/your/agora.csv" https://api.agoradata.com/api/v1/import/agora
Remember to replace the username, password, API key, and path the the file with your information. If the upload succeeds you should receive a HTTP 202 Accepted response with a link in the body that will look like the following:
https://api.agoradata.com/api/v1/uploads/8e93af8d-37c5-48cb-a1aa-7d864f096d1d
Loans, notes and transactions data is processed asynchronously so you can use this link to check on the status of your uploads. While in progress a response will look similar to the following:
curl --user 'username:password' -H "X-AGORA-API-KEY: your_api_key" https://api.agoradata.com/api/v1/uploads/8e93af8d-37c5-48cb-a1aa-7d864f096d1d
{"id":"8b1ee838-721f-4d74-8530-bffa6716bba7", "started":"2018-09-19T16:43:16Z", "fileName":"API_FILE", "numRecords":1000, "result":null, "status":"IN_PROGRESS", "type":"LOAN", "numComplete":2, "numSuccess":2, "startedBy":"api.user@somecompany.com", "errors":[], "link":"https://api.agoradata.com/api/v1/uploads/8e93af8d-37c5-48cb-a1aa-7d864f096d1d
A complete and successful response will look like the following:
{"id":"20f28d4f-44c5-44e8-b6f6-cf9e8b578a1a",
"started":"2018-09-19T16:30:01Z",
"fileName":"API_FILE",
"numRecords":3,
"result":"SUCCESS",
"status":"COMPLETE",
"type":"LOAN",
"numComplete":3,
"numSuccess":3,
"startedBy":"api.user@somecompany.com",
"errors":[],
"link":"https:///api.agoradata.com/v1/uploads/20f28d4f-44c5-44e8-b6f6-cf9e8b578a1a"}
Errors
If there are errors they will be reported, like the following example:
{"id":"8e93af8d-37c5-48cb-a1aa-7d864f096d1d", "started":"2018-09-19T16:24:16Z", "fileName":"API_FILE", "numRecords":11, "result":"FAIL", "status":"COMPLETE", "type":"LOAN", "numComplete":1, "numSuccess":0, "startedBy":"daniel.burke@agoradata.com", "errors":[ {"rowNumber":1,"error":{"Current Date Due":{"error":"required"},"Vehicle Year":{"error":"required"},"APR":{"error":"required"},"Last Name":{"error":"required"},"Vehicle VIN":{"error":"required"},"Social Security":{"error":"required"},"Contract Term":{"error":"required"},"Payment Amt":{"error":"required"},"Payoff Balance":{"error":"required"},"Amt Financed":{"error":"required"},"Loan Status":{"error":"required"},"Principal Balance":{"error":"required"},"1st Payment Date":{"error":"required"},"Interest Method":{"error":"required"},"Vehicle Make":{"error":"required"},"Vehicle Model":{"error":"required"},"Finance Charge":{"error":"required"},"Sale Date":{"error":"required"},"Contract State":{"error":"required"},"Payment Frequency":{"error":"required"},"First Name":{"error":"required"},"Current Gross Balance":{"error":"required"},"Maturity Date":{"error":"required"}}} ], "link":"https://api.agoradata.com/api/v1/uploads/8e93af8d-37c5-48cb-a1aa-7d864f096d1d"}
The errors
field will contain information about each row that could not be processed if the status
field is either PARTIAL_SUCCESS
or FAIL
.
Loan Status and Management
The AGORA API also allows you to find out information about the loans in your portfolio to help you make better use of the API. For example, if you only want to send loans that have changed since the last time an API call was made you can call this API and get the last upload date for each loan in AGORA, as well as the status of that loan:
curl --user 'username:password' -H "X-AGORA-API-KEY: your_api_key" https://api.agoradata.com/api/v1/loans
{"data":[ {"loanNumber":"c34ffa26-1db8-4098-bb0a-60c87d880175","asOf":"2018-09-19T16:43:31Z","status":"ACTIVE"}, {"loanNumber":"94deb152-1e24-4798-872f-5f3da770d094","asOf":"2018-09-19T16:43:31Z","status":"ACTIVE"}, {"loanNumber":"7d90cab7-954d-40be-bd91-ec2987f5f010","asOf":"2018-09-19T16:43:31Z","status":"ACTIVE"}, {"loanNumber":"fe08b65e-a4db-4410-b419-6aea30b813c3","asOf":"2018-09-19T16:43:31Z","status":"ACTIVE"}, {"loanNumber":"f5f0be5e-db9a-4849-98e0-27a972253bbd","asOf":"2018-09-19T16:43:31Z","status":"ACTIVE"}, {"loanNumber":"5ef715e8-9ce7-4f8f-872c-bf4dfc513c35","asOf":"2018-09-19T16:43:31Z","status":"ACTIVE"}, {"loanNumber":"97709aa2-a8fd-4a55-a50e-5ea4277825b9","asOf":"2018-09-19T16:43:31Z","status":"ACTIVE"}, {"loanNumber":"fcc9f238-54ee-4af2-9a1a-13ef5e172f4f","asOf":"2018-09-19T16:43:32Z","status":"ACTIVE"}], "count":8,"success":true}
Deleting Loans
Using the above API you can also deal with loans that are no longer in your DMS, such as when a loan is sold. If a loan is returned in an API call that is no longer in your system you can remove it like so:
curl --user 'username:password' -H "X-AGORA-API-KEY: your_api_key" -X DELETE https://api.agoradata.com/api/v1/loans/<loan number>
Comments
0 comments
Please sign in to leave a comment.