When to use this endpoint

Use this route for a raw single-row lookup; use mapped details when CRM2 field names or projections are needed.

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
idInteger-compatible scalarYesConverted with intval; must be positive. Zero, omission and invalid text are rejected; an absent row is not created.

Example request

$band = FM_api('PriceBand_get', ['id'=>'1042']);

Example response

{"id":"1042","name":"Trade","order_num":"0","is_relative":"0","relative_multiple":"1","cdate":"1790254800","last_edited":"1790254800"}

Raw fields are id, name, order_num, is_relative, relative_multiple, cdate and last_edited. Database numerics normally remain JSON strings; name can be null. Both timestamps store Unix seconds, not formatted dates.

Returns JSON false for a missing row or failed database read, not an error object or empty array.

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"}The coerced ID is less than one.
falseNo matching row, including a previously permanently deleted band.

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

Behaviour and edge cases

  • ID validation occurs before authentication. No projection, filtering, ordering or pagination controls are supported.
  • The table has no soft-delete flag; this query does not implement an active/archive filter. It does not load customers, stock overrides or effective prices.
  • 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 record, cache invalidation or timestamp change.

See it in Fieldmotion

CRM1

No direct CRM1 caller was found. Settings → Finance → Price Bands uses the legacy creation, setters and PriceBands_getDT instead.

CRM2

No direct CRM2 caller was found. Settings → Finance → Price Bands uses mapped creation, updates and PriceBands_getDataTable instead.

Related endpoints