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
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
csv required | string | |
skip_invalid | boolean |
Preview a product access CSV import
POST /access/import/preview
Scope access:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
csv required | string |
One product access record with its history
GET /access/{id}
Scope access:read · Cost 1
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · integer |
Change a product access record
PATCH /access/{id}
Scope access:write · Cost 2
Parameters
| Name | Type | Description |
|---|---|---|
id required | path · integer | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
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
| Name | Type | Description |
|---|---|---|
id required | path · integer | |
Idempotency-Key | header · string |
Request body (JSON)
| Name | Type | Description |
|---|---|---|
status | string | One of: expired, cancelled, refunded |
reason | string |