Temu Taxonomy Download
Version | Date | Created / Updated | Notes |
---|---|---|---|
v1.0 | 20.02.2025 | Bogomil | First publish |
v1.1 | 18.03.2025 | Bogomil | Attribute changes |
Temu taxonomy can be obtained by first calling all the root categories and then we need to call each separate category id until we get to the leaf category. This ways we will be able to get all navigation paths and categories. Then we will have an extra step which will require us to call each separate leaf category in order to obtain the category attributes.
Get Categories
API Call : POST https://openapi-b-eu.temu.com/openapi/router
API Name: bg.local.goods.cats.get
Sample Request: Nothing is required
Sample Response:
{
"result": {
"goodsCatsList": [
{
"catId": 1,
"level": 1,
"catName": "CDs & Vinyl",
"catType": 1,
"leaf": false,
"expandCatType": 4,
"parentId": 0
},
{
"catId": 653,
"level": 1,
"catName": "Office Products",
"catType": 1,
"leaf": false,
"expandCatType": 1,
"parentId": 0
},
{
"catId": 1464,
"level": 1,
"catName": "Pet Supplies",
"catType": 1,
"leaf": false,
"expandCatType": 1,
"parentId": 0
},
{
"catId": 2096,
"level": 1,
"catName": "Appliances",
"catType": 1,
"leaf": false,
"expandCatType": 1,
"parentId": 0
}
]
},
"success": true,
"requestId": "eu-e2664a4c-b89a-48e0-9534-3c52f66f484c",
"errorCode": 1000000,
"errorMsg": ""
}
Get Category
Once we obtained the root categories we will be able to call each catId
until we reach a leaf category. Basically the logic will be for every root category we will have to call each catId
we are receiving in the response in order to obtain the full path and this need tobe done until we reach the leaf category ( "leaf": true
).
API Call : POST https://openapi-b-eu.temu.com/openapi/router
API Name: bg.local.goods.cats.get
Body: {parentCatId
}
Sample Body Request:
"parentCatId": "27187"
Sample Response:
{
"result": {
"goodsCatsList": [
{
"catId": 27188,
"level": 5,
"catName": "Polos",
"catType": 0,
"leaf": true,
"expandCatType": 0,
"parentId": 27187
},
{
"catId": 27189,
"level": 5,
"catName": "Hats",
"catType": 1,
"leaf": true,
"expandCatType": 1,
"parentId": 27187
},
{
"catId": 27190,
"level": 5,
"catName": "Other (Men)",
"catType": 0,
"leaf": true,
"expandCatType": 0,
"parentId": 27187
},
{
"catId": 27191,
"level": 5,
"catName": "Pants",
"catType": 0,
"leaf": true,
"expandCatType": 0,
"parentId": 27187
},
{
"catId": 27192,
"level": 5,
"catName": "Sweatshirts",
"catType": 0,
"leaf": true,
"expandCatType": 0,
"parentId": 27187
}
]
},
"success": true,
"requestId": "eu-9e7d2f25-b968-4292-84a1-8c0c2a488e3a",
"errorCode": 1000000,
"errorMsg": ""
}
Get Attributes
<v1.1>
Having all the categories and their paths we can not obtain the attributes for each leaf category. Here we want to call each leaf category ("leaf": true
) and call its catId
in order to retrieve the attributes.
The attributes are divided into:
- Attributes are divided into sales attributes and normal attributes, controlled by the
isSale
property. Attributes returningtrue
are considered sales attributes. -Sales attributes are used to create variants. For example, typical attributes likecolor
andsize
combine their specification values in a Cartesian product to form variants. -Normal attributes describe the product itself, providing more detailed information about the product's characteristics.
Sales attributes are further classified based on whether customization is allowed:
If the category allows user-defined attributes, inputMaxSpecNum > 0
is returned.
If the category only allows selecting predefined attributes, inputMaxSpecNum = 0
is returned. In this case, you should only select attributes marked with required = true
in the goodsSpecProperties
object, and pick a few values.
Both sales attributes and normal attributes need to be assembled and passed to the goodsProperty
parameter when making a request via the bg.local.goods.add
interface.
Custom Sales Attributes
- Custom attributes are allowed only when
inputMaxSpecNum > 0
. - In this case, you can choose a
parentSpec
fromuserInputParentSpecList
, and usebg.local.goods.spec.id.get
to generate specification values. These values will form variants, such as creating a custom specification value likecolor1
under thecolor
attribute. - Note: It’s possible for
inputMaxSpecNum > 0
andgoodsSpecProperties != []
to occur at the same time, which means the category allows both custom attributes and predefined attribute values. For example, a predefinedcolor
attribute might have options like['red', 'blue']
, and a custom attribute liketype
can also be added. You can combine these to create variants by selecting values from bothcolor
andtype
. - Note:
singleSpecValueNum
defines the maximum number of variants that can be created. bg.local.goods.spec.id.get
generates specification values, which should be passed as input parameters in theskuList[*].specIdList
field of thegoods.add
method.
Normal Attributes
controlType
defines how the attribute interacts with the user. The common control types are:
-INPUT(0, "Input Field")
-CHOOSE(1, "Selectable Option")
-INPUT_CHOOSE(3, "Both Input and Selectable")
-SINGLE_YMD_DATE(5, "Single Date Selector - Year, Month, Day")
-MULTIPLE_YMD_DATE(6, "Range Date Selector - Year, Month, Day")
-SINGLE_YM_DATE(7, "Single Date Selector - Year, Month")
-MULTIPLE_YM_DATE(8, "Range Date Selector - Year, Month")
-PROPERTY_CHOOSE_AND_INPUT(16, "Property Selection and Value Input")
- Parent-Child Attributes
Parent-child relationships are defined by the showType
field:
-showType = 0
: Parent attribute.
-showType = 1
: Child attribute.
-Child attributes appear based on the controlType
of the parent attribute. If controlType = 0
, showCondition
will indicate the conditions under which child attributes are triggered based on parent attribute values.
-If controlType
is 1
, 3
, or 16
, the templatePropertyValueParentList
will determine when child attributes are triggered.
For example, the "Fabric Weight 1 (g/m²)" attribute with controlType = 0
indicates that the value must be inputted. If required = true
, it must be provided. showType = 1
indicates it is a child attribute, and you should check the showCondition
to see if the parent attribute, identified by parentRefPid = 6926
, has selected one of the parentVids
values (e.g., parentVids = [161198]
). If the condition is met, the child attribute should be assembled according to controlType = 0
.
- Attributes with Units
Attributes that have units should include both valueUnitId
and valueUnit
when available in the valueUnitList
. These are typically used in combination with controlType = 0
.
</v1.1>
API Call : POST https://openapi-b-eu.temu.com/openapi/router
API Name: bg.local.goods.template.get
Body: {catId
}
Sample Request:
"catId": "27188"
Sample Response:
{
"result": {
"inputMaxSpecNum": 0,
"templateInfo": {
"goodsSpecProperties": [
{
"templatePropertyValueParentList": null,
"numberInputTitle": null,
"values": [
{
"vid": 32560,
"specId": 22028,
"subGroup": null,
"parentVids": null,
"brandId": null,
"additionalInfo": null,
"extendInfo": "(64,64,64,1)",
"value": "Deep Grey",
"group": {
"name": "Black Color Family",
"id": 3
}
}
],
"referenceType": null,
"pid": 13,
"templatePid": 259449,
"required": true,
"propertyValueType": 0,
"minValue": "",
"feature": 1,
"valueRule": null,
"propertyChooseTitle": null,
"showType": null,
"parentTemplatePid": null,
"mainSale": true,
"templateModuleId": 62552,
"parentSpecId": 1001,
"maxValue": "",
"chooseMaxNum": null,
"showCondition": null,
"valuePrecision": 0,
"controlType": 1,
"valueUnitList": null,
"name": "Color",
"isSale": true,
"refPid": 63
},
{
"templatePropertyValueParentList": null,
"numberInputTitle": null,
"values": [
{
"vid": 50452,
"specId": 51101017,
"subGroup": {
"name": "Alpha",
"id": 16
},
"parentVids": null,
"brandId": null,
"additionalInfo": null,
"extendInfo": "",
"value": "Asian XXXXL",
"group": {
"name": "Asian size",
"id": 20000
}
},
{
"vid": 55264,
"specId": 55797297,
"subGroup": {
"name": "Alpha",
"id": 16
},
"parentVids": null,
"brandId": null,
"additionalInfo": null,
"extendInfo": "",
"value": "Asian XXXXXL",
"group": {
"name": "Asian size",
"id": 20000
}
}
],
"referenceType": null,
"pid": 14,
"templatePid": 259510,
"required": true,
"propertyValueType": 0,
"minValue": "",
"feature": 2,
"valueRule": null,
"propertyChooseTitle": null,
"showType": null,
"parentTemplatePid": null,
"mainSale": false,
"templateModuleId": 62552,
"parentSpecId": 3001,
"maxValue": "",
"chooseMaxNum": null,
"showCondition": null,
"valuePrecision": 0,
"controlType": 1,
"valueUnitList": null,
"name": "Size",
"isSale": true,
"refPid": 65
}
],
"goodsProperties": [
{
"templatePropertyValueParentList": null,
"numberInputTitle": null,
"values": [
{
"vid": 291,
"specId": null,
"subGroup": null,
"parentVids": null,
"brandId": null,
"additionalInfo": null,
"extendInfo": null,
"value": "Long length",
"group": null
},
{
"vid": 632,
"specId": null,
"subGroup": null,
"parentVids": null,
"brandId": null,
"additionalInfo": null,
"extendInfo": null,
"value": "Three quarter",
"group": null
},
{
"vid": 633,
"specId": null,
"subGroup": null,
"parentVids": null,
"brandId": null,
"additionalInfo": null,
"extendInfo": null,
"value": "Cropped",
"group": null
}
],
"referenceType": null,
"pid": 12,
"templatePid": 259440,
"required": false,
"propertyValueType": 0,
"minValue": "",
"feature": 0,
"valueRule": 0,
"propertyChooseTitle": null,
"showType": 0,
"parentTemplatePid": 0,
"mainSale": null,
"templateModuleId": 62551,
"parentSpecId": null,
"maxValue": "",
"chooseMaxNum": 1,
"showCondition": null,
"valuePrecision": 0,
"controlType": 1,
"valueUnitList": null,
"name": "Length",
"isSale": false,
"refPid": 28
},
{
"templatePropertyValueParentList": null,
"numberInputTitle": null,
"values": [
{
"vid": 550,
"specId": null,
"subGroup": null,
"parentVids": null,
"brandId": null,
"additionalInfo": null,
"extendInfo": null,
"value": "Yes",
"group": null
},
{
"vid": 551,
"specId": null,
"subGroup": null,
"parentVids": null,
"brandId": null,
"additionalInfo": null,
"extendInfo": null,
"value": "No",
"group": null
}
],
"referenceType": null,
"pid": 19,
"templatePid": 259445,
"required": false,
"propertyValueType": 0,
"minValue": "",
"feature": 0,
"valueRule": 0,
"propertyChooseTitle": null,
"showType": 0,
"parentTemplatePid": 0,
"mainSale": null,
"templateModuleId": 62551,
"parentSpecId": null,
"maxValue": "",
"chooseMaxNum": 1,
"showCondition": null,
"valuePrecision": 0,
"controlType": 1,
"valueUnitList": null,
"name": "Belt",
"isSale": false,
"refPid": 74
},
{
"singleSpecValueNum": 500,
"userInputParentSpecList": [
{
"parentSpecName": "Style",
"feature": null,
"parentSpecId": 18012
},
{
"parentSpecName": "Material",
"feature": null,
"parentSpecId": 17017
},
{
"parentSpecName": "Flavors",
"feature": null,
"parentSpecId": 18013
},
{
"parentSpecName": "Applicable People",
"feature": null,
"parentSpecId": 17018
},
{
"parentSpecName": "Capacity",
"feature": null,
"parentSpecId": 18014
},
{
"parentSpecName": "Composition",
"feature": null,
"parentSpecId": 17019
},
{
"parentSpecName": "Weight",
"feature": null,
"parentSpecId": 18016
},
{
"parentSpecName": "Items",
"feature": null,
"parentSpecId": 17020
},
{
"parentSpecName": "Quantity",
"feature": null,
"parentSpecId": 15998553
},
{
"parentSpecName": "Model",
"feature": null,
"parentSpecId": 45114199
},
{
"parentSpecName": "Hair Length",
"feature": null,
"parentSpecId": 44214483
}
]
},
"success": true,
"requestId": "eu-a84a8665-268a-488e-a38d-478ed33d64bd",
"errorCode": 1000000,
"errorMsg": ""
}
Taxonomy Export
In order to generate the taxonomy file we will need to create a new record in Taxonomy export with: Marketplace = Temu Status = pending Category for Export = “all” (or we can specify which exact categories) Email = email to which the file will be send
We want to have a logic and if the user has selected 5 or more categories for export, we want to export them in a single zip file. This will be valid also if all categories are being exported.
We want the name of the file to consist of CategoryID+Category name and it should be in a format TemuCategoryID_CategoryName.csv
Please find example file structure how it should look like after exported.
CategoryID (catId) | Category Name (catName) | Is Leaf (leaf) | Navigation Path (Generated) | Item Specifics (name) | Is Variation Specific? <v1.1>(Yes if we have isSale = true)</v1.1> | Required (Required) | Enumeration (Yes if we have values) | Values (value) | ||
---|---|---|---|---|---|---|---|---|---|---|
24256 | Earbud Headphones | Yes | Cell Phones & Accessories>Accessories>Headphones>Earbud Headphones | Battery Properties | No | Yes | Yes | Rechargeable Battery | Non-rechargeable Battery | Solar Battery |
24256 | Earbud Headphones | Yes | Cell Phones & Accessories>Accessories>Headphones>Earbud Headphones | Rechargeable Battery | No | Yes | Yes | Lithium Battery-Polymer | Lithium Battery-Button Battery | |
24256 | Earbud Headphones | Yes | Cell Phones & Accessories>Accessories>Headphones>Earbud Headphones | |||||||
24256 | Earbud Headphones | Yes | Cell Phones & Accessories>Accessories>Headphones>Earbud Headphones | |||||||
24256 | Earbud Headphones | Yes | Cell Phones & Accessories>Accessories>Headphones>Earbud Headphones |