Skip to content

Get borrower interactions

Request

Security
oauth2(Required scopes: interaction:list) or bearerAuth or apiKeyHeader
Path
personIdstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-onlyrequired

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

Query
limitinteger, [ 1 .. 100 ]

The maximum count of results to retrieve.

Default:25
startingAfterstring

Return results starting after the provided object identifier.

endingBeforestring

Return results ending before the provided object identifier.

offsetinteger, >= 0

Offset from the start of results.

channelArray of strings

Exactly match the channel over which the interaction took place.

directionstring(InteractionDirection)

Exactly match the direction the interaction—either inbound or outbound.

Enum:"outbound""inbound"
statusArray of strings

Exactly match the status of an interaction.

statusDetailsArray of strings

Exactly match the status details of an interaction.

agentOutcomeArray of strings

Exactly match the agentOutcome of an interaction.

subjectArray of strings

The interaction subject value(s) by which to filter. To match interactions without a subject pass the string "null".

themeArray of strings
caseIdsArray of strings

Exactly matches one of several Peach case IDs (CS-XXXX-XXXX).

contentContainsstring

Search for an exact match in the content of the interaction

sortByArray of strings

The field(s) to sort by.

All fields can be prefixed with a - to indicate the sort should be in descending order, or with a + to indicate the sort should be in ascending order. (Without specifying the order is descending.)

The valid sort by field names are:

id — order by the object creation order. createdAt — order by the createdAt field. startedAt — order by the startedAt field. holdDuration — order by the duration of the voice call on-hold (the holdDuration field.) contactName — order by the name field of the contact for the interaction. scheduledAtFrom — order by the scheduledAtFrom field. scheduledAtTo — order by the scheduledAtTo field. channel — order by the channel field. direction — order by the direction field. status — order by the status field. createdBy.employeeFirstName — order by the firstName field of the employee which created the interaction (only if creator was an employee). createdBy.employeeLastName — order by the lastName field of the employee which created the interaction (only if creator was an employee). createdBy.employeeEmail — order by the email field of the employee which created the interaction (only if creator was an employee). createdBy.employeeDisplayName - order by the full name ({firstName} {lastName}) or, if absent, the email of the employee whihch created the interaction (only if creator was an employee). createdBy.employeeFullNameOrEmail — DEPRECATED alias for createdBy.employeeDisplayName

includeArray of strings, non-empty

A list of additional interaction relationships to include in the response object.

  • When include=borrower the borrower field will be populated (otherwise it will be null). This is data describing the borrower associated with this interaction.
  • When include=contact the contact`` field will be populated (otherwise it will be null`). This is contact data for the contact this interaction was sent to or from.
  • When include=lastTaskMeta the lastTaskMeta field will be populated (otherwise it will be null). This is meta data about the most recently ended task associated with this interaction.

You can include multiple fields by passing multiple values, e.g., include=borrower,contact.

Items Enum:"borrower""contact""lastTaskMeta"
createdAtBeforestring, (date-time)

Filter only objects that were not created at or before the specified timestamp. This timestamp is in UTC.

createdAtAfterstring, (date-time)

Filter only objects that were not created at or after the specified timestamp. This timestamp is in UTC.

startedAtBeforestring, (date-time)

Filter only objects that were not started at or before the specified timestamp. This timestamp is in UTC.

startedAtAfterstring, (date-time)

Filter only objects that were not started at or after the specified timestamp. This timestamp is in UTC.

scheduledAtFromBeforestring, (date-time)

Include only interactions which have a scheduledAtFrom set to before (or equal to) this timestamp. The timestamp must include a timezone (or UTC offset).

scheduledAtFromAfterstring, (date-time)

Include only interactions which have a scheduledAtFrom set to after (or equal to) this timestamp. The timestamp must include a timezone (or UTC offset).

scheduledAtToBeforestring, (date-time)

Include only interactions which have a scheduledAtTo set to before (or equal to) this timestamp. The timestamp must include a timezone (or UTC offset).

scheduledAtToAfterstring, (date-time)

Include only interactions which have a scheduledAtTo set to after (or equal to) this timestamp. The timestamp must include a timezone (or UTC offset).

createdBystring or null

The User ID or Employee ID of the user which created the interaction.

If null is specified then match all interactions with createdBy of null.

hasVoicemailboolean

If true, include only interactions with voicemails—only valid for channel=voicecase. If false, include only interactions without voicemails. If unset, then include any interaction regardless of it having voicemail or not.

Note that a voicemail is different from a call recording. A voicemail is an audio message left by a caller when no pickup by the company was possible. e.g., the call was made while the office was closed or while there were no agents available to answer the call.

hasRecordingboolean

If true match only interactions with call recordings—only valid for channel=voice. If false match only interactions without call recordings. If unset, match any interaction regardless of it have a recording or not.

Note that a call recording is when an agent chooses to record a call, which is different from a voicemail.

sensitiveboolean or null

If true, include only interactions with the sensitive property set to true. If false, include only interactions with the sensitive property set to false. If unset, include any interaction regardless of sensitive property.

isExternalboolean or null

If true, include only interactions with the isExternal property set to true. If false, include only interactions with the isExternal property set to false. If unset, include any interaction regardless of isExternal property.

GET
/people/{personId}/interactions
curl -i -X GET \
  'https://sandboxapi.peach.finance/api/people/{personId}/interactions?limit=25&startingAfter=string&endingBefore=string&offset=0&channel=voice&direction=outbound&status=attempted&statusDetails=voiceSpokeWithFirstParty&agentOutcome=voiceSpokeWithFirstParty&subject=string&theme=agentNotification&caseIds=string&contentContains=string&sortBy=string&include=borrower&createdAtBefore=2019-08-24T14%3A15%3A22Z&createdAtAfter=2019-08-24T14%3A15%3A22Z&startedAtBefore=2019-08-24T14%3A15%3A22Z&startedAtAfter=2019-08-24T14%3A15%3A22Z&scheduledAtFromBefore=2019-08-24T14%3A15%3A22Z&scheduledAtFromAfter=2019-08-24T14%3A15%3A22Z&scheduledAtToBefore=2019-08-24T14%3A15%3A22Z&scheduledAtToAfter=2019-08-24T14%3A15%3A22Z&createdBy=string&hasVoicemail=true&hasRecording=true&sensitive=true&isExternal=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Success

Bodyapplication/json
countintegerread-only

Number of items returned by the current request.

nextUrlstring or nullread-only

URL of the next set of results.

previousUrlstring or nullread-only

URL of the previous set of results.

statusinteger

HTTP status code.

totalintegerread-only

Total number of items in this result.

dataArray of any(Interaction)
Response
{ "count": 0, "nextUrl": "string", "previousUrl": "string", "status": 0, "total": 0, "data": [ { … } ] }