Chilkat Online Tools

Go / Salesforce Platform APIs / Configuration Validator API

Back to Collection Items

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

    http := chilkat.NewHttp()
    var success bool

    // Adds the "Authorization: Bearer <access_token>" header.
    http.SetAuthToken("<access_token>")
    http.SetRequestHeader("Content-Type","application/json")

    resp := http.QuickRequest("PATCH","https://domain.com/services/apexrest/SBQQ/ServiceRouter?loader=SBQQ.ConfigAPI.ConfigurationValidator&uid=")
    if http.LastMethodSuccess() == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        return
    }

    fmt.Println(resp.StatusCode())
    fmt.Println(resp.BodyStr())
    resp.DisposeHttpResponse()

    http.DisposeHttp()

Curl Command

curl -X PATCH
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: application/json"
https://domain.com/services/apexrest/SBQQ/ServiceRouter?loader=SBQQ.ConfigAPI.ConfigurationValidator&uid=

Postman Collection Item JSON

{
  "name": "Configuration Validator API",
  "request": {
    "method": "PATCH",
    "header": [
      {
        "key": "Content-Type",
        "type": "text",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{_endpoint}}/services/apexrest/SBQQ/ServiceRouter?loader=SBQQ.ConfigAPI.ConfigurationValidator&uid=",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "apexrest",
        "SBQQ",
        "ServiceRouter"
      ],
      "query": [
        {
          "key": "loader",
          "value": "SBQQ.ConfigAPI.ConfigurationValidator"
        },
        {
          "key": "uid",
          "value": ""
        }
      ]
    },
    "description": "The Configuration Validator API runs selection, validation, and alert product rules and configurator-scoped price rules against the input configuration model and returns an updated configuration model.\nAvailable in: Salesforce CPQ Spring ’17 and later\n\nhttps://developer.salesforce.com/docs/atlas.en-us.cpq_dev_api.meta/cpq_dev_api/cpq_api_config_validator.htm"
  },
  "response": [
  ]
}