Skip to content

About Material

Access scope

Multiple access scopes needed — refer to each endpoint for access scope requirements.

Material is the core business module of Genstore, used to manage image, video, and other types of media files within the store.

Endpoints

POST /api/202412/material: Create Material

GET /api/202412/materials: search Material

Material Object

Material represent digital assets that merchants can upload to their store for various purposes including product images, marketing materials, documents, and brand assets.

Properties

materialobjectrequired
- Hide child properties
idstringrequired
Material id
durationstringrequired
Duration [for audio, video]
optimizeUrlstringrequired
Optimize Url
materialFileTypestringrequired
Material type 1: Image; File type 1: bmp, File type 2: png, File type 3: jpeg, File type 4: jpg, File type 5: gif, File type 24: svg, File type 25: webp, File type 26: heic, Material type 2: Audio; File type 6: mp3, File type 7: wma, File type 8: wav, File type 9: amr, File type 28: aac, Material type 3: Video; File type 10: mp4, File type 11: flv, File type 12: f4v, File type 13: webm, File type 14: avi, File type 27: mov, Material type 4: File; File type 15: doc, File type 16: docx, File type 18: xls, File type 19: xlsx, File type 20: ppt, File type 21: pptx, File type 22: pdf, File type 30: css, File type 31: rar, File type 32: rtf, File type 33: txt, File type 34: zip, File type 35: dotx, File type 36: json, File type 37: potx, File type 38: ppsx, File type 39: xmind,
sizestringrequired
Material size; Unit B.
coverImageUrlstringrequired
Cover URL
materialTypestringrequired
Material type: 1 image, 2 audio, 3 video, 4 files
titlestringrequired
Material title.
materialDetailExtsarrayrequired
Material extension attributes; For example: width, height [{"key": "width", "value": "675"}, {"key": "height", "value": "483"}]
+ Show child properties
urlstringrequired
Material url
introductionstringrequired
Material Description
bash
{
  "material": {
    "duration": "122",
    "optimizeUrl": "https://image-c-pioneer.weimobqa.com/qa-2TL/3d19b66355d04653a722cb3e116620f9.webp",
    "materialFileType": "1",
    "size": "1111",
    "coverImageUrl": "https://image-c-pioneer.weimobqa.com/qa-2TL/3d19b66355d04653a722cb3e116620f9.jpg",
    "materialType": "1",
    "id": "123",
    "title": "霸王十代",
    "materialDetailExts": [
      {
        "value": "",
        "key": ""
      }
    ],
    "url": "https://image-c-pioneer.weimobqa.com/qa-2TL/4022047364584/57051e41027b414b91a4dadfd3268d68.png",
    "introduction": "霸王十代"
  }
}

POST Create Material

Create Genstore store assets using an external URL.

Access scope

Requires ANY of the following access scopes: write_materials

Endpoint

POST /api/202412/material 

Request Params

materialobjectrequired
- Hide child properties
urlstringrequired
Material url
titlestringrequired
Material Title
sizenumberrequired
Material size; Unit B
durationnumber
Duration [for audio, video]
materialTypenumberrequired
Media Type (1--Image, 2--Audio, 3--Video, 4--File)
introductionstring
Description of the current asset, used to provide details about the file.
materialFileTypenumberrequired
Subclass classification under materialTypes-- Material type 1: Image; File type 1: bmp, File type 2: png, File type 3: jpeg, File type 4: jpg, File type 5: gif, File type 24: svg, File type 25: webp, File type 26: heic, Material type 2: Audio; File type 6: mp3, File type 7: wma, File type 8: wav, File type 9: amr, File type 28: aac, Material type 3: Video; File type 10: mp4, File type 11: flv, File type 12: f4v, File type 13: webm, File type 14: avi, File type 27: mov, Material type 4: File; File type 15: doc, File type 16: docx, File type 18: xls, File type 19: xlsx, File type 20: ppt, File type 21: pptx, File type 22: pdf, File type 30: css, File type 31: rar, File type 32: rtf, File type 33: txt, File type 34: zip, File type 35: dotx, File type 36: json, File type 37: potx, File type 38: ppsx, File type 39: xmind,

Response Data

