Plesk Subscription / Purchase

/plesk

GET

Get all subscriptions

Request parameters

All values are optional. +———————————+———-+————————————————————————-+ |plan | string | The UUID of a Plesk plan. | +———————————+———-+————————————————————————-+ |is_auto_renew_enabled | boolean | Is auto renew enabled on the subscription. | +———————————+———-+————————————————————————-+ |client_reference | string | The client reference of the subscription. | +———————————+———-+————————————————————————-+ |provisioning_reference | string | The reference to the provisioner. | +———————————+———-+————————————————————————-+

JSON response

Possible errors

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/plesk" | python -m json.tool

POST

Create a new subscription.

Request parameters

All values are required. +———————————+———-+————————————————————————-+ |plan | string | The UUID of a Plesk plan. | +———————————+———-+————————————————————————-+ |is_auto_renew_enabled | boolean | Is auto renew enabled on the subscription. | +———————————+———-+————————————————————————-+ |client_reference | string | The client reference of the subscription. | +———————————+———-+————————————————————————-+ |provisioning_reference | string | The reference to the provisioner. | +———————————+———-+————————————————————————-+ |display_name | string | The display name for the subscription. | +———————————+———-+————————————————————————-+ |domain | string | The domain name to use in plesk. | +———————————+———-+————————————————————————-+ |customer | uuid | The plesk customer account to link to the subscription. | +———————————+———-+————————————————————————-+

JSON response

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "plan": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "is_auto_renew_enabled": True,
        "client_reference": "sample reference",
        "provisioning_reference": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "display_name": "New plesk subscription",
        "domain": "example.com",
        "customer": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
' \
"{{api_base_url}}/plesk" | python -m json.tool

/plesk/{id}

GET

Get detailed information about a subscription.

JSON response

Possible errors

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/plesk/{id}" | python -m json.tool

PUT

Update a existing subscription.

Request parameters

All values are optional. +———————————+———-+————————————————————————-+ |is_auto_renew_enabled | boolean | Is auto renew enabled on the subscription. | +———————————+———-+————————————————————————-+ |client_reference | string | The client reference of the subscription. | +———————————+———-+————————————————————————-+ |provisioning_reference | string | The reference to the provisioner. | +———————————+———-+————————————————————————-+ |display_name | string | The display name for the subscription. | +———————————+———-+————————————————————————-+

JSON response

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "is_auto_renew_enabled": True,
        "client_reference": "sample reference",
        "provisioning_reference": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "display_name": "New plesk subscription"
    }
' \
"{{api_base_url}}/plesk/{id}" | python -m json.tool

/plesk/{id}/suspend

POST

Suspend a subscription.

Request parameters

N/A

JSON response

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/plesk/{id}/suspend" | python -m json.tool

/plesk/{id}/restore

POST

Restore a subscription.

Request parameters

N/A

JSON response

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/plesk/{id}/restore" | python -m json.tool