SQL Server / Zoom API / Update an account's additional plan
Back to Collection Items
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
DECLARE @hr int
DECLARE @iTmp0 int
-- Important: Do not use nvarchar(max). See the warning about using nvarchar(max).
DECLARE @sTmp0 nvarchar(4000)
-- This example assumes the Chilkat API to have been previously unlocked.
-- See Global Unlock Sample for sample code.
DECLARE @http int
-- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
DECLARE @success int
DECLARE @req int
-- Use "Chilkat_9_5_0.HttpRequest" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.HttpRequest', @req OUT
EXEC sp_OASetProperty @req, 'HttpVerb', 'PUT'
EXEC sp_OASetProperty @req, 'Path', '/v2/accounts/:accountId/plans/addons'
EXEC sp_OASetProperty @req, 'ContentType', 'multipart/form-data'
EXEC sp_OAMethod @req, 'AddStringForUpload2', @success OUT, '', '', '', '', 'exercitation con'
EXEC sp_OAMethod @req, 'AddParam', NULL, 'hosts', 'exercitation con42949372'
EXEC sp_OAMethod @req, 'AddHeader', NULL, 'Authorization', 'Bearer <access_token>'
DECLARE @resp int
EXEC sp_OAMethod @http, 'SynchronousRequest', @resp OUT, 'api.zoom.us', 443, 1, @req
EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
IF @iTmp0 = 0
BEGIN
EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
PRINT @sTmp0
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @req
RETURN
END
EXEC sp_OAGetProperty @resp, 'StatusCode', @iTmp0 OUT
PRINT @iTmp0
EXEC sp_OAGetProperty @resp, 'BodyStr', @sTmp0 OUT
PRINT @sTmp0
EXEC @hr = sp_OADestroy @resp
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @req
END
GO
Curl Command
curl -X PUT
-H "Authorization: Bearer <access_token>"
-H "Content-Type: multipart/form-data"
--form 'type=exercitation con'
--form 'hosts=exercitation con42949372'
https://api.zoom.us/v2/accounts/:accountId/plans/addons
Postman Collection Item JSON
{
"name": "Update an account's additional plan",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "exercitation con",
"description": "(Required) The account's [plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans).",
"type": "text"
},
{
"key": "hosts",
"value": "42949372",
"description": "(Required) The account plan's number of hosts.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/addons",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"addons"
],
"variable": [
{
"key": "accountId",
"value": "quis officia in reprehenderit",
"description": "(Required) The account's ID."
}
]
},
"description": "Use this API to update a subaccount's additional plan. \n\n This API can only be used by Master accounts that pay all billing charges of their associated Pro or higher subaccounts. Zoom only allows approved partners to use [Master APIs](https://marketplace.zoom.us/docs/api-reference/master-account-apis) and manage subaccounts' billing information. Email the partner programs team at [**partner-success@zoom.us**](mailto: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:** \n* A Pro or a higher plan with the **Master account** option enabled. \n* The subaccount **must** be a paid account whose billing charges are paid by its Master account."
},
"response": [
{
"name": "**Error Code:** `200`<br>\nFree trial and VIP accounts can't update sub plans.<br>\nYou don’t have subscription for ({oldPlanCode}) yet.\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": "exercitation con",
"description": "(Required) The account's [plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans).",
"type": "text"
},
{
"key": "hosts",
"value": "42949372",
"description": "(Required) The account plan's number of hosts.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/addons",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"addons"
],
"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": "**HTTP Status Code:** `204`<br>\nAdditional plan updated for the account.",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "exercitation con",
"description": "(Required) The account's [plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans).",
"type": "text"
},
{
"key": "hosts",
"value": "42949372",
"description": "(Required) The account plan's number of hosts.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/addons",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"addons"
],
"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>\nPlan types do not match, oldPlanType: {oldPlanType} newPlanType: {newPlanType}.",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "exercitation con",
"description": "(Required) The account's [plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans).",
"type": "text"
},
{
"key": "hosts",
"value": "42949372",
"description": "(Required) The account plan's number of hosts.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/addons",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"addons"
],
"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`\n<br>This sub account is on self pay mode.\n<br>Invalid Additional Plan Type: {newPlanCode}.\n<br>Cannot update Additional plan for a sub account under free plan.\n<br>Invalid plan type.\n<br>Account can’t",
"originalRequest": {
"method": "PUT",
"header": [
{
"description": "Added as a part of security scheme: oauth2",
"key": "Authorization",
"value": "<token>"
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "type",
"value": "exercitation con",
"description": "(Required) The account's [plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans).",
"type": "text"
},
{
"key": "hosts",
"value": "42949372",
"description": "(Required) The account plan's number of hosts.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/addons",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"addons"
],
"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:** `2001`<br>\nAccount does not exist: {subAccountId}.<br>\n**Error Code:** `3200`<br>\nCannot find Zuora subscription for account:{subAccountId}.\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": "exercitation con",
"description": "(Required) The account's [plan type](https://marketplace.zoom.us/docs/api-reference/other-references/plans).",
"type": "text"
},
{
"key": "hosts",
"value": "42949372",
"description": "(Required) The account plan's number of hosts.",
"type": "text"
}
]
},
"url": {
"raw": "{{baseUrl}}/accounts/:accountId/plans/addons",
"host": [
"{{baseUrl}}"
],
"path": [
"accounts",
":accountId",
"plans",
"addons"
],
"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": ""
}
]
}