Chilkat Online Tools

DataFlex / Salesforce Platform APIs / Retrieve lookup tables

Back to Collection Items

Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vQueryParams
    Handle hoQueryParams
    Variant vResp
    Handle hoResp
    String sTemp1
    Integer iTemp1
    Boolean bTemp1

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

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Get Create (RefClass(cComChilkatJsonObject)) To hoQueryParams
    If (Not(IsComObjectCreated(hoQueryParams))) Begin
        Send CreateComObject of hoQueryParams
    End
    Get ComUpdateString Of hoQueryParams "searchKey" "my" To iSuccess
    Get ComUpdateString Of hoQueryParams "usageType" "Bre" To iSuccess
    Get ComUpdateString Of hoQueryParams "lookupTypes" "DecisionTable" To iSuccess

    // Adds the "Authorization: Bearer <access_token>" header.
    Set ComAuthToken Of hoHttp To "<access_token>"

    Get pvComObject of hoQueryParams to vQueryParams
    Get ComQuickRequestParams Of hoHttp "GET" "https://domain.com/services/data/v{{version}}/connect/business-rules/lookup-tables" vQueryParams To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get ComStatusCode Of hoResp To iTemp1
    Showln iTemp1
    Get ComBodyStr Of hoResp To sTemp1
    Showln sTemp1
    Send Destroy of hoResp


End_Procedure

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]"
    }
  ]
}