latestOpenAPI 3.0.12026-08-20112309904.6 KB

466169815b78

Scores - Externals

Upload external scores for one or more suppliers

Uploads scores per supplier and event type. Event types are the risk dimensions you score for a supplier (e.g. Carbon, Flood).

What you send

  • A list of suppliers, each with how to find that supplier in Prewave and one or more scores.
  • At most 100 supplier entries in data per request.
  • At most 50 score rows per supplier in scores (one per event type).
  • Each score needs an event type key (eventTypeKey), a value from 1 to 100, and an optional comment.

Recommended workflow

  1. Call List event types for a perspective to see which event type keys are set up for your perspective.
  2. Send this request with those keys where possible.
  3. Review the response: if success is false, open errors to see which suppliers or scores failed and why.

How to read the response

  • The request is accepted even when some rows fail. Check success for an all-clear result.
  • Counters show how many suppliers were received, matched, and saved (totalCount, validCount, resolvedCount, writtenCount, skippedCount).
  • Problems (unknown supplier, unknown event type key, and similar) are listed in errors, not only as an HTTP error.

Required permission: access_public_internal_score

post/public/v1/scores/externals

Request body

Example request

{
  "data": [
    {
      "identifier": {
        "supplierId": "SAP-12345",
        "customerId": "CRM-67890",
        "ownId": "OWN-SITE-01",
        "prewaveId": 102006215,
        "source": "SAP"
      }
    }
  ]
}

Response

Upload finished. Check success, the counters, and errors to see whether every supplier and score was saved.

successboolean required
totalCountinteger required
validCountinteger required
resolvedCountinteger required
writtenCountinteger required
skippedCountinteger required

Example response

{
  "errors": [
    {
      "identifier": {
        "supplierId": "SAP-12345",
        "customerId": "CRM-67890",
        "ownId": "OWN-SITE-01",
        "prewaveId": 102006215,
        "source": "SAP"
      }
    }
  ]
}