API – Addresses
Many entities will require address information, and this information can be added or updated either within the UI or through the API, which this article covers. Often, to set the address for an entity in LoanPro, you will send the address information in the address field of the entity.
To update a customer’s address, you will need to send a PUT request to the url of the desired customer. For example, to update a customers address with the customer id of 1137, the url would be https://loanpro.simnang.com/api/public/api/1/odata.svc/Customers(1137)
Below is a sample payload for setting the primary address of a customer:
"address1": "53 321 Street",
- address1 – The street address
- address2 – Any additional street address information (e.g. suite number, apartment number)
- city – The city. In the case of overseas military addresses, this will be a three-letter designation for the branch of the armed forces. APO stands for Army Post Office, and is used for service members in the Army and Air Force. Addresses for Navy ships and installations will use FPO, short for Fleet Post Office. DPO stands for Diplomatic Post Office, the address code for U.S. embassies.
- state – The state, province, or military address designation. States are formatted “geo.state.<State Code>” where <State Code> is the two character abbreviation of the state. See API – Geo Collections.
- zipcode – The ZIP code where the address is located
- country – The country where the address is located
- For Canada, it is formatted "company.country.can"
- The United States is formatted as "company.country.usa"
- geoLat – The latitude of the address (optional)
- geoLon – The longitude of the address (optional)
- active – Set to “1” to be able to use the address
- isVerified – Whether or not the address has been verified (usually through USPS)
- isStandardized – Whether or not the address has been standardized through USPS
Linking Addresses to Customers
To link an address to a customer, include the address in the “PrimaryAddress” or “MailAddress” properties of the customer (see above for how these should look). The PrimaryAddress field will change the customer’s primary address, while the MailAddress field will change the mailing address.