When to use this endpoint

Despite its name, RequisitionOrder_getLayoutDetails returns data rows, not layout definitions. Use native fields and explicit IDs/roID; use a paged RequisitionOrders collection for table browsing.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. API keys use their owner’s tenant; session dispatch applies CSRF checks. Office requisition access requires View on Requisition Order or Requisition Orders. A visible UI control is not sufficient authorization.

Tenant and TeamAccess/legacy department scope apply to headers and to the parent of each line. Deleted parents hide their lines. Scoped users can see their own unlinked requisitions; the legacy department-only rule retains its target-based visibility. There is no additional Requisition feature-entitlement check.

Parameters

ParameterTypeRequiredDescription
id / idsPositive integer or native/JSON arrayYesid wins over ids. Every member must be a positive integer. An empty list returns []; omitted, malformed, zero or negative selectors fail.
fieldsNative arrayNoMapped names; defaults to all map keys. Empty list still returns id; line normalization additionally returns nominal_id/nominal_code. A JSON string is not decoded.
orderField name or native listNoMapped field names or native objects {id,dir}; dir must be asc or desc. Invalid controls are rejected; omitted order has no guarantee.
Mapped field filtersScalar or native arrayNoMapped raw values or native picker components combine with AND. Text equality trims/lowercases input and lowercases storage. Numeric filtering retains the shared helper’s integer conversion, including decimal fields. Empty/invalid numeric field lists become a false predicate; nested non-scalar filter values fail validation.
advanceSearchNative condition arrayLegacy controlNative list of mapped {id/column,condition,value,andOr} rules. Conditions: equal, notEqual, contains, greaterThan, greaterThanOrEqual, lesserThan, lesserThanOrEqual. andOr is AND or OR. Raw where clauses and malformed controls are rejected.
noLinkInteger-compatibleNo1 selects zero/null target type and zero/null target ID in either header detail alias.

Example request

$result = FM_api('RequisitionOrder_getRequestedDetails', [
	'id' => '1042',
	'fields' => [
		'id',
		'description',
		'status',
	],
]);

Example response

[
  {
    "id": "1042",
    "description": "Materials for north site",
    "status": "0"
  }
]

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: id/ids"}No explicit selector was supplied.
{"error":"invalid advanced search"}A malformed rule or raw where clause was supplied.
{"error":"permission denied"}Required View access is absent.

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

Behaviour and edge cases

  • Returns an unpaginated array of matching, visible rows. Supply positive scalar/native-array/JSON-array id or ids; id wins. Missing selectors are errors and an empty list selects no rows. No default ordering is guaranteed. Unknown projection names are ignored and id is included; a database read failure can still be represented by an empty result from the shared reader.
  • Header fields include id, userID/user, description, targetID/targetType/target, status, cDate, deliveryDate, lastEdited, dateApproved, approvedByID/approvedBy, deliveryAddress, grandTotalNet, grandTotalTax, poIDs, notes, attention, instructions, deliveryNet, deliveryTaxcodeID/deliveryTaxcode, deliveryTax, meta, customValues, metaLink and deleted. grandTotalGross and deliveryGross are client formulas, not returned calculated totals.
  • Stored JSON text is not uniformly decoded: a selected whole meta/customValues column remains its stored JSON string, while a nested metaLink projection is resolved from decoded metadata. Unknown/derived-only names add no response value.
  • Both header detail aliases honour noLink. It adds zero/null target type and zero/null target ID checks. Filters combine with the explicit IDs and record-scope predicate; they cannot widen the selection.

Side effects

  • Read only. No inventory, allocation, status or audit mutation.

See it in Fieldmotion

CRM1

No direct caller was found in CRM1 source. Its requisition screen uses the legacy header/line endpoints instead.

CRM2

CRM2 list/detail widgets derive RequisitionOrder_getRequestedDetails for selected fields. Observe a requisition table refresh or detail lookup; this is not a paged table response.

Related endpoints