文档中心 > FAQ(已废弃)

Original data format of detail

更新时间:2019/07/25 访问次数:5752

sample of Original data :

The developer might notice that in the product posting or editing interface, there is a field which requires you to input a description list with multiple languages. The following provides an example of the data_format in the field web_detail or mobile_detail. The detailed explanation is after the example.

{
   "version":"2.0.0",
    "moduleList":[
        {
            "type":"text-image",
            "texts":[
                {
                    "content":"Store",
                    "class":"title"
                },
                {
                    "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded",
                    "class":"body"
                }
            ]
        },
        {
            "type":"image",
            "images":[
                {
                    "url":"//ae01.alicdn.com/kf/HTB1xsTybizxK1RkSnaVq6xn9VXac.jpg",
                    "style":{

                    }
                }
            ]
        },
        {
            "type":"media",
            "media":{
                "mediaId":219624275851,
                "previewImage":"https://img.alicdn.com/imgextra/i4/6000000003055/O1CN01qjEfFv1YREThcBx3p_!!6000000003055-0-tbvideo.jpg"
            }
        },
        {
            "type":"text",
            "texts":[
                {
                    "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded",
                    "class":"body"
                }
            ]
        },
        {
            "type":"text-image",
            "texts":[
                {
                    "content":"Hello ",
                    "class":"title"
                },
                {
                    "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded",
                    "class":"body"
                }
            ],
            "images":[
                {
                    "url":"//ae01.alicdn.com/kf/HTB1yaema4_rK1RkHFqDq6yJAFXag.jpg",
                    "style":{

                    }
                }
            ]
        },
        {
            "type":"text-image",
            "texts":[
                {
                    "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded",
                    "class":"body"
                }
            ],
            "images":[
                {
                    "url":"//ae01.alicdn.com/kf/HTB1qW9FbnHuK1RkSndVq6xVwpXa6.jpg",
                    "style":{

                    }
                }
            ]
        },
        {
            "type":"text-image",
            "texts":[
                {
                    "content":"story",
                    "class":"title"
                }
            ],
            "images":[
                {
                    "url":"//ae01.alicdn.com/kf/HTB1x6avbo_rK1Rjy0Fcq6zEvVXaN.jpg",
                    "style":{

                    }
                }
            ]
        },
        {
            "type":"html",
            "html":{
                "content":"<h1><font color=\"#b9b6cc\">测试</font></h1>"
            }
        },
        {
            "type":"dynamic",
            "reference":{
                "type":"relation",
                "moduleId":23770182
            }
        }
    ]
}

data format

1.The first level fields are version and moduleList only. version must be 2.0.0,the value of moduleList is an array,Each array object is a module
2.each module should contain “type”,The optional values for “type” are shown in the table below.:

type specification
image image module, web_detail and mobile_detail can include this module
text text module, web_detail and mobile_detail can include this module
text-image text-image module, web_detail and mobile_detail can include this module
media media module, web_detail and mobile_detail can include this module
dynamic Product Information Module, which can be associated module and custom modules。only web_detail can include this module
html rich text module, only web_detail can include this module

Basically there are 6 types, and web_detail could indicate all of the types, while mobile_detail could include only 4 of them. “dynamic” and “html” could only appear in the web_detail.
3.when type=image,module format is as follows:

{
   "type":"image",
   "images":[
        {
          "url":"//ae01.alicdn.com/kf/HTB1xsTybizxK1RkSnaVq6xn9VXac.jpg",
          "style":{
                    "width":750,
                    "height":750,
                    "hasMargin":false
              }
         }
     ]
}

Attribute specification:

Attribute name type necessary specification
images array yes image list
url string yes image url
style object yes image style
width int yes width of image
height int yes height of image
hasMargin boolean yes Does the picture have a margin-bottom?,Optional values can be true or false,if filled with true,then the picture will have 25px padding,else,then the picture is next to the content below.

Please notice that the url of the image could only be the internal CDN link inside alibaba. The internal cdn link could obtained in advance by using the API: https://developers.aliexpress.com/en/doc.htm?docId=30186&docType=2 to upload the image to our server.

4.when type=text,module format is as follows:

{
      "type":"text",
       "texts":[
           {
              "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded",
              "class":"body"
           }
      ]
}

Attribute specification:

Attribute name type necessary specification
texts array yes text list
content string yes text content
class string yes text class,Optional values can be:body,title

5.when type=text-image,module format is as follows:

{
    "type":"text-image",
    "texts":[
        {
            "content":"The width of the picture is 700px and the height is not more than 960px. Support jpg, PNG picture format, size not more than 2MB. Support batch uploading, up to 10 pictures uploaded",
            "class":"body"
        }
    ],
    "images":[
        {
            "url":"//ae01.alicdn.com/kf/HTB1qW9FbnHuK1RkSndVq6xVwpXa6.jpg",
            "style":{

            }
        }
    ]
}

Field instructions refer to the instructions above for type = text and type = image

6.when type=media,module format is as follows:

{
     "type":"media",
     "media":{
          "mediaId":219624275851,
          "previewImage":"https://img.alicdn.com/imgextra/i4/6000000003055/O1CN01qjEfFv1YREThcBx3p_!!6000000003055-0-tbvideo.jpg"
     }
}

Attribute specification:

Attribute name type necessary specification
media object yes video content object
mediaId string yes media id
previewImage string yes media previewImage

7.when type=dynamic,module format is as follows:

{
     "type":"dynamic",
     "reference":{
          "type":"relation",
          "moduleId":23770182
      }
 }

Attribute specification:

Attribute name type necessary specification
reference object yes product information module content
type string yes product information module type,Optional values can be:relation,custom
moduleId int yes module id

8.when type=html,module format is as follows:

{
     "type":"html",
     "html":{
         "content":"<h1><font color=\"#b9b6cc\">test</font></h1>"
     }
}

Attribute specification:

Attribute name type necessary specification
html object yes html module content object
content string yes module content,The format is html

FAQ

关于此文档暂时还没有FAQ
返回
顶部