Delete a question from a course test.

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Permanently deletes one question, and its learner answers, from a test in a course lesson. The path formId is the test's form UUID, not the test id; fieldId is the question id.

Endpoint

delete https://{TrainerCentral-API-Domain}/tc/api/v1/trainer/session/{sessionId}/form/{formUuid}/fields/{fieldUuid}.json

OAuth Scope

TrainerCentral.sessionapi.DELETECopied!

Headers

tc-orgIdstring(Required)

ID of the academy (orgId).

Example
51517414

Path Parameters

sessionIdlong(Required)

ID of the course lesson (sessionId) that holds the test.

Example
21603000000354002
formUuidstring(Required)

Form UUID of the test (the part of tests[].formId before the underscore), not the test id.

Example
7305cb9e-3913-49d7-8cb9-eebd159f5281
fieldUuidstring(Required)

ID of the question (fields[].id).

Example
d4ebb48b-fea8-4260-8879-da6e839e25ba

Query Parameters

typestring(Required)

Form type. Allowed: 3=Test.

Example
3

Request Example

cURL
cURL
Java
Python
Deluge
Copied!
curl --request DELETE \
  --url 'https://trainercentral.zoho.com/tc/api/v1/trainer/session/21603000000354002/form/7305cb9e-3913-49d7-8cb9-eebd159f5281/fields/d4ebb48b-fea8-4260-8879-da6e839e25ba.json?type=3' \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \
  --header 'tc-orgId: 51517414'

Response Parameters

fieldsJSON Array

Questions added (Add), or the renumbered questions after the deleted one (Delete).

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
idstring

Question ID (fieldId).

formIdstring

Test form ID (formUuid_sessionId).

formstring

Same as formId.

labelstring

Question text.

fieldTypestring

Question type. Allowed: 2=Choice, 7=True or false, 8=Fill in the blank, 16=Essay.

scorestring

Marks for a correct answer.

isMandatorystring

true when the question must be answered.

isUniquestring

Not used. Always false.

orderIndexstring

Position of the question.

preDefinedFieldIdstring

Not used. Always 0.

evaluationTypestring

Allowed: 0=Default, 1=OCR.

evaluationDatastring

Evaluation data for OCR.

isCaseSensitivestring

Fill in the blank only. true when answers are case sensitive.

textLengthstring

Essay only. Maximum answer length.

textCountTypestring

Essay only. Allowed: 0=Characters, 1=Words.

enableFeedbackstring

true when feedback is on.

feedbackJSON Object

Feedback for the question.

Show Sub-Attributes
typestring

Feedback mode. Allowed: 0=Same for any answer, 1=Correct and incorrect, 2=Per option.

dataListarray

Feedback texts. Supports rich text.

multipleChoiceJSON Array

Type objects of the returned Choice and True or false questions.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
idstring

ID of the type object.

fieldstring

ID of the question (fields[].id).

formIdstring

Test form id (formUuid_sessionId); the part before the underscore is the form UUID.

selectionTypestring

Choice and True or false only. Allowed: 0=Single answer, 1=Multiple answers.

fillInBlankJSON Array

Type objects of the returned Fill in the blank questions.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
idstring

ID of the type object.

fieldstring

ID of the question (fields[].id).

formIdstring

Test form id (formUuid_sessionId); the part before the underscore is the form UUID.

selectionTypestring

Choice and True or false only. Allowed: 0=Single answer, 1=Multiple answers.

essayJSON Array

Type objects of the returned Essay questions.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
idstring

ID of the type object.

fieldstring

ID of the question (fields[].id).

formIdstring

Test form id (formUuid_sessionId); the part before the underscore is the form UUID.

selectionTypestring

Choice and True or false only. Allowed: 0=Single answer, 1=Multiple answers.

fieldOptionJSON Array

Options of all returned questions; match each to its question by fieldId.

Hide Sub-Attributes
JSON Object
Show Sub-Attributes
idstring

ID of the option.

fieldOptionIdstring

Same as id.

fieldIdstring

ID of the question (fields[].id).

formIdstring

Test form id (formUuid_sessionId).

optionTextstring

Option text, accepted blank answer, or essay reference answer.

optionTypestring

Choice only. Content type of optionText. Allowed: 0=Text, 1=Image.

orderIndexstring

Position of the option or blank, from 0.

correctAnswerstring

true when this option is correct (Choice, True or false).

multipleChoicestring

ID of the parent multipleChoice object.

fillInBlankstring

ID of the parent fillInBlank object.

essaystring

ID of the parent essay object.

errorJSON Object

Error details.

Hide Sub-Attributes
codestring

Deprecated numeric error code (for example ST_202). Prefer codeStr; omitted from doc samples.

codeStrstring

Error code name (ShowtimeErrorCode / err_code_str), for example MISSING_PARAMETER.

messagestring

Error message.

Possible Error Codes

HTTP CodeError CodeDescription
500ST_79

INVALID_SESSION - The sessionId is not a lesson in this academy. Use tests[].sessionId from List Course Tests; do not retry unchanged.

ST_401

SESSION_DELETED - The lesson (sessionId) is deleted. Use an existing lesson; do not retry unchanged.

ST_102

UNAUTHORISED_ACCESS - The user cannot edit this test. Use an academy owner, admin, course trainer or lesson owner; do not retry unchanged.

ST_64

UNABLE_TO_RETRIEVE_TALK_SETTINGS_DATA - No test with this form UUID in the lesson, or type is not 3. Send the part of tests[].formId before the underscore and type=3; do not retry unchanged.

Response Example

Second of three questions deleted.

Second of three questions deleted.

Last question deleted.

200
200
400
500
Copied!
  {
    "fields": [
      {
        "id": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
        "formId": "7305cb9e-3913-49d7-8cb9-eebd159f5281_21603000000354002",
        "label": "Explain why cash flow management is critical for small businesses in their first year.",
        "fieldType": "16",
        "score": "10",
        "isMandatory": "true",
        "isUnique": "false",
        "orderIndex": "1",
        "preDefinedFieldId": "0",
        "evaluationType": "0",
        "evaluationData": "",
        "textLength": "300",
        "textCountType": "1",
        "enableFeedback": "false"
      }
    ],
    "essay": [
      {
        "id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
        "field": "9e8d7c6b-5a4f-4e3d-8c2b-1a0f9e8d7c6b",
        "formId": "7305cb9e-3913-49d7-8cb9-eebd159f5281_21603000000354002"
      }
    ]
  }
                
  {
    "fields": []
  }
                
  {
    "error": {
      "code": "string",
      "codeStr": "string",
      "message": "string"
    }
  }
                
500 Request failed; see the error code.
▼ Show full