Resources
Source JSON Payload

Source JSON Payload

Prepare existing category, level, and lesson JSON for Content Integration expansion.

Content Integration accepts existing source JSON as the input of record. Use this guide when another content system already owns the content structure and needs TutorFlow to create reusable authoring outputs from it.

Minimum shape

{
  "category": {
    "id": "language-basics",
    "title": "Language Basics"
  },
  "language": "en",
  "level": {
    "id": "level-a1",
    "title": "A1 Foundations",
    "lessons": [
      {
        "id": "lesson-1",
        "type": "vocabulary",
        "title": "Basic greetings",
        "items": [
          {
            "term": "hello",
            "meaning": "a greeting",
            "example": "Hello, Min."
          }
        ]
      }
    ]
  }
}

Full example

Use one category and one level for the first integration test. Include the source system's real field names. TutorFlow keeps unknown fields in the prompt context, so the external system does not need to pre-convert content before submission.

{
  "category": {
    "id": "language-basics",
    "title": "Language Basics"
  },
  "language": "en",
  "level": {
    "id": "level-a1",
    "title": "A1 Foundations",
    "lessons": [
      {
        "id": "lesson-vocabulary-1",
        "type": "vocabulary",
        "title": "Basic greetings",
        "items": [
          {
            "term": "hello",
            "meaning": "a greeting used when meeting someone",
            "example": "Hello, Mina."
          }
        ]
      },
      {
        "id": "lesson-example-1",
        "type": "example",
        "title": "Greeting examples",
        "examples": [
          {
            "source": "Good morning.",
            "translation": "A greeting used in the morning.",
            "note": "Use this before noon."
          }
        ]
      },
      {
        "id": "lesson-dialogue-1",
        "type": "dialogue",
        "title": "Meeting a classmate",
        "turns": [
          {
            "speaker": "A",
            "text": "Hello. What is your name?"
          },
          {
            "speaker": "B",
            "text": "My name is Mina."
          }
        ]
      },
      {
        "id": "lesson-check-1",
        "type": "quiz",
        "title": "Greeting check",
        "questions": [
          {
            "question": "Which phrase is a greeting?",
            "choices": ["Hello", "Blue", "Desk"],
            "answer": "Hello",
            "explanation": "Hello is used to greet someone."
          }
        ]
      },
      {
        "id": "lesson-review-1",
        "type": "review",
        "title": "Level review",
        "summary": "Review greetings, names, and simple introductions.",
        "keyPoints": ["hello", "my name is", "good morning"]
      }
    ]
  }
}

Lesson type handling

The integration keeps lesson order and preserves unknown fields in the prompt context. Use the source system's existing lesson type names. The examples below are common patterns, not required enum values.

PatternExpected contentReturned expansion behavior
vocabularyTerms, meanings, examples, glossary entriesBecomes guided concept explanation, practice checks, and review prompts.
exampleUsage examples, translations, notes, explanationsBecomes worked examples and instructor-style explanation blocks.
dialogueSpeaker turns and conversational practiceBecomes role-play prompts, comprehension checks, and video scene material.
quizExisting checks, answer keys, hints, explanationsSeeds expanded quiz items while preserving answer intent.
reviewSummary, key points, level review contentBecomes wrap-up sections, recap scenes, and final review questions.

If the source system uses different type names, keep the original values. TutorFlow maps them during integration setup.

Payload guidance

  • Include stable ids for category, level, and lessons.
  • Keep source text, examples, answer keys, hints, and explanations in the payload.
  • Include language or locale if the content is not English.
  • Do not pre-convert lesson text into TutorFlow formats. Send the current JSON structure.
  • Send one level or similarly small content group for the first test so output review stays manageable.

Validation checklist

  • The payload is valid JSON.
  • The level or content group contains at least one lesson.
  • Each lesson has a stable id and type.
  • Quiz answers are included when available.
  • The customer can process and submit the source content.