Skip to content

Zoho: Retrieve All Attachments

Zoho attachments.getAttachments: arguments, response, policy and SDK examples.

← Attachments operations · Get started

Operation zoho.getattachments

Provider route: GET /crm/v8/{moduleApiName}/{recordId}/Attachments. Alter supplies the connection’s credentials and routing.

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["attachments"]["getAttachments"]>[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.attachments.getAttachments(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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.attachments.get_attachments(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.recordIdstringRequired within parentMaximum length: 64
path.moduleApiNamestringRequired within parentMaximum length: 64
queryobjectOptionalAdditional keys: not allowed
query.fieldsstringOptionalMaximum length: 100000

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Retrieve All Attachments — response body

Referenced models: Retrieve All Attachments — response body

Retrieve All Attachments — response body
FieldTypePresenceDescription and constraints
$objectRootResponse containing list of attachments for a record
Additional keys: not allowed
dataarrayRequired within parentArray of attachment objects
Maximum items: 1000
data[]ModelEach itemExpand Retrieve All Attachments — response body — data item
infoModelRequired within parentExpand Retrieve All Attachments — response body — info

Referenced models: Retrieve All Attachments — response body — data item, Retrieve All Attachments — response body — info

Retrieve All Attachments — response body — data item
FieldTypePresenceDescription and constraints
$objectRootIndividual attachment metadata
Additional keys: not allowed
$editablebooleanOptionalIndicates if the attachment is editable
$field_statesJSONOptional
$field_states (anyOf 1)objectAlternativeRepresents the field states metadata
$field_states (anyOf 2)nullAlternativeRepresents the field states metadata
$file_idJSONOptional
$file_id (anyOf 1)stringAlternativeRepresents the file identifier for the attachment
Maximum length: 255
$file_id (anyOf 2)nullAlternativeRepresents the file identifier for the attachment
Maximum length: 255
$link_urlJSONOptional
$link_url (anyOf 1)stringAlternativeRepresents the URL for link-type attachments. Null for file attachments.
Format: uri
Maximum length: 2000
$link_url (anyOf 2)nullAlternativeRepresents the URL for link-type attachments. Null for file attachments.
Format: uri
Maximum length: 2000
$se_modulestringOptionalRepresents the source module name
Maximum length: 100
$sharing_permissionstringOptionalRepresents the sharing permission level for the attachment
Maximum length: 50
$statestringOptionalRepresents the current state of the attachment
Maximum length: 50
$typestringOptionalRepresents the type of the attachment. Possible values: `File` for uploaded files, or `Link URL` for URL-based attachments.
Maximum length: 50
Created_ByModelRequired within parentExpand Retrieve All Attachments — response body — data item Created By
Created_TimestringRequired within parentRepresents the timestamp when the attachment was created (ISO 8601 with timezone)
Format: date-time
File_NamestringOptionalRepresents the name of the attached file
Maximum length: 250
Modified_ByModelRequired within parentExpand Retrieve All Attachments — response body — data item Modified By
Modified_TimestringRequired within parentRepresents the timestamp when the attachment was last modified (ISO 8601 with timezone)
Format: date-time
OwnerModelOptionalExpand Retrieve All Attachments — response body — data item Owner
Parent_IdobjectOptionalParent record information
Additional keys: not allowed
Parent_Id.idstringRequired within parentParent record ID. Use the [Get Records API](record.yaml#$.paths./module.get) to retrieve record IDs.

Maximum length: 50
Pattern: ^[0-9]+$
Parent_Id.namestringRequired within parentRepresents the parent record name
Maximum length: 250
SizestringOptionalRepresents the size of the attachment in bytes
Maximum length: 50000
Pattern: ^[0-9]+$
idstringRequired within parentRepresents the unique numeric identifier of the attachment
Maximum length: 50
Pattern: ^[0-9]+$

Referenced models: Retrieve All Attachments — response body — data item Created By, Retrieve All Attachments — response body — data item Modified By, Retrieve All Attachments — response body — data item Owner

Retrieve All Attachments — response body — info
FieldTypePresenceDescription and constraints
$objectRootPagination information for list responses
Additional keys: not allowed
countJSONRequired within parent
count (anyOf 1)integerAlternativeRepresents the number of records returned in the current response
Format: int32
Minimum: 0
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
more_recordsbooleanRequired within parentIndicates whether more records are available
next_page_tokenJSONRequired within parent
next_page_token (anyOf 1)stringAlternativeRepresents the token to retrieve the next page of results
Maximum length: 1024
next_page_token (anyOf 2)nullAlternativeRepresents the token to retrieve the next page of results
Maximum length: 1024
pageJSONRequired within parent
page (anyOf 1)integerAlternativeRepresents the current page number
Format: int32
Minimum: 1
page (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
page_token_expiryJSONRequired within parent
page_token_expiry (anyOf 1)stringAlternativeRepresents the expiry timestamp for the page tokens
Format: date-time
page_token_expiry (anyOf 2)nullAlternativeRepresents the expiry timestamp for the page tokens
Format: date-time
per_pageJSONRequired within parent
per_page (anyOf 1)integerAlternativeRepresents the number of records per page
Format: int32
Maximum: 200
Minimum: 1
per_page (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
previous_page_tokenJSONRequired within parent
previous_page_token (anyOf 1)stringAlternativeRepresents the token to retrieve the previous page of results
Maximum length: 1024
previous_page_token (anyOf 2)nullAlternativeRepresents the token to retrieve the previous page of results
Maximum length: 1024
Retrieve All Attachments — response body — data item Created By
FieldTypePresenceDescription and constraints
$objectRootUser who created the attachment.
Additional keys: not allowed
emailstringOptionalRepresents the user email address
Format: email
Maximum length: 100
idstringRequired within parentUser ID. Use the [Users API](users.yaml#$.paths./users/bulk.get) to retrieve user IDs.

Maximum length: 50
Pattern: ^[0-9]+$
namestringRequired within parentRepresents the user display name
Maximum length: 250
Retrieve All Attachments — response body — data item Modified By
FieldTypePresenceDescription and constraints
$objectRootUser who last modified the attachment.
Additional keys: not allowed
emailstringOptionalRepresents the user email address
Format: email
Maximum length: 100
idstringRequired within parentUser ID. Use the [Users API](users.yaml#$.paths./users/bulk.get) to retrieve user IDs.

Maximum length: 50
Pattern: ^[0-9]+$
namestringRequired within parentRepresents the user display name
Maximum length: 250
Retrieve All Attachments — response body — data item Owner
FieldTypePresenceDescription and constraints
$objectRootOwner of the attachment
Additional keys: not allowed
emailstringOptionalRepresents the owner email address
Format: email
Maximum length: 100
idstringRequired within parentOwner user ID. Use the [Users API](users.yaml#$.paths./users/bulk.get) to retrieve user IDs.

Maximum length: 50
Pattern: ^[0-9]+$
namestringRequired within parentRepresents the owner display name
Maximum length: 250

SDK function policy ID: zoho.getattachments. Catalog operation: getAttachments. 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.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.