Skip to main content
POST
/
refunds
/
{refundRequestId}
/
approved
Approve a refund request
curl --request POST \
  --url https://api.guile.app/refunds/{refundRequestId}/approved \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": "456.78",
  "note": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "appointmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "requestedAmount": "456.78",
  "reason": "<string>",
  "state": "pending",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "approvedAmount": "456.78",
  "responseNote": "<string>",
  "refundPaymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Path Parameters

refundRequestId
string<uuid>
required

The unique, opaque system identifier for a resource. This case-sensitive ID is also used as path parameters in URLs or in other properties or parameters that reference a resource by ID rather than URL.

Body

application/json

Request body for approving a refund request.

amount
string<decimal>

The amount to approve for refund. If not provided, approves the full requested amount.

Example:

"456.78"

note
string

Optional note from the approver.

Maximum string length: 500

Response

Ok. The operation succeeded.

Represents a refund request from a customer.

id
string<uuid>
required

Unique identifier for the refund request.

appointmentId
string<uuid>
required

The appointment this refund request is for.

requestedAmount
string<decimal>
required

The amount requested for refund.

Example:

"456.78"

reason
string
required

Customer's reason for requesting the refund.

Maximum string length: 500
state
enum<string>
required

The state of the refund request.

Available options:
pending,
approved,
denied,
processed
createdAt
string<date-time>
required

The date-time when this resource was created, in RFC 3339 date-time YYYY-MM-DDThh:mm:ss.sssZ format, UTC. This is derived and immutable.

updatedAt
string<date-time>
required

The date-time when this resource was updated, in RFC 3339 date-time YYYY-MM-DDThh:mm:ss.sssZ format, UTC. This is derived and immutable.

approvedAmount
string<decimal>

The amount approved for refund, if approved.

Example:

"456.78"

responseNote
string

Note from the approver/denier, if provided.

Maximum string length: 500
refundPaymentId
string<uuid>

If approved and processed, the ID of the resulting refund payment.