Zoho: Restore a Recycle Bin record
Zoho recycleBin.restoreRecycleBinRecord: arguments, response, policy and SDK examples.
← Recycle bin operations · Get started
Operation zoho.restorerecyclebinrecord
Provider route: POST /crm/v8/settings/recycle_bin/{recordId}/actions/restore. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["recycleBin"]["restoreRecycleBinRecord"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.recycleBin.restoreRecycleBinRecord(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_zoho import ZohoIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.recycle_bin.restore_recycle_bin_record(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.recordId | string | Required within parent | Represents the unique identifier of the recycle-bin record. Maximum length: 100 |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Restore a Recycle Bin record — response body |
Referenced models: Restore a Recycle Bin record — response body
Schemas
Section titled “Schemas”Restore a Recycle Bin record — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Wrapper that returns the per-item results of a recycle-bin operation under the **recycle_bin** array. Additional keys: not allowed |
recycle_bin | array | Required within parent | List of per-item results for the operation. Each entry is either a success result or a scheduled-job result. Maximum items: 200 |
recycle_bin[] | JSON | Each item | |
recycle_bin[] (anyOf 1) | Model | Alternative | Expand Restore a Recycle Bin record — response body — recycle_bin / item / code: SUCCESS, status: success |
recycle_bin[] (anyOf 2) | Model | Alternative | Expand Restore a Recycle Bin record — response body — recycle_bin / item / code: SCHEDULED, status: success |
Referenced models: Restore a Recycle Bin record — response body — recycle_bin / item / code: SUCCESS, status: success, Restore a Recycle Bin record — response body — recycle_bin / item / code: SCHEDULED, status: success
Restore a Recycle Bin record — response body — recycle_bin / item / code: SUCCESS, status: success
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Per-item result returned when a single recycle-bin record is processed successfully. Additional keys: not allowed |
code | string | Required within parent | Result code for the per-item operation. Possible values: **SUCCESS**. Known values: SUCCESS Maximum length: 100 |
details | object | Required within parent | Represents additional details about the per-item operation, including the affected record ID. Additional keys: not allowed |
details.id | string | Optional | Represents the unique identifier of the recycle-bin record that the per-item result refers to. Maximum length: 500 |
message | string | Required within parent | Represents the message that describes the outcome of the per-item operation. Maximum length: 500 |
status | string | Required within parent | Indicates that the per-item operation succeeded. Possible values: **success**. Known values: success |
Restore a Recycle Bin record — response body — recycle_bin / item / code: SCHEDULED, status: success
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Result returned when a recycle-bin operation is queued as a background job because it cannot complete synchronously. Additional keys: not allowed |
code | string | Required within parent | Result code indicating that the operation is scheduled. Possible values: **SCHEDULED**. Known values: SCHEDULED |
details | object | Required within parent | Represents additional details about the scheduled operation. This is typically an empty object or contains a record ID associated with the scheduled job. Additional keys: allowed |
message | string | Required within parent | Represents the message confirming that the operation has been queued as a background job. Maximum length: 500 |
status | string | Required within parent | Indicates that the request to schedule the operation succeeded. Possible values: **success**. Known values: success |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.restorerecyclebinrecord. Catalog operation: restoreRecycleBinRecord. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.