When to use this endpoint

Use for mapped lookup or an unpaged collection. Omit IDs only when reading all matching bands is intended.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session; all normal calls use that tenant. These handlers do not enforce an additional role or finance-page permission.

Use strings for signed numeric values, including values inside native arrays. Only JSON-encode parameters explicitly described as JSON text; see Getting started.

Parameters

ParameterTypeRequiredDescription
id / idsInteger-compatible scalar or native arrayNoid takes precedence; values are integer-coerced. Omission or an empty native array adds no ID constraint, so it can read every matching band.
fieldsNative array of mapped namesNoMapped fields are id, name, orderNum, isRelative, relativeMultiple, cDate and lastEdited; the latter five map to order_num, is_relative, relative_multiple, cdate and last_edited. Defaults to every mapped field; unknown/non-string names are ignored and id is always added. JSON text is not accepted.
name / orderNum / isRelative / relativeMultiple / cDate / lastEditedScalar or native arrayNoCombined with AND. Name scalar/array uses trimmed case-insensitive equality/IN. Numeric scalar and array values are integer-coerced, including the float relativeMultiple; an all-invalid numeric array matches no rows.
orderMapped name or native arrayNoOne mapped name, a native list of names, or entries {id: mappedName, dir: asc|desc}. Invalid names are ignored; only exact desc selects descending. Default has no ORDER BY.
advanceSearchNative array (legacy controls)NoNative structured advanced filters support equal, contains, notEqual, greaterThan, greaterThanOrEqual, lesserThan and lesserThanOrEqual with connector/grouping controls. Raw where clauses and malformed rule shapes are rejected before query execution.

Example request

$bands = FM_api('PriceBand_getRequestedDetails', ['ids'=>['1042'], 'fields'=>['name', 'relativeMultiple'], 'order'=>'name']);

Example response

[{"name":"Trade","relativeMultiple":"0.9","id":"1042"}]

Returns a bare array of mapped object rows. Stored numeric values remain strings; absent IDs are omitted. No matches or a database read failure becomes []. Timestamps remain integer-second strings, not formatted dates.

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.
[]Nothing matches, or the shared helper normalizes a failed database read to no rows.
{"error":"unsupported raw advanced search"}Any advanced rule supplies raw where SQL.
{"error":"missing or invalid parameter: fields"}fields is not a native array of strings; malformed query structures are similarly rejected.

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

Behaviour and edge cases

  • No pagination, count wrapper, limit or global searchValue is implemented here. No default ordering or customer/stock enrichment.
  • The table is not in the helper’s soft-delete list and has no deleted column; no active/archive filter is added. No finance-feature setting is enforced.
  • The mobile app has no direct caller for this endpoint in the searched JavaScript or m/www intermediary. It downloads price bands through syncDownloads into its local priceBands table.

Side effects

  • Read-only; no audit event or cache invalidation.

See it in Fieldmotion

CRM1

No direct CRM1 caller was found. Legacy dropdowns use PriceBands_list and imports use PriceBands_listByNames.

CRM2

Settings → Finance → Price Bands bulk multiplier actions call this endpoint to inspect selected pricing modes. Stock price-band editors, schedule-of-rates and customer change/history widgets also load mapped details; filter PriceBand_getRequestedDetails.

Related endpoints