API – Customer Phones
Introduction
This article explores how to add or edit a customer's phone number through the API. For a more general overview on how phones are used in LoanPro, see our article on Customer Phone Numbers.
To edit customer phone numbers, send a PUT request to the URL of the customer. This URL is unique to each customer because it includes their individual Customer ID. The URL for a customer ID of 1121 would look like this:
PUT https://loanpro.simnang.com/api/public/api/1/odata.svc/Customers(1121)
Below is a sample body for this request. This payload shows how to include multiple phone numbers in one request.
{
"Phones": {
"results": [
{
"entityId": 3,
"entityType": "Entity.Customer",
"phone": "5555555555",
"type": "customer.phoneType.cell",
"isPrimary": 1,
"isSecondary": 0,
"sbtMktVerifyPIN": "0",
"sbtActVerifyPIN": "0",
"sbtMktVerifyPending": 0,
"sbtActVerifyPending": 0,
"sbtMktVerified": 0,
"sbtActVerified": 0,
"carrierName": "null",
"carrierVerified": 1,
"isLandLine": 0,
"dndEnabled": 0,
"active": 1,
"_updateIndex": 0,
"_index": 0,
"delete": false,
"__isDirty": true,
"__lookupInProgress": false
},
{
"phone": "6666666666",
"isPrimary": "0",
"isSecondary": "1",
"delete": false,
"_index": 1,
"type": "customer.phoneType.home",
"__isDirty": true,
"carrierVerified": 1,
"__lookupInProgress": false,
"carrierName": null,
"isLandLine": 0
},
{
"phone": "7777777777",
"isPrimary": "0",
"isSecondary": "0",
"delete": false,
"_index": 2,
"type": "customer.phoneType.fax",
"__isDirty": true,
"carrierVerified": 1,
"__lookupInProgress": false,
"carrierName": null,
"isLandLine": 0
},
{
"phone": "8888888888",
"isPrimary": "0",
"isSecondary": "0",
"delete": false,
"_index": 3,
"type": "customer.phoneType.cellSmartPhone",
"__isDirty": true,
"carrierVerified": 1,
"__lookupInProgress": false,
"carrierName": null,
"isLandLine": 0
},
{
"phone": "9999999999",
"isPrimary": "0",
"isSecondary": "0",
"delete": false,
"_index": 4,
"type": "customer.phoneType.office",
"__isDirty": true,
"carrierVerified": 1,
"__lookupInProgress": false,
"carrierName": null,
"isLandLine": 0
},
{
"phone": "4444444444",
"isPrimary": "0",
"isSecondary": "0",
"delete": false,
"_index": 5,
"type": "customer.phoneType.other",
"__isDirty": true,
"carrierVerified": 1,
"__lookupInProgress": true,
"carrierName": null,
"isLandLine": 0
}
]
}
}
Fields Common to all Phone Numbers
Here are descriptions of each parameter in the body of this request:
- phone – The phone number
- isPrimary – Determines whether this is the primary phone number
- isSecondary – Determines whether this is the secondary phone number
- delete – Determines whether to delete the phone number from the customer
- _index – The order to display the phone number (starts from 0)
- type – The type of the phone number (formatted “customer.phoneType.<Type>”)
- Values for <Type> :
- cell – A cell phone
- cellSmartPhone – A smart cellular phone
- home – A home phone
- fax – A fax number
- office – An office/work phone
- other – Other phone
- Values for <Type> :
- __isDirty – If the phone number has been changed (set to “true” for all update and creation requests)
- carrierVerified – Determines whether a carrier lookup has been performed
- __lookupInProgress – Determines whether a carrier lookup is in progress
- carrierName – The name of the carrier
- isLandLine – Determines whether the carrier reports that the phone is a land line
Fields for SBT verified Phone Numbers
These fields are only applicable if you want to use Solutions By Text (SBT) for a phone number.
Variable | Description |
sbtMktVerifyPIN | The SBT Marketing Verification PIN |
sbtActVerifyPIN | The SBT Account Verify PIN |
sbtMktVerifyPending | Determines whether the verification for SBT Marketing is pending |
sbtActVerifyPending | Determines whether the verification for SBT Account is pending |
sbtMktVerified | Determines whether the the number has been verified for SBT Marketing |
sbtActVerified | Determines whether the the number has been verified for SBT Account |