Zoho: Retrieve a specific service record by ID
Zoho services.getServiceById: arguments, response, policy and SDK examples.
← Services operations · Get started
Operation zoho.getservicebyid
Provider route: GET /crm/v8/Services__s/{id}. 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["services"]["getServiceById"]>[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.services.getServiceById(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.services.get_service_by_id(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.id | string | Required within parent | 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 Retrieve a specific service record by ID — response body |
Referenced models: Retrieve a specific service record by ID — response body
Schemas
Section titled “Schemas”6 more schemas are linked from the tables above, on the schema pages.
Retrieve a specific service record by ID — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Wrapped response that returns a single service record. Contains a data array with exactly one service object carrying the full set of service fields. Additional keys: allowed |
data | array | Required within parent | Represents the array containing the requested service record. Maximum items: 1 Minimum items: 1 |
data[] | Model | Each item | Expand Get services — response body — data item |
Referenced models: Get services — response body — data item
Get services — response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a single service record returned by a GET request, including identity, status, availability configuration, members, owner, pricing, tax, audit timestamps, and sharing metadata. Additional keys: allowed |
$currency_symbol | string | Optional | Represents the currency symbol used to format monetary fields on the service record. Maximum length: 255 |
$data_source_details | Model | Optional | Expand Get services — response body — data item $data source details |
$editable | boolean | Required within parent | Indicates whether the current user can edit the service record. |
$field_states | null | Required within parent | Represents the field-state metadata for the service record. |
$has_more | Model | Required within parent | Expand Get services — response body — data item $has more |
$photo_id | null | Required within parent | Represents the photo ID associated with the service record. |
$sharing_permission | string | Required within parent | Represents the sharing permission level of the current user on the service record. Maximum length: 255 |
$status | string | Required within parent | Represents the internal status identifier of the service record. Maximum length: 255 |
Availability_Type | string | Required within parent | Represents how the service availability is defined. **Possible values**: Specific Day(s), Specific Date Range, Every Business Days, Specific Date(s). Maximum length: 255 |
Available_Dates | array | Required within parent | Represents the list of dates on which the service is available. Maximum items: 20 |
Available_Dates[] | JSON | Each item | Each string represents a date in the service availability list, in YYYY-MM-DD format. |
Available_Days | array | Required within parent | Represents the list of business days on which the service is available. Maximum items: 7 |
Available_Days[] | JSON | Each item | Each string represents a business day in the service availability list. |
Available_From | string | Required within parent | Represents the date from which the service is available. Maximum length: 255 |
Available_Till | JSON | Required within parent | |
Available_Till (anyOf 1) | string | Alternative | Represents the date until which the service is available. Maximum length: 255 |
Available_Till (anyOf 2) | null | Alternative | Represents the date until which the service is available. Maximum length: 255 |
Available_Timings | JSON | Required within parent | |
Available_Timings (anyOf 1) | array | Alternative | Represents the available time windows configured for the service. Maximum items: 3 |
Available_Timings (anyOf 1)[] | Model | Each item | Expand Get services — response body — data item Available Timings null item |
Available_Timings (anyOf 2) | null | Alternative | Represents the available time windows configured for the service. Maximum items: 3 |
Available_Timings (anyOf 2)[] | Model | Each item | Expand Get services — response body — data item Available Timings null item |
Created_By | Model | Required within parent | Expand Get services — response body — data item Created By |
Created_Time | string | Required within parent | Represents the timestamp when the service record was first saved to the organization. Maximum length: 255 |
Description | JSON | Required within parent | |
Description (anyOf 1) | string | Alternative | Represents the description of the service. Maximum length: 32000 |
Description (anyOf 2) | null | Alternative | Represents the description of the service. Maximum length: 32000 |
Duration | JSON | Required within parent | |
Duration (anyOf 1) | integer | Alternative | Represents the duration of the service, in minutes. Format: int32 |
Duration (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Job_Sheet_Required | string | Required within parent | Represents whether a job sheet is required for the service. **Possible values**: Yes, No. Known values: Yes, No Maximum length: 255 |
Job_Sheet_Section__s | null | Required within parent | Represents the job sheet section associated with the service. |
Last_Activity_Time | string | Required within parent | Represents the timestamp of the most recent activity on the service record. Maximum length: 255 |
Location | string | Required within parent | Represents where the service is delivered. **Possible values**: Client Address, Business Address, Business Address and Client Address. Maximum length: 255 |
Members | array | Required within parent | Represents the users who deliver the service. Refer to the [Get users](users.yaml#$.paths./users.get) endpoint for details. Maximum items: 2 |
Members[] | Model | Each item | Expand Get services — response body — data item Members item |
Modified_By | Model | Required within parent | Expand Get services — response body — data item Modified By |
Modified_Time | string | Required within parent | Represents the timestamp when the service record was last modified. Maximum length: 255 |
Owner | Model | Required within parent | Expand Get services — response body — data item Owner |
Price | JSON | Required within parent | |
Price (anyOf 1) | integer | Alternative | Represents the price charged for the service in the organization currency. Format: int32 |
Price (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Record_Image | null | Required within parent | Represents the record image associated with the service. |
Record_Status__s | string | Optional | Represents the system-derived record status of the service. Maximum length: 255 |
Service_Name | string | Required within parent | Represents the name of the service. Maximum length: 120 |
Status | string | Required within parent | Represents the operational status of the service. **Possible values**: Available, Not in Use, Scheduled, Temporarily Unavailable. Known values: Available, Temporarily Unavailable, Not in Use, Scheduled Maximum length: 255 |
Tag | JSON | Required within parent | |
Tag (anyOf 1) | array | Alternative | Represents the tags associated with the service record. Refer to the [Get tags](tags.yaml#$.paths./settings/tags.get) endpoint for details. Maximum items: 100 |
Tag (anyOf 1)[] | string | Each item | Each string represents a tag name associated with the service record. Maximum length: 2000 |
Tag (anyOf 2) | null | Alternative | Represents the tags associated with the service record. Refer to the [Get tags](tags.yaml#$.paths./settings/tags.get) endpoint for details. Maximum items: 100 |
Tag (anyOf 2)[] | string | Each item | Each string represents a tag name associated with the service record. Maximum length: 2000 |
Tax | array | Required within parent | Represents the taxes applied to the service cost. Maximum items: 100 |
Tax[] | JSON | Each item | Each string represents a tax entry applied to the service cost. |
Unavailable_From | JSON | Required within parent | |
Unavailable_From (anyOf 1) | string | Alternative | Represents the date and time from which the service is unavailable. Maximum length: 255 |
Unavailable_From (anyOf 2) | null | Alternative | Represents the date and time from which the service is unavailable. Maximum length: 255 |
Unavailable_Till | null | Required within parent | Represents the date and time until which the service remains unavailable. |
id | string | Required within parent | Represents the unique ID of the service record. Maximum length: 255 |
Referenced models: Get services — response body — data item Available Timings null item, Get services — response body — data item $data source details, Get services — response body — data item $has more, Get services — response body — data item Members item, Get services — response body — data item Created By, Get services — response body — data item Modified By, Get services — response body — data item Owner
Get services — response body — data item Available Timings null item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the availability time window on a returned service record, defined by a start time (From) and an end time (To). Additional keys: not allowed |
From | string | Required within parent | Represents the start of the availability time window, in HH:MM (24-hour) format. Maximum length: 255 |
To | string | Required within parent | Represents the end of the availability time window, in HH:MM (24-hour) format. Maximum length: 255 |
Get services — response body — data item $data source details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the $data_source_details block on a returned service record. Carries metadata about the data source from which the record originated. Additional keys: not allowed |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.getservicebyid. Catalog operation: getServiceById. 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.