Skip to content

Get Opportunity Roles

GET /rest/v1/opportunities/roles.json

Permissions Read-Only OpportunityRead-Write Named Opportunity

Build a request and mock the response

Method: GET
Path: /rest/v1/opportunities/roles.json
Tag: Opportunities
Operation ID: getOpportunityRolesUsingGET

Returns a list of opportunity roles based on a filter and set of values. Required Permissions: Read-Only Opportunity, Read-Write Named Opportunity

Formats

  • Request: application/json
  • Response: application/json

Request

Query parameters

Name Type Required Description Constraints
filterType string Yes The role field to filter on. Searchable fields can be retrieved with the Describe Opportunity call.
filterValues array Yes Comma-separated list of field values to return records for collection format: multi
fields array No Comma-separated list of fields to include in the response collection format: multi
batchSize integer (int32) No Maximum number of records to return in the response. Max and default is 300
nextPageToken string No Paging token returned from a previous response

Request body

Name: customObjectLookupRequest
Required: No
Schema: model: LookupCustomObjectRequest

Optional JSON request for retrieving opportunity roles with compound keys

Generated example

{
  "batchSize": 123,
  "fields": [
    "string"
  ],
  "filterType": "string",
  "input": [
    {
      "marketoGUID": "123",
      "reasons": [
        {
          "code": "string",
          "message": "string"
        }
      ],
      "seq": 123
    }
  ],
  "nextPageToken": "example-token"
}

Referenced models

Example request

GET {{base_url}}/rest/v1/opportunities/roles.json?filterType={{filterType}}&filterValues={{filterValues}}&fields={{fields}}&batchSize={{batchSize}}&nextPageToken={{nextPageToken}}
Content-Type: application/json
Accept: application/json

{
  "batchSize": 123,
  "fields": [
    "string"
  ],
  "filterType": "string",
  "input": [
    {
      "marketoGUID": "123",
      "reasons": [
        {
          "code": "string",
          "message": "string"
        }
      ],
      "seq": 123
    }
  ],
  "nextPageToken": "example-token"
}

Responses

200 — OK

Schema: model: ResponseOfCustomObject

Generated example

{
  "errors": [
    {
      "code": "string",
      "message": "string"
    }
  ],
  "moreResult": false,
  "nextPageToken": "example-token",
  "requestId": "123",
  "result": [
    {
      "marketoGUID": "123",
      "reasons": [
        {
          "code": "string",
          "message": "string"
        }
      ],
      "seq": 123
    }
  ],
  "success": false,
  "warnings": [
    {
      "code": 123,
      "message": "string"
    }
  ]
}

Referenced models

Source

Generated from swagger-mapi.json.

Generated examples are inferred from the schema. They are illustrative and may not be valid production payloads.