Skip to main content
Calculate scores for suppliers
curl --request POST \
  --url https://api.responsibly.tech/v1/score-calculation \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "supplierIds": [
    "01h57nhc4sapk2v8c7tq[...]"
  ],
  "policyParameterIds": [
    "01fb6pb5wmkmq6pdyqas[...]"
  ],
  "dataSourceIds": [
    "01fxj9241kzmtqy3nx[...]"
  ],
  "includeZeroValues": true
}
'
{
  "items": [
    {
      "supplierId": "01h57nhc4s[...]",
      "score": {
        "value": 123,
        "dataSourcesScore": {
          "value": 123
        },
        "policyParametersScore": {
          "value": 123
        }
      },
      "dataSourceScores": [
        {
          "dataSourceId": "01h57nhc4s[...]",
          "score": {
            "value": 123
          },
          "dataPoints": {
            "dataEntries": [
              {
                "id": "01h57nht08[...]",
                "supplierId": "01h57nhc4s[...]",
                "dataSourceId": "01g79c3f9j[...]",
                "score": {
                  "value": 123
                },
                "isClaim": false,
                "expiryDate": "2024-01-01",
                "issueDate": "2024-01-01"
              }
            ]
          }
        }
      ],
      "policyParameterScores": [
        {
          "policyParameterId": "01fb6pb5wm[...]",
          "score": {
            "value": 123
          },
          "dataPoints": {
            "dataEntries": [
              {
                "id": "01h57nht08[...]",
                "supplierId": "01h57nhc4s[...]",
                "dataSourceId": "01g79c3f9j[...]",
                "score": {
                  "value": 123
                },
                "isClaim": false,
                "expiryDate": "2024-01-01",
                "issueDate": "2024-01-01"
              }
            ],
            "risk": {
              "riskLevel": "Medium",
              "riskEntries": [
                {
                  "riskDataSourceId": "01hv0w89bk[...]",
                  "year": 2023,
                  "riskIndicators": [
                    {
                      "riskLevel": "Medium",
                      "name": "Risk Indicator Name",
                      "website": "https://www.example.com",
                      "description": "Risk Indicator Description"
                    }
                  ]
                }
              ]
            },
            "contexts": [
              {
                "type": "industry",
                "name": "Packaged Foods & Meats",
                "code": "30202030"
              }
            ]
          }
        }
      ]
    }
  ]
}

Authorizations

x-api-key
string
header
required

Body

application/json
supplierIds
string[]
required
Required array length: 1 - 100 elements
Example:
["01h57nhc4sapk2v8c7tq[...]"]
policyParameterIds
string[]
Example:
["01fb6pb5wmkmq6pdyqas[...]"]
dataSourceIds
string[]

Data source ID

Example:
["01fxj9241kzmtqy3nx[...]"]
includeZeroValues
boolean
default:true

Whether to include zero values in score calculations

Example:

true

Response

Returns a list of scores for suppliers.

items
object[]
required