Submit Writing

Submits Writing responses for grading.

POST/api/v1/courses/exam-gradings/writing#

Request Body

exam_idStringrequired
Exam ID
exam_nameStringrequired
Product name
product_categorySINGLE | PACKAGEdefault: "SINGLE"
Product category
  • SINGLESingle purchase
  • PACKAGEPackage
product_typeCOMPLETE | HALF
Product type
  • COMPLETETPO Complete
  • HALFTPO Half (W/S)
is_finalBoolean
Whether this request completes the attempt. When you split the items across requests, send false on every request but the last. Treated as true when omitted
user_idStringrequired
Learner ID
section_scoreNumberrequired
Section score (1.0-6.0, in steps of 0.5)
itemsArray of objectsrequired
Questions, at least one
problem_idStringrequired
Question ID. Must be unique within a request
problem_typeMSOM | WDSrequired
Question type
  • MSOMBuild a Sentence (questions 1 to 10)
  • WDSWrite an Email (11), Write for an Academic Discussion (12)
question_numberNumberrequired
Question number. It decides which rubric a WDS item uses, 11 (Write an Email) or 12 (Academic Discussion). Rejected with 422 when missing
scoreNumberrequired
Question score. Build a Sentence is 0 or 1, the rest range from -0.4998 to 5.4998
user_answerStringrequired
The learner's response

Response Fields

jobsArray of objectsrequired
Created feedback jobs. One per question
job_idStringrequired
Feedback job ID, used to retrieve the result
problem_idStringrequired
Question ID
statusStringrequired
Status at submission (PENDING)
curl -X POST "https://tap-file-upload-production.coxwave.link/api/v1/courses/exam-gradings/writing" \
  -H "Content-Type: application/json" \
  -H "TAP-API-KEY: {YOUR_API_KEY}" \
  -d '{
    "exam_id": "I100000760_1",
    "exam_name": "Complete Practice Test Volume 02",
    "product_category": "SINGLE",
    "product_type": "COMPLETE",
    "is_final": true,
    "user_id": "u-1001",
    "section_score": 4.0,
    "items": [
      {
        "problem_id": "w1",
        "question_number": 1,
        "problem_type": "MSOM",
        "score": 0,
        "user_answer": "I wonder where did she find the book."
      },
      {
        "problem_id": "w11",
        "question_number": 11,
        "problem_type": "WDS",
        "score": 4.1252,
        "user_answer": "Dear Professor Kim, thank you for your email about the group project..."
      },
      {
        "problem_id": "w12",
        "question_number": 12,
        "problem_type": "WDS",
        "score": 3.4998,
        "user_answer": "I agree with Andrew that online shopping has changed local businesses..."
      }
    ]
  }'
import requests

