Chilkat Online Tools

lianja / Salesforce Platform APIs / Retrieve lookup tables

Back to Collection Items

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loHttp = createobject("CkHttp")

loQueryParams = createobject("CkJsonObject")
loQueryParams.UpdateString("searchKey","my")
loQueryParams.UpdateString("usageType","Bre")
loQueryParams.UpdateString("lookupTypes","DecisionTable")

// Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"

loResp = loHttp.QuickRequestParams("GET","https://domain.com/services/data/v{{version}}/connect/business-rules/lookup-tables",loQueryParams)
if (loHttp.LastMethodSuccess = .F.) then
    ? loHttp.LastErrorText
    release loHttp
    release loQueryParams
    return
endif

? str(loResp.StatusCode)
? loResp.BodyStr
release loResp


release loHttp
release loQueryParams

Curl Command

curl -G -d "searchKey=my"
	-d "usageType=Bre"
	-d "lookupTypes=DecisionTable"
	-H "Authorization: Bearer <access_token>"
https://domain.com/services/data/v{{version}}/connect/business-rules/lookup-tables

Postman Collection Item JSON

{
  "name": "Retrieve lookup tables",
  "request": {
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/connect/business-rules/lookup-tables?searchKey=my&usageType=Bre&lookupTypes=DecisionTable",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "connect",
        "business-rules",
        "lookup-tables"
      ],
      "query": [
        {
          "key": "searchKey",
          "value": "my"
        },
        {
          "key": "usageType",
          "value": "Bre"
        },
        {
          "key": "lookupTypes",
          "value": "DecisionTable",
          "description": "Optional: Type of lookup table. Valid values are: DecisionMatrix, DecisionTable"
        }
      ]
    },
    "description": "# Lookup Tables (GET)\n\nRetrieve lookup tables.Resource\n\n```\n/connect/business-rules/lookup-tables\n\n ```\n\nResource example\n\n```\nhttps://yourInstance.salesforce.com/services/data/v59.0/connect/business-rules/lookup-tables?searchKey=D&usageType=Bre&lookupTypes=DecisionTable,DecisionMatrix\n\n ```\n\n```\nhttps://yourInstance.salesforce.com/services/data/v59.0/connect/business-rules/lookup-tables?searchKey=D&usageType=Bre\n\n ```\n\nAvailable version59.0Requires ChatterNoHTTP methodsGETRequest parameters for GET\n\n| Parameter Name | Type | Description | Required or Optional | Available Version |\n| --- | --- | --- | --- | --- |\n| lookupTypes | String | Type of lookup table. Valid values are:<br><br>- DecisionMatrix<br>    <br>- DecisionTable | Optional | 59.0 |\n| searchKey | String | The search text entered by the user to retrieve a list of lookup tables. | Required | 59.0 |\n| usageType | String | Usage type of the lookup table. Valid values are:<br><br>- AiAccelerator​SubscriberChurn​Prediction—Used for Industries Einstein<br>    <br>- Bre—Used for Business Rules Engine<br>    <br>- CustomLoyalty—Used for Loyalty Management<br>    <br>- DefaultPricing—Used for Pricing Plans in Enterprise Product Catalog (EPC) by Communications Cloud<br>    <br>- Qualification—Used for Industries Communications, Media, and Energy (CME)<br>    <br>- RecordAlert—Used for Financial Services Cloud<br>    <br>- ShipAndDebit—Used for Manufacturing Cloud<br>    <br>- TierProcessing—Used for Loyalty Management<br>    <br>- TransactionJournal—Used for Loyalty Management<br>    <br>- WarrantyClaim—Used for Manufacturing Cloud | Required | 59.0 |\n\nResponse body for GET[Lookup Tables Result List](https://developer.salesforce.com/docs/atlas.en-us.industries_reference.meta/industries_reference/connect_responses_lookup_tables_result_list.htm)"
  },
  "response": [
    {
      "name": "404-BecauseVersion59.0NotPresentInTargetOrg",
      "originalRequest": {
        "method": "GET",
        "header": [
        ],
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/connect/business-rules/lookup-tables?searchKey=my&usageType=Bre&lookupTypes=DecisionTable",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "connect",
            "business-rules",
            "lookup-tables"
          ],
          "query": [
            {
              "key": "searchKey",
              "value": "my"
            },
            {
              "key": "usageType",
              "value": "Bre"
            },
            {
              "key": "lookupTypes",
              "value": "DecisionTable",
              "description": "Optional: Type of lookup table. Valid values are: DecisionMatrix, DecisionTable"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Wed, 06 Sep 2023 08:56:11 GMT"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000; includeSubDomains"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "X-Robots-Tag",
          "value": "none"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache,must-revalidate,max-age=0,no-store,private"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=UTF-8"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        }
      ],
      "cookie": [
      ],
      "body": "[\n    {\n        \"errorCode\": \"NOT_FOUND\",\n        \"message\": \"The requested resource does not exist\"\n    }\n]"
    }
  ]
}