delphiDll / Zoom API / Update a base plan
Back to Collection Items
var
http: HCkHttp;
success: Boolean;
req: HCkHttpRequest;
resp: HCkHttpResponse;
begin
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
http := CkHttp_Create();
req := CkHttpRequest_Create();
CkHttpRequest_putHttpVerb(req,'PUT');
CkHttpRequest_putPath(req,'/v2/accounts/:accountId/plans/base');
CkHttpRequest_putContentType(req,'multipart/form-data');
CkHttpRequest_AddStringForUpload2(req,'','','','','mollit ad dolor');
CkHttpRequest_AddParam(req,'hosts','mollit ad dolor-93394448');
CkHttpRequest_AddParam(req,'increasing_hosts','mollit ad dolor-93394448-86837913');
CkHttpRequest_AddHeader(req,'Authorization','Bearer <access_token>');
resp := CkHttp_SynchronousRequest(http,'api.zoom.us',443,True,req);
if (CkHttp_getLastMethodSuccess(http) = False) then
begin
Memo1.Lines.Add(CkHttp__lastErrorText(http));
Exit;
end;
Memo1.Lines.Add(IntToStr(CkHttpResponse_getStatusCode(resp)));
Memo1.Lines.Add(CkHttpResponse__bodyStr(resp));
CkHttpResponse_Dispose(resp);
CkHttp_Dispose(http);
CkHttpRequest_Dispose(req);
Curl Command
curl -X PUT
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'type=mollit ad dolor'
--form 'hosts=mollit ad dolor-93394448'
--form 'increasing_hosts=mollit ad dolor-93394448-86837913'
https://api.zoom.us/v2/accounts/:accountId/plans/base
Postman Collection Item JSON
{
"name": "Update a base plan",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "mollit ad dolor",
"description": "(Required) The account's [Base plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans#base-plans).",
"type": "text"
},
{
"key": "hosts",
"value": "-93394448",
"description": "(Required) The account plan's number of hosts: \n* For a Pro plan, provide a value between `1` and `9`. \n* For a Business Plan, provide a value between `10` and `49`. \n* For a Education Plan, provide a value between `20` and `149`. \n* For a Free Trial Plan, provide a value between `1` and `9999`. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
},
{
"key": "increasing_hosts",
"value": "-86837913",
"description": "An optional number of additional hosts to add to the account's Base plan. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/base",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"base"
],
"variable": [
{
"key": "accountId",
"value": "quis officia in reprehenderit",
"description": "(Required) The account's ID."
}
]
},
"description": "Update a base plan of a sub account. \n\nThis API can only be used by master accounts that pay all billing charges of their associated Pro or higher subaccounts. Zoom allows only [approved partners](https://marketplace.zoom.us/docs/api-reference/master-account-apis) to use master APIs and manage subaccounts' subscriptions. Email the partner programs team at **partner-success@zoom.us** for more details.\n\n**Scopes:** `billing:master`<br>**[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Heavy`\n\n**Prerequisites:**<br>\n* The subaccount must have a Pro or a higher plan."
},
"response": [
{
"name": "**Error Code:** `200`\nFree trial and VIP account can't update sub plan.<br>\nYou do not have a subscription yet.<br>\n\n",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "mollit ad dolor",
"description": "(Required) The account's [Base plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans#base-plans).",
"type": "text"
},
{
"key": "hosts",
"value": "-93394448",
"description": "(Required) The account plan's number of hosts: \n* For a Pro plan, provide a value between `1` and `9`. \n* For a Business Plan, provide a value between `10` and `49`. \n* For a Education Plan, provide a value between `20` and `149`. \n* For a Free Trial Plan, provide a value between `1` and `9999`. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
},
{
"key": "increasing_hosts",
"value": "-86837913",
"description": "An optional number of additional hosts to add to the account's Base plan. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/base",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"base"
],
"variable": [
{
"key": "accountId",
"value": "quis officia in reprehenderit",
"description": "(Required) The account's ID."
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTPS Status Code:** `204`<br>\nBase plan updated.",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "mollit ad dolor",
"description": "(Required) The account's [Base plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans#base-plans).",
"type": "text"
},
{
"key": "hosts",
"value": "-93394448",
"description": "(Required) The account plan's number of hosts: \n* For a Pro plan, provide a value between `1` and `9`. \n* For a Business Plan, provide a value between `10` and `49`. \n* For a Education Plan, provide a value between `20` and `149`. \n* For a Free Trial Plan, provide a value between `1` and `9999`. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
},
{
"key": "increasing_hosts",
"value": "-86837913",
"description": "An optional number of additional hosts to add to the account's Base plan. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/base",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"base"
],
"variable": [
{
"key": "accountId",
"value": "quis officia in reprehenderit",
"description": "(Required) The account's ID."
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**Error Code:** `300`<br>\nInsufficient number of hosts for business plan type.<br>\nInsufficient number of hosts for education plan type.<br>\nPlan types do not match, oldPlanType: {oldPlanType} newPlanType: {newPlanType}.<br>\n",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "mollit ad dolor",
"description": "(Required) The account's [Base plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans#base-plans).",
"type": "text"
},
{
"key": "hosts",
"value": "-93394448",
"description": "(Required) The account plan's number of hosts: \n* For a Pro plan, provide a value between `1` and `9`. \n* For a Business Plan, provide a value between `10` and `49`. \n* For a Education Plan, provide a value between `20` and `149`. \n* For a Free Trial Plan, provide a value between `1` and `9999`. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
},
{
"key": "increasing_hosts",
"value": "-86837913",
"description": "An optional number of additional hosts to add to the account's Base plan. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/base",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"base"
],
"variable": [
{
"key": "accountId",
"value": "quis officia in reprehenderit",
"description": "(Required) The account's ID."
}
]
}
},
"status": "Multiple Choices",
"code": 300,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `400`<br>\n**Error Code:** `2100`<br> \nThis sub account is on self pay mode.<br>\nCannot makes updates when account is subscribed to a bundle plan.<br>\nThis account is not under a free trial plan.<br>\nThe account currently has {0} paid",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "mollit ad dolor",
"description": "(Required) The account's [Base plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans#base-plans).",
"type": "text"
},
{
"key": "hosts",
"value": "-93394448",
"description": "(Required) The account plan's number of hosts: \n* For a Pro plan, provide a value between `1` and `9`. \n* For a Business Plan, provide a value between `10` and `49`. \n* For a Education Plan, provide a value between `20` and `149`. \n* For a Free Trial Plan, provide a value between `1` and `9999`. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
},
{
"key": "increasing_hosts",
"value": "-86837913",
"description": "An optional number of additional hosts to add to the account's Base plan. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/base",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"base"
],
"variable": [
{
"key": "accountId",
"value": "quis officia in reprehenderit",
"description": "(Required) The account's ID."
}
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "**HTTP Status Code:** `404`<br>\n**Error Code:** `1001`<br>\nUser does not exist.\n**Error Code:** `2001`<br>\nAccount does not exist: {subAccountId}.",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "mollit ad dolor",
"description": "(Required) The account's [Base plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans#base-plans).",
"type": "text"
},
{
"key": "hosts",
"value": "-93394448",
"description": "(Required) The account plan's number of hosts: \n* For a Pro plan, provide a value between `1` and `9`. \n* For a Business Plan, provide a value between `10` and `49`. \n* For a Education Plan, provide a value between `20` and `149`. \n* For a Free Trial Plan, provide a value between `1` and `9999`. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
},
{
"key": "increasing_hosts",
"value": "-86837913",
"description": "An optional number of additional hosts to add to the account's Base plan. \n\nYou **must** provide at least one positive integer value for the `hosts` or the `increasing_hosts` field.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/base",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"base"
],
"variable": [
{
"key": "accountId",
"value": "quis officia in reprehenderit",
"description": "(Required) The account's ID."
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}