Skip to content

Get line of credit purchases

Request

Security
oauth2(Required scopes: draw.purchase: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.

loanIdstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-onlyrequired

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

Query
typesArray of strings

The statuses of the purchases to fetch

Items Enum:"regular""refund""cashback"
statusesArray of strings

The statuses of the purchases to fetch

Items Enum:"authorized""pending""settled""canceled""declined""disputed"
cardIdsArray of strings

Filter purchases by one or more card identifiers. Each value can be a Peach public id (CD-...) or an external id (ext-...). Unresolvable ids are silently ignored; if no ids resolve the result set is empty. Omit the param for no filtering.

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.

fromEffectiveAtstring, (date-time)

Used for filtering objects such that effectiveAt is greater than or equal to fromEffectiveAt

toEffectiveAtstring, (date-time)

Used for filtering objects such that effectiveAt is less than or equal to toEffectiveAt

fromCreatedAtstring, (date-time)

Used for filtering objects such that createdAt is greater than or equal to fromCreatedAt

toCreatedAtstring, (date-time)

Used for filtering objects such that createdAt is less than or equal to toCreatedAt

sortByArray of strings

The data attributes by which to sort the results.

Items Enum:"effectiveAt""+effectiveAt""-effectiveAt""createdAt""+createdAt""-createdAt"
GET
/people/{personId}/loans/{loanId}/purchases
curl -i -X GET \
  'https://sandboxapi.peach.finance/api/people/{personId}/loans/{loanId}/purchases?types=regular&statuses=authorized&cardIds=string&limit=25&startingAfter=string&endingBefore=string&fromEffectiveAt=2019-08-24T14%3A15%3A22Z&toEffectiveAt=2019-08-24T14%3A15%3A22Z&fromCreatedAt=2019-08-24T14%3A15%3A22Z&toCreatedAt=2019-08-24T14%3A15%3A22Z&sortBy=effectiveAt' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Success

Bodyapplication/json
countintegerread-only

Total number of items in this result.

statusinteger

HTTP status code.

dataArray of objects(Purchase)
Response
{ "count": 0, "status": 0, "data": [ { … } ] }