res = requests.post(
    "https://tap-file-upload-production.coxwave.link/api/v1/courses/exam-gradings/writing",
    headers={"TAP-API-KEY": "{YOUR_API_KEY}"},
    json={
        "exam_id": "I100000760_1",
        "exam_name": "Complete Practice Test Volume 02",
        "product_category": "SINGLE",
        "product_type": "COMPLETE",
        "is_final": True,
        "user_id": "u-1001",
        "section_score": 4.0,
        "items": [
            {
                "problem_id": "w1",
                "question_number": 1,
                "problem_type": "MSOM",
                "score": 0,
                "user_answer": "I wonder where did she find the book."
            },
            {
                "problem_id": "w11",
                "question_number": 11,
                "problem_type": "WDS",
                "score": 4.1252,
                "user_answer": "Dear Professor Kim, thank you for your email about the group project..."
            },
            {
                "problem_id": "w12",
                "question_number": 12,
                "problem_type": "WDS",
                "score": 3.4998,
                "user_answer": "I agree with Andrew that online shopping has changed local businesses..."
            }
        ]
    },
)
print(res.json())
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	body := []byte(`{
	  "exam_id": "I100000760_1",
	  "exam_name": "Complete Practice Test Volume 02",
	  "product_category": "SINGLE",
	  "product_type": "COMPLETE",
	  "is_final": true,
	  "user_id": "u-1001",
	  "section_score": 4.0,
	  "items": [
	    {
	      "problem_id": "w1",
	      "question_number": 1,
	      "problem_type": "MSOM",
	      "score": 0,
	      "user_answer": "I wonder where did she find the book."
	    },
	    {
	      "problem_id": "w11",
	      "question_number": 11,
	      "problem_type": "WDS",
	      "score": 4.1252,
	      "user_answer": "Dear Professor Kim, thank you for your email about the group project..."
	    },
	    {
	      "problem_id": "w12",
	      "question_number": 12,
	      "problem_type": "WDS",
	      "score": 3.4998,
	      "user_answer": "I agree with Andrew that online shopping has changed local businesses..."
	    }
	  ]
	}`)
	req, _ := http.NewRequest("POST", "https://tap-file-upload-production.coxwave.link/api/v1/courses/exam-gradings/writing", bytes.NewBuffer(body))
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("TAP-API-KEY", "{YOUR_API_KEY}")
	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	b, _ := io.ReadAll(res.Body)
	fmt.Println(string(b))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
  public static void main(String[] args) throws Exception {
    String body = """
        {
          "exam_id": "I100000760_1",
          "exam_name": "Complete Practice Test Volume 02",
          "product_category": "SINGLE",
          "product_type": "COMPLETE",
          "is_final": true,
          "user_id": "u-1001",
          "section_score": 4.0,
          "items": [
            {
              "problem_id": "w1",
              "question_number": 1,
              "problem_type": "MSOM",
              "score": 0,
              "user_answer": "I wonder where did she find the book."
            },
            {
              "problem_id": "w11",
              "question_number": 11,
              "problem_type": "WDS",
              "score": 4.1252,
              "user_answer": "Dear Professor Kim, thank you for your email about the group project..."
            },
            {
              "problem_id": "w12",
              "question_number": 12,
              "problem_type": "WDS",
              "score": 3.4998,
              "user_answer": "I agree with Andrew that online shopping has changed local businesses..."
            }
          ]
        }
        """;
    HttpRequest req = HttpRequest.newBuilder()
        .uri(URI.create("https://tap-file-upload-production.coxwave.link/api/v1/courses/exam-gradings/writing"))
        .header("Content-Type", "application/json")
        .header("TAP-API-KEY", "{YOUR_API_KEY}")
        .POST(HttpRequest.BodyPublishers.ofString(body))
        .build();
    HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
    System.out.println(res.body());
  }
}
const res = await fetch("https://tap-file-upload-production.coxwave.link/api/v1/courses/exam-gradings/writing", {
  method: "POST",
  headers: {"Content-Type": "application/json", "TAP-API-KEY": "{YOUR_API_KEY}"},
  body: JSON.stringify({
    "exam_id": "I100000760_1",
    "exam_name": "Complete Practice Test Volume 02",
    "product_category": "SINGLE",
    "product_type": "COMPLETE",
    "is_final": true,
    "user_id": "u-1001",
    "section_score": 4.0,
    "items": [
      {
        "problem_id": "w1",
        "question_number": 1,
        "problem_type": "MSOM",
        "score": 0,
        "user_answer": "I wonder where did she find the book."
      },
      {
        "problem_id": "w11",
        "question_number": 11,
        "problem_type": "WDS",
        "score": 4.1252,
        "user_answer": "Dear Professor Kim, thank you for your email about the group project..."
      },
      {
        "problem_id": "w12",
        "question_number": 12,
        "problem_type": "WDS",
        "score": 3.4998,
        "user_answer": "I agree with Andrew that online shopping has changed local businesses..."
      }
    ]
  }),
});
console.log(await res.json());
Response
{
  "jobs": [
    { "job_id": "6c4e8c77-...", "problem_id": "w1", "status": "PENDING" },
    { "job_id": "5e0b1c2f-...", "problem_id": "w11", "status": "PENDING" },
    { "job_id": "a1b2c3d4-...", "problem_id": "w12", "status": "PENDING" }
  ]
}