Skip to main content

Validation suite tests for supported features

Testing custom output data

If you've specified support for CUSTOM_DATA_OUTPUT in your /config endpoint, this is tested in the validation suite.

The demo_result value is CUSTOM_DATA_OUTPUT, and your response should return a valid response that contains the properly formatted custom data that matches the schema that you specified in your /config endpoint.

To learn more, see Add custom data output.

For example, if your /config endpoint response looked like:

{
  "check_type": "COMPANY_DATA",
  "check_template": {
    "type": "ONE_TIME_SYNCHRONOUS",
    "timeout": 240
  },
  "pricing": {
      "supports_reselling": false
  },
  "supported_countries": ["GBR", "CAN", "USA"],
  "supported_features": [
    "COMPANY_SEARCH",
    "CUSTOM_DATA_OUTPUT",
  ],
  "credentials": {
    "fields": [
      {
        "type": "string",
        "name": "username",
        "label": "Username"
      },
      {
        "type": "password",
        "name": "password",
        "label": "Password"
      }
    ]
  },
  "config": {
    "fields": []
  },
  "output_custom_fields": {
      "version": "1",
      "fields": {
        "n_esg_score": {
          "type": "DECIMAL",
          "label": "ESG Score"
        },
        "n_esg_e_score": {
          "type": "DECIMAL",
          "label": "ESG Environment Sub-score"
        },
        "n_esg_s_score": {
          "type": "DECIMAL",
          "label": "ESG Social Sub-score"
        },
        "b_product_assessment": {
          "type": "BOOLEAN",
          "label": "Passes ESG assessment"
        }
      } 
    }
  }
}

A valid response, if using a custom check type, might be:

{
  "provider_data": "Made up example response.",
  "errors": [],
  "warnings": [],
  "external_resources": [],
  "result": {
    "decision": "PASS",
    "summary": "The overall result is a pass."
  },
  "check_output": {
    "entity_type": "INDIVIDUAL",
    "custom_fields_data": 
          { 
            "n_esg_score": 123.4, 
            "n_esg_e_score": 43,
            "n_esg_s_score": 1.13,
            "b_product_assessment": true
          }            
  }
}

Additional information