Skip to main content

Overview

The Protocol Generator service generates structured protocols for e-commerce catalog items. A protocol is a collection of questions and informational content that help collect necessary information about used items.

API Endpoint

POST /loopos_ai_protocol_generator

Request

{
  "node_type": "category",
  "node_context": {
    "name": "Smartphones",
    "description": "Mobile phones with advanced computing capabilities",
    "parent_categories": ["Electronic devices"]
  },
  "language": "en"
}

Response

{
  "elements": [
    {
      "class": "Protocol::Element::Input::Text",
      "attributes": {
        "label": "What is the brand and model of your smartphone?",
        "required": true,
        "hint": "Please enter the exact brand and model name"
      }
    },
    {
      "class": "Protocol::Element::Input::Select",
      "attributes": {
        "label": "What is the storage capacity?",
        "required": true,
        "hint": "Select the storage capacity of your device"
      },
      "options": [
        {"label": "64 GB", "deal_breaker": false},
        {"label": "128 GB", "deal_breaker": false},
        {"label": "256 GB", "deal_breaker": false}
      ]
    }
  ]
}