Skip to content

Black Friday:

60% off

Cliedesk Pro

Every plan, every site count. Ends Cyber Monday.

00 days 00 hrs 00 min 00 sec
Claim 60% off

REST API v1

Product access

Base URL https://your-site.com/wp-json/cliedesk-api/v1. See the overview for keys, scopes and errors.

List product access records

GET /access

Scope access:read · Cost 1

Parameters

NameTypeDescription
product_id query · string
contact_id query · string
source_id query · integer
status query · string One of: trial, active, past_due, expired, cancelled, refunded
email query · string
before query · integer
limit query · integer

Grant product access (finds or creates the customer by email)

POST /access

Scope access:write · Cost 2

Parameters

NameTypeDescription
Idempotency-Key header · string

Request body (JSON)

NameTypeDescription
contact_id string
email string
name string
product_id string
product string
event_id string
consent boolean
plan string
status string One of: trial, active, past_due, expired, cancelled, refunded
starts_at string
ends_at string
seats integer
meta string
external_ref string
reason string
lock boolean

Import product access from CSV

POST /access/import

Scope access:write · Cost 2

Parameters

NameTypeDescription
Idempotency-Key header · string

Request body (JSON)

NameTypeDescription
csv required string
skip_invalid boolean

Preview a product access CSV import

POST /access/import/preview

Scope access:write · Cost 2

Parameters

NameTypeDescription
Idempotency-Key header · string

Request body (JSON)

NameTypeDescription
csv required string

One product access record with its history

GET /access/{id}

Scope access:read · Cost 1

Parameters

NameTypeDescription
id required path · integer

Change a product access record

PATCH /access/{id}

Scope access:write · Cost 2

Parameters

NameTypeDescription
id required path · integer
Idempotency-Key header · string

Request body (JSON)

NameTypeDescription
plan string
status string One of: trial, active, past_due, expired, cancelled, refunded
starts_at string
ends_at string
seats integer
meta string
external_ref string
reason string
lock boolean

Revoke a product access record

DELETE /access/{id}

Scope access:write · Cost 2

Parameters

NameTypeDescription
id required path · integer
Idempotency-Key header · string

Request body (JSON)

NameTypeDescription
status string One of: expired, cancelled, refunded
reason string