POST /v1/company/{id}/import-data

Import v2 data into a company

Path parameters

  • id string Required

    Company ID

application/json

Body Required

Request for importing data into a company

  • zip_file file(binary) Required

    Zip file containing data to import

Responses

  • 200 application/json

    successful operation

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates if the import was successful

    • message string Required

      Message to display to the user

    • errors array[object] Required
      Hide errors attributes Show errors attributes object
      • file string Required

        File name

      • row integer Required

        Row number

      • message string Required

        Error message

  • 403 application/json

    Not authorized

    Hide response attributes Show response attributes object

    Error schema

    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

  • 404 application/json

    Not found

    Hide response attributes Show response attributes object

    Error schema

    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

POST /v1/company/{id}/import-data
curl \
 --request POST 'https://api.classmanager.io/v1/company/co_123123123123/import-data' \
 --header "Content-Type: application/json" \
 --data '{"zip_file":"@file"}'
Request examples
{
  "zip_file": "@file"
}
Response examples (200)
{
  "success": false,
  "message": "Validation errors occurred",
  "errors": [
    {
      "file": "staff.csv",
      "row": 62,
      "message": "Family ID does not match any family"
    }
  ]
}
Response examples (403)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}
Response examples (404)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}