openAPI

Get new product information based on material

Description

According to the product ID and the material replacement information returned in the viewer, get the detailed information of the product that belongs to you. If the product does not belong to you, no data will be returned.
Product information can be edited on the product details page of the merchant backend

API

POST  https://openapi.kujiale.com/v2/commodity/viewer/detail
Content-Type: application/json;x-qh-id: null;

Participate

Request Body

{
	"replaceConfigList":[
		{
			"newMaterialId":"",
			"srcMaterialId":""
		}
	],
	"obsBrandGoodId":""
}

Request body parameter description:

parameterrequired option or notParameter TypeParameter Description
obsBrandGoodIdnostringOriginal product Id(current viewer id)
replaceConfigListnolist&objectnull
replaceConfigList.srcMaterialIdnostringpart id
replaceConfigList.newMaterialIdnostringmaterial id

response

data structure

{
	"d":{
		"imgs":"",
		"customerTexture":"",
		"brandGoodName":"",
		"brandName":"",
		"currencyPrices":[
			{
				"currencyId":"",
				"price":0
			}
		],
		"description":"",
		"obsSeriesTagId":"",
		"productNumber":"",
		"customTags":[
			{
				"name":"",
				"obsKeyId":"",
				"obsTagId":""
			}
		],
		"buyLink":"",
		"brandGoodCode":"",
		"seriesTagName":"",
		"obsBrandId":"",
		"dimensions":""
	},
	"c":""
}

Field description

parameterrequired option or notParameter TypeParameter Description
cnostringnull
dnoobjectnull
d.descriptionnostringsize
d.dimensionsnostringdescription
d.customTagsnolist&objectCommodity label
d.customTags.obsTagIdYesstringlabel id
d.customTags.obsKeyIdYesstringLabel class Id
d.customTags.nameisstringLabel name
d.obsBrandIdNostringbrand id
d.brandGoodNameNostringproduct name
d.brandNameNostringbrand name
d.productNumberNostringModel
d.seriesTagNameNostringSeries name
d.brandGoodCodeNostringProduct Code
d.imgsNostringPhysical image (divided by',')
d.buyLinkNostringBuy Link
d.obsSeriesTagIdNostringSeries id
d.customerTextureNostringMaterial
d.currencyPricesNolist&objectMulti-currency
d.currencyPrices.priceYesnumberCurrent currency price
d.currencyPrices.currencyIdYesstringCurrency Id

Get product viewer status in bulk

Description

The rendering status of the viewer generated by the corresponding brandgood will be obtained according to the total account information of the authenticated merchant and the brandgoodid information entered in the body.
If the brandgood does not belong to this user (including sub-accounts), the returned object of the corresponding brandgoodid will not appear in the returned d.list list.
If the brandgood does not generate a viewer, the returned object of the corresponding brandgoodid will not appear in the returned d.list list.

API

POST https://openapi.kujiale.com/v2/commodity/viewer/status
Content-Type: application/json;

Entry

Request Body

The number of obsbgid should not be more than 50

[
"3FO4KKRRWIXR"
]

Request body parameter description:
Join the list of brandgoodid

Response

data structure

{
"d":[
{
"obsBrandGoodId":"3FO4KKRRWIXR",
"status":0
}
],
"c":""
}

Field Description

ParameterDo you need toParameter typeParameter description
dNolist&objectReturned products generate viewer status object list
d.statusNonumberCorresponding viewer generation status, please refer to appendix 1 for status enumeration
d.obsBrandGoodIdNostringBrandgoodid of the entry

Appendix

Appendix 1: Viewer Status Enumeration

statusChinese progress
5Successful rendering
6Rendering failed
0Building

Get product details

Description

According to the product ID to obtain the detailed information of the product under the account system, if the product does not belong to the current account system, no data will be returned. Product information can be edited on the product details page of the merchant backend

API

GET  https://openapi.kujiale.com/v2/commodity/detail

Entry

URL Query Param

ParameterIs it necessaryParameter typeParameter description
obsbgidyesstringProductID

Response

data structure

{
    “d”:{
        “customerTexture”:“”,
        “imgs”:“”,
        “brandGoodName”:“”,
        “brandName”:“”,
        “currencyPrices”:[
            {
                “currencyId”:“”,
                “price”:0
            }
        ],
        “description”:“”,
        “obsSeriesTagId”:“”,
        “productNumber”:“”,
        “customTags”:[
            {
                “name”:“”,
                “obsKeyId”:“”,
                “obsTagId”:“”
            }
        ],
        “buyLink”:“”,
        “brandGoodCode”:“”,
        “seriesTagName”:“”,
        “obsBrandId”:“”,
        “dimensions”:“”
    },
    “c”:“”
}

