API:Opportunity:Type:Get

From docs
Jump to: navigation, search

API » Get Opportunity Types

Base URL

https://app.callproof.com

Endpoint

/api/opportunity/type/get/

Purpose

Retrieves the opportunity types configured for your CallProof company. Use this to obtain the available opportunity categories that can be assigned when creating or managing opportunities.

HTTP Method

GET

Headers

No required headers.

Header Required Description
No headers are required for this endpoint. Authentication is provided via query parameters.

Security

  • Yes – Requires a valid API key and secret with permission to read opportunities.

Parameters

Path Parameters

None.

Query Parameters

Parameter Type Required Description
key string Yes Public API key assigned to your CallProof account.
secret string Yes Private API secret paired with the API key.

Request Body

None.

cURL Example

curl -X GET "https://app.callproof.com/api/opportunity/type/get/?key=YOUR_API_KEY&secret=YOUR_API_SECRET"

Successful Response (200)

Returns the opportunity types available for your company, ordered by their configured position.

Field Type Description
results array List of opportunity types.
results[].id integer Unique identifier for the opportunity type.
results[].name string Display name of the opportunity type.
errors object Empty object when the request succeeds.
code integer HTTP-style status value; 200 on success.

Example response:

{
  "results": [
    {
      "id": 1,
      "name": "New Business"
    },
    {
      "id": 2,
      "name": "Renewal"
    },
    {
      "id": 3,
      "name": "Upsell"
    }
  ],
  "errors": {},
  "code": 200
}

Notes

  • Returns only opportunity types belonging to your company.
  • Types are ordered by their configured position.
  • If no opportunity types are configured, the response returns an empty results list with status 200.
  • This endpoint does not support pagination or filtering.
  • Type IDs from this endpoint can be used when creating opportunities.

Error Responses

Status Code Meaning
401 Unauthorized – The API key and/or secret is missing, invalid, inactive, associated with a disabled account, or lacks permission to read opportunities.
405 Method Not Allowed – A method other than GET was used.
500 Internal Server Error – An unexpected server problem occurred. Not specified in Swagger.

401 response body example:

{
  "results": [],
  "errors": ["Invalid API Key"],
  "code": 401
}

405 response body example:

{
  "results": [],
  "errors": ["Method not allowed"],
  "code": 405
}