When to use this endpoint

Use ScheduleOfRates_list to populate the legacy and CRM2 Schedule of Rates pickers. The optional Job context applies the rate’s stored asset-type eligibility.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler calls the normal login guard but performs no additional page or role-permission check.

All reads and writes use the authenticated tenant. The CRM screens apply client-side Schedule of Rates permissions, but those controls are not repeated by this endpoint.

Parameters

ParameterTypeRequiredDescription
appointment_idInteger stringNoExact legacy parameter name for a Job ID. If the non-deleted Job targets an asset, the endpoint restricts rows by that asset’s type.

Example request

$rates = FM_api('ScheduleOfRates_list', [
	'appointment_id' => '88001',
]);

Example response

[
  {
    "id": "430001",
    "name": "Annual service",
    "code": "AS-01",
    "cost": "150",
    "asset_types": "[7]",
    "archived": "0"
  }
]

The example is abbreviated. Every stored column is returned and stored JSON/text remains encoded.

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.
[]The tenant has no rows, or an asset-context filter matches none.

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

Behaviour and edge cases

  • Without a usable asset Job context, every row is returned ordered by name. Missing/deleted Jobs, customer-targeted Jobs, and assets missing from the tenant all fall back to that full list.
  • For an asset Job, rows are eligible when asset_types is SQL null, the literal string null, or its stored JSON-like text contains the asset type ID bounded by nondigits. The filtered branch has no explicit ordering.
  • Archived rows are never excluded. Callers that need active-only choices must filter the returned archived value themselves.
  • There is no pagination or field selection.
  • These endpoints store the base price in cost; they do not calculate a customer’s final price. Job/quote consumers can apply meta.customerCosts, the tenant setting sor-child-gets-parent-price, and the customer’s price band later.

See it in Fieldmotion

CRM1

Invoice, quote-cost, recurrence, customer-rate, deduplication, and general Schedule of Rates pickers call this route.

CRM2

Job/quote rate widgets, customer-rate tools, recurrence editing, QuickBooks setup, and the shared rate picker call this route. The mobile app has no direct call to it.

Related endpoints