Field Description

ParameterIs it necessaryParameter typeParameter description
dnolist&objectThe returned products generate a list of viewer state objects
d.statusnonumberCorresponding viewer generation status, please refer to appendix 1 for status enumeration
d.obsBrandGoodIdnostringBrandgoodid of the parameter
d.publishednobooleanWhether it’s published or not, the unlisted products will not be displayed on the external page
cnostringerror code
dnoobjectReturned data object
d.dimensionsnostringsize
d.descriptionnostringdescription
d.brandGoodNamenostringproduct name
d.brandNamenostringbrand name
d.obsBrandIdnostringBrand id
d.seriesTagNamenostringSeries name
d.obsSeriesTagIdnostringSeries id
d.productNumbernostringmodel
d.brandGoodCodenostringproduct code
d.customerTexturenostringmaterial
d.currencyPricesnolist&objectMulti-currency
d.currencyPrices.pricenonumberCurrent currency price
d.currencyPrices.currencyIdnostringCurrency Id
d.buyLinknostringPurchase link
d.customTagsnolist&objectCommodity label
d.customTags.obsTagIdyesstringTag id
d.customTags.obsKeyIdyesstringTag class Id
d.customTags.nameyesstringLabel name
d.imgsnostringPhysical map (use ’,’ to separate)

Send 3DViewer rendering request

Description

Initiate 3dviewer request by product id
The request will be intercepted in the following situations

  1. The product creation time is before June 30, 2017
  2. The product is not a model
  3. The product has been deleted
  4. The product has not been rendered
  5. The product has already generated 3DViewer resources

If the product meets the above conditions, it will be placed in failed.
Failure to send a request will also be included in failed.

API

POST  https://openapi.kujiale.com/v2/commodity/viewer/render/tasks
Content-Type: application/json;

Entry

Request Body

{
	"obsBgIds":[
		""
	]
}

Request body parameter description:

ParameterIs it necessaryParameter typeParameter description
obsBgIdsyeslist&stringproduct id and list

Response

data structure

{
	"d":{
		"estimatedTime":0,
		"failed":[
			{
				"reason":[
					""
				],
				"brandGoodName":"",
				"obsBrandGoodId":"",
				"previewImg":""
			}
		],
		"pass":[
			{
				"obsBrandGoodId":"",
				"brandGoodName":"",
				"previewImg":""
			}
		],
		"pending":""
	},
	"c":""
}

Field Description

ParameterIs it necessaryParameter typeParameter description
dnoobjectnull
d.passnolist&objectSend success list
d.pass.obsBrandGoodIdnostringproduct Id
d.pass.brandGoodNamenostringproduct name
d.pass.previewImgnostringPreview image of the product
d.failednolist&objectSend failure list
d.failed.reasonnolist&stringReason for failure
d.failed.brandGoodNamenostringproduct name
d.failed.obsBrandGoodIdnostringproduct Id
d.failed.previewImgnostringPreview image of the product
d.estimatedTimenonumberEstimated queuing time (hours)
d.pendingnobooleanWhether to queue
cnostringnull

Kooviewer Search for Goods

Description

Product search api dedicated to Kooviewer business

API

POST https://openapi.kujiale.com/v2/modelviewer/commodity/search

Entry

Request Body

{
	"q":"string",
	"code":"string",
	"lastModifiedStart":"",
	"num":"",
	"start":"",
	"catGroup":"",
	"lastModifiedEnd":""
}

Request body parameter description:

ParameterIs it necessaryParameter typeParameter description
catGroupyesintThe industry to which the product belongs.
startnointThe offset of the pull list, starting from 0.
numnointThe upper limit of the number of pulls at one time. Considering data security and performance, the maximum value of num is limited to 50. If you need to pull more data, please initiate multiple requests. If the amount of remaining data is less than num, all remaining data will be returned. For example, start=0&num=10 means to pull the 1st to 10th data, start=10&num=10 means to pull the 11th to 20th data.
qnostringThe query term will be used to fuzzy match the product name.
codenostringCommodity code is an identification field set by merchants for commodities under their own account system.
lastModifiedStartnolongThe starting value in the time range of the most recent product update, accurate to milliseconds. The default is to start from the beginning of the product creation.
lastModifiedEndnolongThe end value in the time range of the most recent product update, accurate to milliseconds. The default is the current time.

