When to use this endpoint

Load the complete opportunity-status ID/name lookup for CRM1 pickers and exports.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. The handler requires login but does not check a settings-page permission, role or record owner. All rows in this family belong to the authenticated tenant’s opportunity_statuses table.

Parameters

ParameterTypeRequiredDescription
fieldsNative array or JSON-encoded arrayNoid and name are always selected. The only allowlisted additional key is name, so this parameter cannot expose timestamps or remove either default field. Invalid JSON is ignored.

Example request

$statuses = FM_api('OpportunityStatuses_list', []);

Example response

[{"id":"1042","name":"Negotiation"}]

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 table contains no rows.
falseDatabase query fails; no structured error is added by this handler.

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 all tenant labels as a bare list, with database integer IDs represented as strings. No filters, ordering, pagination or deduplication are applied.
  • Built-in IDs are included. There is no active/deleted predicate or feature flag in this table lookup.
  • This read does not update caches, history, timestamps, jobs or opportunities.

See it in Fieldmotion

CRM1

Open CRM1 Settings → General → Opportunity Statuses. pageSettingsOpportunityStatuses.js loads the legacy table, creates labels and saves inline name edits. CRM1 opportunity/customer screens and exports obtain the choices through OpportunityStatuses_list. Open Opportunities or the opportunity area of a customer, or configure an export: the source loads this lookup before rendering labels.

CRM2

CRM2’s Opportunity Statuses settings screen (pageOpportunitySettingsStatuses.js) uses CommonList/CommonLists with type=opportunityStatus instead, not this table. No direct CRM2 settings caller to this endpoint was found. Reproduce this contract with the example request; do not assume that changing it changes CRM2’s CommonList choices.

Related endpoints