Skip to content

Upload data to an assignment

Request

Uploads assignment data in JSON format, including metrics and dimensions, for the specified assignment. A valid authorization token is required for the request.

Security
Bearer
Query
assignmentIdinteger, (int32)required

The unique identifier for the assignment to which the data will be uploaded.

uploadIdinteger, (int32)required

The unique identifier for the upload session, used to track the specific data upload.

Bodyapplication/jsonrequired

The instant assignment payload

Array [
metricNamestring or null

The name of the collection metric (e.g., "Total Nos of Employee Count").

Example:"Total Nos of Employee Count"
metricIdinteger, (int32)

The unique ID for the metric.

Example:5244
metricGuidstring, (uuid)

The GUID associated with the metric, used for unique identification.

Example:"99384ade-09db-4219-ae19-81b0321cb727"
dimensionsArray of objects or null(CollectionMetricDimReqRes)

A list of dimensions associated with the collection metric. Each dimension contains further details related to the metric.

Example:
[ { "Country": "USA", "Company": "GlobalEco Corporation", "Department": "HR", "Location": "New York", "BusinessUnit": "North America", "Month": "March", "Year": 2025, "Value": 1000, "NotAvailable": false } ]
]
curl -i -X POST \
  'https://developer.sustainabilitymaster.ai/_mock/openapi/api/DataCollection/InstantAssignmentDataUpload?assignmentId=0&uploadId=0' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "metricName": "Total Nos of Employee Count",
      "metricId": 5244,
      "metricGuid": "99384ade-09db-4219-ae19-81b0321cb727",
      "dimensions": [
        {
          "Country": "USA",
          "Company": "GlobalEco Corporation",
          "Department": "HR",
          "Location": "New York",
          "BusinessUnit": "North America",
          "Month": "March",
          "Year": 2025,
          "Value": 1000,
          "NotAvailable": false
        }
      ]
    }
  ]'

Responses

Successfully uploaded the assignment data