Skip to content

Update purchase dispute

Request

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

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

The draw identifier.

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

The purchase identifier.

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

The ID of the purchase dispute

Query
syncboolean

Make the process synchronous.

Default:false
Bodyapplication/jsonrequired
externalIdstring or null, [ 1 .. 200 ] characters

A lender's identifier for an object.

After the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.

To fetch the object using externalId you need to add ext- to the URL.

Note: Don't add ext- to the identifier value. For example: if the external identifier is ABCDE, then pass externalId=ABCDE and NOT ext-ABCDE when creating the object.

caseIdstring

Peach identifier of the case. The case object contains more details about the dispute, e.g. evidence information such as supporting documents.

disputedAmountnumber, (float)

The disputed amount. Can be less than the original purchase amount. Sum of disputed amounts cannot exceed the original purchase amounts (regardless of disputes outcomes).

metadataobject
repostedPurchaseIdstring

The identifier of the reposted purchase. When a borrower loses a dispute, the lender normally creates a new purchase in the amount of the dispute.

statusstring

The status of the dispute. unsubmitted is the only valid status for a new purchase dispute.

unsubmitted - The dispute is pending submission to a processor/network.

submitted - The dispute has been submitted to a processor/network.

expired - The dispute has expired.

won - The dispute is won.

lost - The dispute is lost.

canceled - The dispute was canceled. Only unsubmitted disputes can be canceled.

Default:"unsubmitted"
Enum:"unsubmitted""submitted""expired""won""lost""canceled"
PUT
/people/{personId}/loans/{loanId}/draws/{drawId}/purchases/{purchaseId}/disputes/{purchaseDisputeId}
curl -i -X PUT \
  'https://sandboxapi.peach.finance/api/people/{personId}/loans/{loanId}/draws/{drawId}/purchases/{purchaseId}/disputes/{purchaseDisputeId}?sync=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "externalId": "string",
    "caseId": "string",
    "disputedAmount": 0.1,
    "metadata": {},
    "repostedPurchaseId": "string",
    "status": "unsubmitted"
  }'

Responses

Success

Bodyapplication/json
messagestring

Description of the server action or error.

statusinteger

HTTP status code.

dataobject(PurchaseDispute)
Response
{ "message": "string", "status": 0, "data": { "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "id": "string", "updatedAt": "2019-08-24T14:15:22Z", "externalId": "string", "cardId": "string", "caseId": "string", "companyId": "string", "disputedAmount": 0.1, "metadata": {}, "repostedPurchaseId": "string", "status": "unsubmitted", "timestamps": { … } } }