Org settings, dashboards & reporting

Process CSV Upload

Parses raw CSV text and runs the registered pipeline for the upload type, creating grants.

POSThttps://api.toku.com/tga/process-csv-upload

Not available to API keys yet. It will need grants:write.

curl --request POST \
  --url 'https://api.toku.com/tga/process-csv-upload' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "uploadType": "grants",
  "csvData": "string"
}'
200 response
{
  "success": true,
  "summary": {
    "totalRows": 0,
    "validRows": 0,
    "invalidRows": 0,
    "reviewRows": 0,
    "durationMs": 0,
    "stagesExecuted": [
      "string"
    ]
  },
  "data": [
    {}
  ],
  "created": {},
  "needsReview": [
    {
      "row": 0,
      "field": "string",
      "value": "string",
      "matchedTo": "string",
      "confidence": 0
    }
  ],
  "errors": [
    {}
  ],
  "warnings": [
    {}
  ],
  "columnMappings": [
    {}
  ],
  "unmappedColumns": [
    {}
  ]
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is an access token from a Toku sign-in. See Authentication in the API reference.

Body

application/json

uploadTypestringrequired

Available options: grants, recorded-payment-corrections, wallets

csvDatastringrequired

Allowed: at least 1 characters

Response

200Successful response
successbooleanrequired
summaryobjectrequired
Show child attributes
totalRowsintegerrequired

Allowed: at least 0

validRowsintegerrequired

Allowed: at least 0

invalidRowsintegerrequired

Allowed: at least 0

reviewRowsintegerrequired

Allowed: at least 0

durationMsintegerrequired

Allowed: at least 0

stagesExecutedstring[]required
dataobject[]required
createdobjectrequired
needsReviewobject[]required
Show child attributes
rowintegerrequired
fieldstringrequired
valuestringrequired
matchedTostringrequired
confidencenumberrequired
errorsobject[]required
warningsobject[]required
columnMappingsobject[]required
unmappedColumnsobject[]required
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
429Response 429
Was this page helpful? Suggest edits