Skip to main content
PATCH
/
api
/
v1
/
cancellation-policies
/
{policy_id}
Update Policy
curl --request PATCH \
  --url https://api.example.com/api/v1/cancellation-policies/{policy_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "name": "<string>",
  "refund_type": "<string>",
  "refund_percentage": 123,
  "refund_window_days": 123,
  "prorate_refund": true,
  "cancellation_fee": 123,
  "apply_to_existing": true,
  "is_default": true,
  "extra_data": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "refund_type": "<string>",
  "refund_percentage": 123,
  "refund_window_days": 123,
  "prorate_refund": true,
  "cancellation_fee": 123,
  "apply_to_existing": true,
  "is_default": true,
  "created_at": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-api-key
string
required

Path Parameters

policy_id
string
required

Body

application/json
name
string | null
refund_type
string | null
refund_percentage
number | null
refund_window_days
integer | null
prorate_refund
boolean | null
cancellation_fee
number | null
apply_to_existing
boolean | null
is_default
boolean | null
extra_data
Extra Data · object | null

Response

Successful Response

id
string<uuid>
required
name
string
required
refund_type
string
required
refund_percentage
number | null
required
refund_window_days
integer
required
prorate_refund
boolean
required
cancellation_fee
number
required
apply_to_existing
boolean
required
is_default
boolean
required
created_at
string<uuid>
required