When to use this endpoint

Use when an internal workflow has the scheduler type number and object ID; these are not a notification-rule ID or mail-history type.

Authentication and permissions

Use signed API-key authentication or a logged-in CRM session on the account’s routed host. API keys act as their owner; normal session requests need dispatcher CSRF protection where configured. Tenant data is selected from the authenticated account.

The handler has no additional page-action/Role check. A CRM2 screen hiding a control does not add such a server guard, and CRM2 role names must not be assumed to apply to CRM1. The dispatcher has no dedicated object-scope mapping for this namespace.

Parameters

ParameterTypeRequiredDescription
typeInteger-compatibleYesMust integer-convert above zero; compares global type_num exactly. No scheduler-type allowlist or name conversion.
obj_idInteger-compatibleYesPositive ID interpreted by the selected scheduler type.

Example request

$result = FM_api('Notifications_getByTypeAndId', ['type'=>'99','obj_id'=>'7712']);

Example response

{
  "cron": [],
  "smsQueueCron": []
}

Application errors normally remain JSON responses with HTTP 200; inspect error/warning keys. Numeric driver values can be strings.

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.
{"error":"missing or invalid parameter: type"}Nonpositive type.
{"error":"missing or invalid parameter: obj_id"}Nonpositive object ID.
{"error":"missing or invalid parent id"}No valid authenticated tenant parent.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Queries global cron by client_id/type_num/obj_id and sms_queue_cron by parent_id/type_num/obj_id, each newest ID first. Tenant ID comes only from the authenticated parent, not a caller parameter.
  • Returns all columns of both queue tables. No paging, limit, status/time predicate or proof of delivery. Read failures become empty arrays independently.
  • The endpoint does not verify ownership of the referenced business object beyond tenant filtering. No current direct CRM1/CRM2/mobile caller was found; do not infer a UI path from the namespace.

Side effects

  • Read-only global queue inspection; no cancel, run or resend.

See it in Fieldmotion

CRM1

No direct current CRM1 JavaScript caller found.

CRM2

No direct current CRM2 JavaScript caller found; configuration History uses the other Notifications reader.

Related endpoints