materialobjectrequired
- Hide child properties
idnumberrequired
Material id
materialTypenumberrequired
Material type: 1 image, 2 audio, 3 video, 4 files
titlestringrequired
Material title.
urlstringrequired
Material url
sizenumberrequired
Material size; Unit B.
introductionstringrequired
Material Description
materialFileTypenumberrequired
Material type 1: Image; File type 1: bmp, File type 2: png, File type 3: jpeg, File type 4: jpg, File type 5: gif, File type 24: svg, File type 25: webp, File type 26: heic, Material type 2: Audio; File type 6: mp3, File type 7: wma, File type 8: wav, File type 9: amr, File type 28: aac, Material type 3: Video; File type 10: mp4, File type 11: flv, File type 12: f4v, File type 13: webm, File type 14: avi, File type 27: mov, Material type 4: File; File type 15: doc, File type 16: docx, File type 18: xls, File type 19: xlsx, File type 20: ppt, File type 21: pptx, File type 22: pdf, File type 30: css, File type 31: rar, File type 32: rtf, File type 33: txt, File type 34: zip, File type 35: dotx, File type 36: json, File type 37: potx, File type 38: ppsx, File type 39: xmind,
coverImageUrlstringrequired
Cover URL
materialDetailExtsarrayrequired
Material extension attributes; For example: width, height [{"key": "width", "value": "675"}, {"key": "height", "value": "483"}]
+ Show child properties
durationnumberrequired
Duration [for audio, video]
optimizeUrlstringrequired
Optimize Url
bash
curl -X POST \ 
https://{shop}.genmystore.com/api/202412/material" \ 
-H "X-Genstore-Access-Token: {access_token}" \ 
-H "Content-Type: application/json" \ 
-d '{
	"material":{
		"duration":"108",
		"materialFileType":"1",
		"size":"10245",
		"materialType":"1",
		"title":"Front view image of Apple Watch",
		"url":"https://image-c.genstoredev.com/qa-34K/4022109170826/a34555550e704aa8994cc44c9c375b58.jpg",
		"introduction":"Front view image of Apple Watch"
	}
}'
json
HTTP/1.1 200 OK
{
  "material": {
    "duration": "537",
    "optimizeUrl": "https://image-c-pioneer.weimobqa.com/qa-2TL/3d19b66355d04653a722cb3e116620f9.webp",
    "materialFileType": "1",
    "size": "4236498",
    "coverImageUrl": "https://image-c-pioneer.weimobqa.com/qa-2TL/3d19b66355d04653a722cb3e116620f9.jpg",
    "materialType": "1",
    "id": "11592",
    "title": "霸王十代",
    "materialDetailExts": [
      {
        "value": "128",
        "key": "with"
      }
    ],
    "url": "https://image-c-pioneer.weimobqa.com/qa-2TL/4022047364584/57051e41027b414b91a4dadfd3268d68.png",
    "introduction": "霸王十代"
  }
}

GET search Material

Pop up material list

Access scope

Requires ANY of the following access scopes: read_materials

Endpoint

GET /api/202412/materials 

Request Params

materialTypesarrayrequired
Material type, 1 image, 2 audio, 3 video, 4 file
materialFileTypearray
Subclass classification under materialTypes-- Material type 1: Image; File type 1: bmp, File type 2: png, File type 3: jpeg, File type 4: jpg, File type 5: gif, File type 24: svg, File type 25: webp, File type 26: heic, Material type 2: Audio; File type 6: mp3, File type 7: wma, File type 8: wav, File type 9: amr, File type 28: aac, Material type 3: Video; File type 10: mp4, File type 11: flv, File type 12: f4v, File type 13: webm, File type 14: avi, File type 27: mov, Material type 4: File; File type 15: doc, File type 16: docx, File type 18: xls, File type 19: xlsx, File type 20: ppt, File type 21: pptx, File type 22: pdf, File type 30: css, File type 31: rar, File type 32: rtf, File type 33: txt, File type 34: zip, File type 35: dotx, File type 36: json, File type 37: potx, File type 38: ppsx, File type 39: xmind,
keywordstring
Search keywords
sizenumber
Material size
sizeRangearray
Material size range
durationRangearray
Duration range [for audio and video]
durationnumber
Duration [for audio and video]
inListarray
Material ID list
pageTokennumberrequired
Current page
limitnumberrequired
Page size
sortListstring
Sort objects; Support joint sorting of multiple fields The string after the json string object urlEncode; The shape of jscode is as follows: encodeURIComponent("[{\"field\":\"title\",\"order\":1}]")

Response Data

materialsarrayrequired
Paginated data
- Hide child properties
idnumberrequired
material id
materialTypenumberrequired
Material type: 1 image, 2 audio, 3 video, 4 files
titlestring
material title
urlstringrequired
material url
sizenumberrequired
Material size; Unit B
durationnumber
Duration [for audio, video]
introductionstring
Material Description
materialFileTypenumberrequired
Material type 1: Image; File type 1: bmp, File type 2: png, File type 3: jpeg, File type 4: jpg, File type 5: gif, File type 24: svg, File type 25: webp, File type 26: heic, Material type 2: Audio; File type 6: mp3, File type 7: wma, File type 8: wav, File type 9: amr, File type 28: aac, Material type 3: Video; File type 10: mp4, File type 11: flv, File type 12: f4v, File type 13: webm, File type 14: avi, File type 27: mov, Material type 4: File; File type 15: doc, File type 16: docx, File type 18: xls, File type 19: xlsx, File type 20: ppt, File type 21: pptx, File type 22: pdf, File type 30: css, File type 31: rar, File type 32: rtf, File type 33: txt, File type 34: zip, File type 35: dotx, File type 36: json, File type 37: potx, File type 38: ppsx, File type 39: xmind,
coverImageUrlstring
Cover URL
materialDetailExtsarrayrequired
Material extension attributes; For example: width, height [{"key": "width", "value": "675"}, {"key": "height", "value": "483"}]
+ Show child properties
optimizeUrlstringrequired
Optimize Url
bash
curl -X GET \ 
https://{shop}.genmystore.com/api/202412/materials" \ 
-H "X-Genstore-Access-Token: {access_token}" \
json
HTTP/1.1 200 OK
{
  "materials": [
    {
      "duration": "537",
      "optimizeUrl": "https://image-c-pioneer.weimobqa.com/qa-2TL/3d19b66355d04653a722cb3e116620f9.webp",
      "materialFileType": "1",
      "size": "4236498",
      "coverImageUrl": "https://image-c-pioneer.weimobqa.com/qa-2TL/3d19b66355d04653a722cb3e116620f9.jpg",
      "materialType": "1",
      "id": "11592",
      "title": "霸王十代",
      "materialDetailExts": [
        {
          "value": "4236498",
          "key": "size"
        }
      ],
      "url": "https://image-c-pioneer.weimobqa.com/qa-2TL/4022047364584/57051e41027b414b91a4dadfd3268d68.png",
      "introduction": "霸王十代"
    }
  ]
}