Response

data structure

{
	"d":{
		"count":0,
		"hasMore":"",
		"result":[
			{
				"brandName":"酷家乐",
				"code":"12222",
				"created":0,
				"customTexture":"百叶按",
				"description":"经典级白叶桉面板,咖啡色金属支腿",
				"type":"软装",
				"imgUrl":"http://qhyxpic.oss.kujiale.com/rbet/2014/12/26/NUBRME6W7JALJTGFEY4BQXYO_240x240.jpg",
				"size":{
					"x":0,
					"y":0,
					"z":0
				},
				"name":"塔罗斯餐桌-180-90-k009",
				"subType":0,
				"id":"3FO4K4WE71VB",
				"lastModified":0,
				"brandLogo":"http://qhyxpic.oss.kujiale.com/rbet/2014/12/26/NUBRME6W7JALJTGFEY4BQXYO_240x240.jpg",
				"largeImgUrl":"http://qhyxpic.oss.kujiale.com/rbet/2014/12/26/NUBRMG6W7JALJTGFEY4BQXYO_800x800.jpg"
			}
		],
		"totalCount":0
	},
	"m":"",
	"c":"0"
}

Field Description

ParameterIs it necessaryParameter typeParameter description
cnostringnull
mnostringnull
dnoobjectnull
d.totalCountnonumbernull
d.countnonumbernull
d.hasMorenobooleannull
d.resultnolist&objectnull
d.result.idyesstringProduct ID
d.result.nameyesstringProduct name
d.result.descriptionnostringproduct description
d.result.typeyesstring
Commodity type, the optional values ​​are "hard outfit" and "soft outfit". When in doubt or inaccurate about this value, the more detailed subType shall prevail
d.result.subTypeyesnumberFor a more detailed classification of commodity types, see the enumeration in the appendix
d.result.sizenoobject
Product size, the size information is only available when the subType of the product is 1. x, y, z represent the length, width, and height of the product
d.result.size.xnonumbernull
d.result.size.ynonumbernull
d.result.size.znonumbernull
d.result.largeImgUrlnostringThe URL of the product preview image
d.result.imgUrlyesstringProduct preview URL.
d.result.brandNamenostringCommodity brand name.
d.result.brandLogonostringThe URL of the product brand logo image
d.result.customTexturenostring
product quality
d.result.codenostringCommodity code is an identification field set by merchants for commodities under their own account system
d.result.creatednonumber
Creation timestamp
d.result.lastModifiednonumberLast modified timestamp

error code

codenamedescription
21610000Server ErrorServer Error

appendix

catGroup enumeration value

Valuemeaning
1Model library
2Post Gallery
3Pave
4Lines/wall panels
5Cabinet tools
6Wardrobe tools

subType enumeration value

valuemeaning
1model
3hard outfit
4Gusset
5Skirting
8Hardware
9Parametric model
10Brick
11Wave line
12Floor tile style
13Integrated wall panel
14Parametric lines
15Parametric combination model
16Combination model
17contour line
18Waterjet parquet
19No physical model

Kooviewer obtains product replaceable materials

Description

Obtain product information about replaceable materials

API

GET https://openapi.kujiale.com/v2/modelviewer/commodity/replace

Entry

Query Param

ParameterIs it necessaryParameter typeParameter description
brandgoodidyesstringCommodity id, only supports model type commodities

Request Body

{
	"d":[
		{
			"replaceDetailList":[
				{
					"materialId":"",
					"name":"",
					"srcImage":""
				}
			],
			"defualtReplaceInfo":{
				"materialId":"",
				"name":"",
				"srcImage":""
			},
			"componentName":"凳面"
		}
	],
	"m":"",
	"c":"0"
}

Field Description

ParameterIs it necessaryParameter typeParameter description
cnostringnull
mnostringnull
dnolist&objectnull
d.defualtReplaceInfonoobjectdefualtReplaceInfo
d.defualtReplaceInfo.srcImagenostringimage
d.defualtReplaceInfo.materialIdnostringnull
d.defualtReplaceInfo.namenostringname
d.replaceDetailListnolist&objectnull
d.replaceDetailList.srcImagenostringreplace image
d.replaceDetailList.materialIdnostringnull
d.replaceDetailList.namenostringnull
d.componentNameyesstringnull

error code

codenamedescription
21610000Server ErrorServer Error