Opportunity Fields API

From docs
Revision as of 08:10, 21 July 2026 by Ashley DeBon (talk | contribs) (Get Opportunity Fields)
Jump to: navigation, search

Mobile_API »Get Opportunity Fields

Base URL

https://apimobile.callproof.com

Endpoint

/api/opportunities-fields

Purpose

Retrieves the company’s opportunity custom field definitions (ordered for the opportunity form). When a contact ID is provided and the company has opportunity-field prefill enabled, values may be prefilled from that contact’s most recent opportunity.

HTTP Method

GET

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

Parameter Type Required Description
contact_id integer No Contact identifier used to locate the latest opportunity for prefilling field values

Request Body

None.

Successful Response (200)

Returns opportunity custom field definitions, with optional prefilled values.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
data object Opportunity fields payload
uri string Requested resource URI

data.custom_fields[]

Field Type Description
id integer Unique identifier of the custom field
name string Field display name
position integer Field display order
required boolean Whether the field is required
custom_field_id integer Same as id (custom field identifier)
custom_field_inner_id integer Related/inner custom field identifier
custom_field_table_id integer Custom field table identifier
custom_field_type_id integer Field type identifier
custom_field_option_default_id string Default/selected option ID(s) when prefilled (comma-separated for multi-select)
value string Prefill value for the field (image fields may return a full URL)
custom_field_type object Field type details
custom_field_option array Available options for select/radio/multi-select fields

Error Responses

Status Code Meaning
400 Bad Request – opportunity fields could not be retrieved
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – An error occurred while loading opportunity fields (for example, "Error while retrieving the Contact Opportunities").
  • 401 – Authentication failed or the access token is missing/expired.