DataFlex / Zoom API / Update a base plan
Back to Collection Items
Use ChilkatAx-win32.pkg
Procedure Test
Handle hoHttp
Boolean iSuccess
Variant vReq
Handle hoReq
Variant vResp
Handle hoResp
String sTemp1
Integer iTemp1
Boolean bTemp1
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Get Create (RefClass(cComChilkatHttp)) To hoHttp
If (Not(IsComObjectCreated(hoHttp))) Begin
Send CreateComObject of hoHttp
End
Get Create (RefClass(cComChilkatHttpRequest)) To hoReq
If (Not(IsComObjectCreated(hoReq))) Begin
Send CreateComObject of hoReq
End
Set ComHttpVerb Of hoReq To "PUT"
Set ComPath Of hoReq To "/v2/accounts/:accountId/plans/base"
Set ComContentType Of hoReq To "multipart/form-data"
Get ComAddStringForUpload2 Of hoReq "" "" "" "" "mollit ad dolor" To iSuccess
Send ComAddParam To hoReq "hosts" "mollit ad dolor-93394448"
Send ComAddParam To hoReq "increasing_hosts" "mollit ad dolor-93394448-86837913"
Send ComAddHeader To hoReq "Authorization" "Bearer <access_token>"
Get pvComObject of hoReq to vReq
Get ComSynchronousRequest Of hoHttp "api.zoom.us" 443 True vReq To vResp
If (IsComObject(vResp)) Begin
Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
Set pvComObject Of hoResp To vResp
End
Get ComLastMethodSuccess Of hoHttp To bTemp1
If (bTemp1 = False) Begin
Get ComLastErrorText Of hoHttp To sTemp1
Showln sTemp1
Procedure_Return
End
Get ComStatusCode Of hoResp To iTemp1
Showln iTemp1
Get ComBodyStr Of hoResp To sTemp1
Showln sTemp1
Send Destroy of hoResp
End_Procedure
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": ""
}
]
}