Skip to main content
PATCH
/
v1
/
platform
/
businesses
/
{business_id}
/
vendor-refunds
/
{refund_id}
Update vendor refund
curl --request PATCH \
  --url https://sandbox.thredfi.com/v1/platform/businesses/{business_id}/vendor-refunds/{refund_id}/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "<string>",
  "memo": "<string>",
  "reason": "<string>",
  "metadata": "<unknown>",
  "expected_completion_date": "2023-12-25",
  "document": {
    "file": "<string>",
    "document_type": "vendor_refund",
    "upload_source": "<string>",
    "metadata": "<unknown>",
    "tags": "<unknown>"
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "vendor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "vendor_name": "<string>",
  "total_refunded_amount": 123,
  "allocated_amount": 123,
  "unallocated_amount": 123,
  "allocations": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount": 123,
      "bill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "bill_number": "<string>",
      "bill_outstanding_balance_cents": 123,
      "bill_payment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "target_description": "<string>",
      "allocation_type": "bill",
      "allocation_date": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "metadata": "<unknown>"
    }
  ],
  "vendor_refund_payments": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "vendor_refund_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "refunded_amount": 123,
      "processing_fee": 123,
      "net_amount": 123,
      "reconciled_bank_transactions": [
        {
          "bank_transaction_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "bank_transaction_date": "2023-11-07T05:31:56Z",
          "bank_transaction_amount_cents": 123,
          "bank_transaction_direction": "<string>",
          "reconciled_amount_cents": 123,
          "reconciliation_link_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "reconciled_at": "2023-11-07T05:31:56Z",
          "currency": "<string>",
          "payment_type": "<string>",
          "bank_account_name": "<string>",
          "notes": "<string>"
        }
      ],
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "payment_reference": "<string>",
      "processor_payment_id": "<string>",
      "payment_date": "2023-12-25",
      "payment_method": "bank_transfer",
      "processor": "stripe",
      "status": "pending",
      "submitted_at": "2023-11-07T05:31:56Z",
      "completed_at": "2023-11-07T05:31:56Z",
      "failed_at": "2023-11-07T05:31:56Z",
      "failure_reason": "<string>",
      "description": "<string>",
      "memo": "<string>",
      "metadata": "<unknown>",
      "transaction_tags": "<unknown>"
    }
  ],
  "document": {
    "url": "<string>",
    "expires_in": 123,
    "document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "file_name": "<string>",
    "file_size": 123,
    "mime_type": "<string>"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "external_id": "<string>",
  "refund_type": "overpayment",
  "reference_number": "<string>",
  "refund_date": "2023-12-25",
  "expected_completion_date": "2023-12-25",
  "currency": "EUR",
  "status": "pending",
  "description": "<string>",
  "memo": "<string>",
  "reason": "<string>",
  "metadata": "<unknown>"
}

Authorizations

Authorization
string
header
required

Business-scoped JWT token. Token payload includes business_id to automatically scope requests. Format: Bearer <your-jwt-token>

Use this for: Business-specific operations where the business context is embedded in the token.

Path Parameters

business_id
string
required
refund_id
string<uuid>
required

A UUID string identifying this vendor refund.

Body

Serializer for updating vendor refunds with optional document upload.

description
string
memo
string
reason
string
Maximum string length: 500
metadata
unknown
expected_completion_date
string<date> | null
document
object

Vendor refund specific document upload payload.

Response

Comprehensive serializer for vendor refund responses. Includes all refund details plus related allocations and payments.

id
string<uuid>
required

Unique vendor refund identifier

vendor_id
string<uuid>
required

UUID of the vendor who issued the refund

vendor_name
string
required

Vendor company name

total_refunded_amount
integer
required

Total refunded amount in cents

allocated_amount
integer
required

Total allocated amount in cents

unallocated_amount
integer
required

Remaining unallocated amount in cents

allocations
object[]
required
vendor_refund_payments
object[]
required
document
object
required

Latest document linked to this vendor refund

created_at
string<date-time>
required

Refund creation timestamp

updated_at
string<date-time>
required

Last update timestamp

external_id
string

Your external system identifier for idempotency

Maximum string length: 255
refund_type
enum<string>

Refund type: overpayment, credit_balance, billing_error, goods_return, duplicate_payment, service_cancellation, other

  • overpayment - Overpayment Refund
  • credit_balance - Credit Balance Refund
  • duplicate_payment - Duplicate Payment
  • billing_error - Billing Error
  • goods_return - Goods Return
  • service_cancellation - Service Cancellation
  • other - Other
Available options:
overpayment,
credit_balance,
duplicate_payment,
billing_error,
goods_return,
service_cancellation,
other
reference_number
string

External reference number for this refund

Maximum string length: 100
refund_date
string<date>

Date when refund was issued

expected_completion_date
string<date> | null

Expected date for refund completion

currency
enum<string>

Refund currency (EUR, GBP, USD)

  • EUR - Euro
  • GBP - British Pound
  • USD - US Dollar
  • SEK - Swedish Krona
  • NOK - Norwegian Krone
  • DKK - Danish Krone
  • ISK - Icelandic Króna
  • MYR - Malaysian Ringgit
  • SGD - Singapore Dollar
Available options:
EUR,
GBP,
USD,
SEK,
NOK,
DKK,
ISK,
MYR,
SGD
status
enum<string>

Refund status: pending, partially_allocated, allocated, completed, cancelled (computed from allocations)

  • pending - Pending
  • partially_allocated - Partially Allocated
  • allocated - Allocated
  • completed - Completed
  • cancelled - Cancelled
Available options:
pending,
partially_allocated,
allocated,
completed,
cancelled
description
string

Description of the refund reason or context

memo
string

Internal memo or notes

reason
string

Detailed explanation for the refund

Maximum string length: 500
metadata
any

Custom key-value pairs