When to use this endpoint

Use this after selecting parent forms when exporting their questions or configuring rules that need a linked Job Table.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session and is scoped to the authenticated tenant.

The handler performs no form, department, owner, or page-permission check unless the page below says otherwise. CRM navigation may impose additional UI-only access rules.

Parameters

ParameterTypeRequiredDescription
idsJSON array stringYesNon-empty array of JSON integers. Numeric strings, floats, native arrays, and malformed JSON are rejected.

Example request

$tables = FM_api('Forms_getTablesByIds', [
	'ids' => json_encode([1042]),
]);

Example response

[{"form_id":"1042","tables":[{"id":"2088","name":"Parts used","fields":"[{...}]","meta_id":"1586980384133"}]}]

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: ids"}IDs are absent.
{"error":"ids must be an array of integers in JSON form"}Input is malformed or empty.
{"error":"not an integer: 3.14"}An element is not an actual JSON integer.

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

Behaviour and edge cases

  • Only direct fields with exact type subform and a positive extras.values form ID are followed.
  • Each table lookup returns raw id, name, and encoded fields; meta_id comes from the linking parent field’s decoded metadata.
  • Missing parent IDs are omitted. Missing linked table IDs are skipped. Neither parent nor linked tables are filtered by archive state.
  • The implementation performs one additional query per linked field and specifies no result ordering.

See it in Fieldmotion

CRM1

Forms, Quotes, form-rule editing, and question export use this route.

CRM2

The same workflows use it in the Forms page, Quote module, and Form editor.

Related endpoints