Skip to main content
PATCH
/
catalog
/
plans
/
{identifier}
/
file
/
{pk}
Update a plan file
curl --request PATCH \
  --url https://api.kelviq.com/api/v1/catalog/plans/{identifier}/file/{pk}/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Plan Terms (v2).pdf",
  "ordering": 1,
  "enabled": true
}
'
{
  "id": "7a3e3411-cef0-4f4e-bdb6-1f74a4f4d2c0",
  "name": "Plan Terms.pdf",
  "file": "media/.../plans/<id>/<uuid>/terms.pdf",
  "ordering": 0,
  "enabled": true,
  "downloadUrl": "https://api.kelviq.com/api/v1/catalog/plans/pro-monthly/file/7a3e3411-cef0-4f4e-bdb6-1f74a4f4d2c0/download/"
}

Documentation Index

Fetch the complete documentation index at: https://docs.kelviq.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The Server API Key obtained from the kelviq application. Pass as a Bearer token in the Authorization header. Example: 'Authorization: Bearer YOUR_API_KEY'

Path Parameters

identifier
string
required

Plan identifier.

pk
string<uuid>
required

Plan file UUID.

Body

application/json

Update display fields of a plan file. The underlying file cannot be replaced.

name
string
Example:

"Plan Terms (v2).pdf"

ordering
integer
Example:

1

enabled
boolean
Example:

true

Response

Updated plan file.

id
string<uuid>
read-only
Example:

"7a3e3411-cef0-4f4e-bdb6-1f74a4f4d2c0"

name
string
Example:

"Plan Terms.pdf"

file
string
read-only
Example:

"media/.../plans/<id>/<uuid>/terms.pdf"

ordering
integer
Example:

0

enabled
boolean
Example:

true

downloadUrl
string<uri>
read-only

URL clients can hit to download the file. Will redirect to a forced-download URL.

Example:

"https://api.kelviq.com/api/v1/catalog/plans/pro-monthly/file/7a3e3411-cef0-4f4e-bdb6-1f74a4f4d2c0/download/"