Marketplaces / Shein / Shein Product Management / Shein Get Products

Shein Get Products

Version Date Created / Updated Notes
v1.0 17.06.2024 Bogomil and Hristiyan First publish

Since all product updates on Shein are per Product Account > Channel Item Id (Shein Id) we will have to make sure if the products are already created on the marketplace to download the Shein Ids. If the product in Hemi is with statuses Product Account > Listing Status = Inactive and Product Account > Product status = Awaiting Creation we want to first check if the product already exist on Shein and try to obtain the ids using the Get Products API.

Get Products

We have to check each product one by one in order to see if the product is created or not thus our starting point will be our default listing statuses Product Account > Listing Status = Inactive and Product Account > Product status = Awaiting Creation and if we set Product Account > List/Update the whole Item = Pending we will try to obtain the Shein product Ids. Please note Get Products should not be checking for any flags (closed, protect whole item etc)! If the product exist we will store the Shien Ids and update the product based on the abstraction - Product Listing general requirements If the product does not exist we want to mark it for creation Product Account > Listing Status = Inactive and Product Account > Product status = Product not created

We need to call two API calls in order to find out if the products we are looking for are created. With the first call we get all shein products and their own SKUs (called skuCode) and then we need to call each skuCode to get detailed information about the product.

The first call is :

API Call: POST /open-api/openapi-business-backend/product/query API Docs:https://open.sheincorp.com/documents/apidoc/detail/3000102-1000001

Request example :

{
    "pageNum": 1, "pageSize": 50
}

Request Mapping:

Shein Field Hemi Field Comment
pageNum used to navigate through pages if we receive "info": { "data": null } that means there are no more pages
pageSize 50 Hardcoded as “50”

Sample Response:

{
    "code": "0",
    "msg": "OK",
    "info": {
        "data": [
            {
                "skcName": "sMM24020556975769",
                "skuCodeList": [
                    "I11g46kx1tm9"
                ],
                "spuName": "MM2402055697"
            },
            {
                "skcName": "sMM24022344403001",
                "skuCodeList": [
                    "I1omh30jb5ld"
                ],
                "spuName": "MM2402234440"
            },
            {
                "skcName": "sMM24022344400216",
                "skuCodeList": [
                    "I1omh30k7emi"
                ],
                "spuName": "MM2402234440"
            },
            {
                "skcName": "sMM24022344400422",
                "skuCodeList": [
                    "I1omh30l1grc"
                ],
                "spuName": "MM2402234440"
            },
            {
                "skcName": "sMM24022344402773",
                "skuCodeList": [
                    "I1omh30lw9se"
                ],
                "spuName": "MM2402234440"
            },
            {
                "skcName": "sm24051725654159",
                "skuCodeList": [
                    "I43negs7kz5l"
                ],
                "spuName": "m2405172565"
            },
            {
                "skcName": "sm24051725652765",
                "skuCodeList": [
                    "I63dv4eq7u8z"
                ],
                "spuName": "m2405172565"
            },
            {
                "skcName": "scd24060699789897",
                "skuCodeList": [
                    "I643hcuqb3r7"
                ],
                "spuName": "cd2406069978"
            },
            {
                "skcName": "scd24060697272787",
                "skuCodeList": [
                    "I643hcuqnrpt",
                    "I643hcuqnbws"
                ],
                "spuName": "cd2406069727"
            },
            {
                "skcName": "scd24060633211091",
                "skuCodeList": [
                    "I643hcvar0xi",
                    "I643hcvaql17"
                ],
                "spuName": "cd2406063321"
            },
            {
                "skcName": "scd24060633219979",
                "skuCodeList": [
                    "I643hcvasfir",
                    "I643hcvas0id",
                    "I643hcvasv8j"
                ],
                "spuName": "cd2406063321"
            },
            {
                "skcName": "scd24060670679099",
                "skuCodeList": [
                    "I643hcvb1kdt"
                ],
                "spuName": "cd2406067067"
            },
            {
                "skcName": "scd24060653978428",
                "skuCodeList": [
                    "I84bk9nx30p1"
                ],
                "spuName": "cd2406065397"
            },
            {
                "skcName": "scd24060653975277",
                "skuCodeList": [
                    "I84bk9nx4721",
                    "I84bk9nx4p8a"
                ],
                "spuName": "cd2406065397"
            },
            {
                "skcName": "scd24060653979777",
                "skuCodeList": [
                    "I84bk9nx5qeb",
                    "I84bk9nx65y2",
                    "I84bk9nx6o7q"
                ],
                "spuName": "cd2406065397"
            },
            {
                "skcName": "scd24060653975275",
                "skuCodeList": [
                    "I84bk9nx7nqq"
                ],
                "spuName": "cd2406065397"
            },
            {
                "skcName": "scd24060622409006",
                "skuCodeList": [
                    "I84bnddiuo62"
                ],
                "spuName": "cd2406062240"
            },
            {
                "skcName": "scd24060695179778",
                "skuCodeList": [
                    "I84bnddny87o"
                ],
                "spuName": "cd2406069517"
            },
            {
                "skcName": "scd24060695172072",
                "skuCodeList": [
                    "I84bnddnz72z"
                ],
                "spuName": "cd2406069517"
            },
            {
                "skcName": "scd24060653588315",
                "skuCodeList": [
                    "I84bnddzdyoh"
                ],
                "spuName": "cd2406065358"
            },
            {
                "skcName": "scd24060680868836",
                "skuCodeList": [
                    "I84bndead3mz",
                    "I84bndeacp1c",
                    "I84bndea9l09",
                    "I84bndea95b1",
                    "I84bndeaa3i7",
                    "I84bndeabfnn",
                    "I84bndeab069",
                    "I84bndeac9gr",
                    "I84bndeabuc7",
                    "I84bndeaaki6"
                ],
                "spuName": "cd2406068086"
            },
            {
                "skcName": "scd24060602808792",
                "skuCodeList": [
                    "I84bndekr0i1",
                    "I84bndekqjj0",
                    "I84bndekrfw1",
                    "I84bndekq29u",
                    "I84bndekrw7g"
                ],
                "spuName": "cd2406060280"
            },
            {
                "skcName": "scd24060684303081",
                "skuCodeList": [
                    "I84bndguejfr",
                    "I84bndguckvv",
                    "I84bndgud41w",
                    "I84bndgudnhf",
                    "I84bndgue3qv"
                ],
                "spuName": "cd2406068430"
            }
        ]
    }
}

Response Mapping:

Shein Code Hemi Field Comment
code
msg
info
data N/A
skcName N/A
skuCodeList N/A Will be used for the query product detail call
spuName N/A

Sample Empty Response:

{
    "code": "0",
    "msg": "OK",
    "info": {
        "data": null
    }
}

If we have an empty response this means there is no match and the products we are looking for are not created in Shein. Once we have this response we need to prepare the product for creation as per the listing abstraction Product Listing general requirements

Sample Error Response:

{
    "msg": "签名错误",
    "code": "-1"
}

Any errors we want to display in the terminal and log.

If we have a response with products we need the skuCodes to then make a second call which will get detailed information about the sku.

API Call: POST /open-api/openapi-business-backend/product/full-detail API Docs: https://open.sheincorp.com/documents/apidoc/detail/3000197-1000001

Request example :

curl --location --request POST 'https://openapi-test01.sheincorp.cn/open-api/openapi-business-backend/product/full-detail' \
--header 'x-lt-signature: test0N2M2M2YyOGYxOTFjOTlhZTk1ZGJmZWEwY2VkNDA3NzM5MzgwNDVkNGMzODhhOTZlOTU1MWM3MWU5MTA4NzI2Mg==' \
--header 'x-lt-openKeyId: 6DF5F597AEF84494B42388C63F4632B3' \
--header 'x-lt-timestamp: 1692620638880' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{
    "skuCodes": [
        "I967uum2xi2q"
    ],
    "language": "en"
}'

Please note we can include up to 100 skuCodes in the request body.

Example response :

{
    "code": "0",
    "msg": "OK",
    "info": [{
        "spuName": "w2301056886",
        "categoryId": 2233,
        "categoryName": "大码毛衣半身裙",
        "skuDimensionsInfo": {
            "length": "12.00",
            "width": "12.00",
            "weight": "12",
            "height": "12.00"
        },
        "isSaleAttribute": 1,
        "productNumber": "123",
        "productTypeId": 1031,
        "skcName": "sw23010568863917",
        "skcCode": "O07f497x809b",
        "brandCode": "",
        "productName": {
            "language": "zh-cn",
            "productName": "商品测试详情图0626"
        },
        "goodsInventory": {
            "inventoryQuantity": 0,
            "lockedQuantity": 0,
            "tempLockQuantity": 0,
            "sellerSku": "2717803576517155638",
            "usableInventory": 0,
            "skuCode": "I07f497xa731",
            "warehouseInventoryList": []
        },
        "shelfDetails": null,
        "productDesc": {
            "productDesc": "",
            "language": "zh-cn"
        },
        "currentPrices": [{
            "productCode": "I07f497xa731",
            "site": "shein-www",
            "shopPrice": 12.00,
            "currency": "USD",
            "terminal": null,
            "specialPrice": 12.00,
            "specialPriceStart": null,
            "salePrice": 12.00,
            "specialPriceEnd": null,
            "suggestedRetailPrice": null,
            "multiCurrencyCostList": [{
                "cost": 12.00,
                "currency": "CNY"
            }]
        }],
        "sellerSku": "",
        "imageList": [{
            "imageItemId": 4177814,
            "groupCode": "G3ck0j5himvq",
            "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/01/05/1672915851294102400.jpeg",
            "imageMediumUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/01/05/1672915851294102400_thumbnail_405x552.jpeg",
            "sort": 1,
            "imageSmallUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/01/05/1672915851294102400_thumbnail_220x293.jpeg",
            "imageType": "MAIN"
        }, {
            "imageItemId": 2147510583,
            "groupCode": "G3ck0j5himvq",
            "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/26/16877583224104183094.jpg",
            "imageMediumUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/26/16877583224104183094_thumbnail_405x552.jpg",
            "sort": 2,
            "imageSmallUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/26/16877583224104183094_thumbnail_220x293.jpg",
            "imageType": "DETAIL"
        }, {
            "imageItemId": 4177815,
            "groupCode": "G3ck0j5himvq",
            "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/01/05/16729158581743044934.jpeg",
            "imageMediumUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/01/05/16729158581743044934_thumbnail_405x552.jpeg",
            "sort": 3,
            "imageSmallUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/01/05/16729158581743044934_thumbnail_220x293.jpeg",
            "imageType": "SQUARE"
        }, {
            "imageItemId": 4177816,
            "groupCode": "G3ck0j5himvq",
            "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/01/05/16729158633401920931.jpeg",
            "imageMediumUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/01/05/16729158633401920931_thumbnail_405x552.jpeg",
            "sort": 4,
            "imageSmallUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/01/05/16729158633401920931_thumbnail_220x293.jpeg",
            "imageType": "PIECE"
        }],
        "skuCode": "I07f497xa731",
        "attributeLists": [{
            "attributeValueMulti": {
                "attributeValueMulti": "否",
                "language": "zh-cn"
            },
            "attributeAdditionList": [],
            "attributeId": 9,
            "attributeMulti": {
                "attributeMulti": "腰带修改属性名",
                "language": "zh-cn"
            },
            "attributeType": 4,
            "attributeValueId": 459
        }, {
            "attributeValueMulti": {
                "attributeValueMulti": "雨靴",
                "language": "zh-cn"
            },
            "attributeAdditionList": [],
            "attributeId": 1000455,
            "attributeMulti": {
                "attributeMulti": "关务种类",
                "language": "zh-cn"
            },
            "attributeType": 4,
            "attributeValueId": 1002593
        }],
        "saleAttribute": {
            "attributeValueMulti": {
                "attributeValueMulti": "S",
                "language": "zh-cn"
            },
            "attributeId": 87,
            "attributeMulti": {
                "attributeMulti": "尺寸",
                "language": "zh-cn"
            },
            "attributeValueId": 568
        },
        "skuAttributeLists": [{
            "attributeValueMulti": {
                "attributeValueMulti": "高腰",
                "language": "zh-cn"
            },
            "attributeId": 1000253,
            "attributeMulti": {
                "attributeMulti": "腰高",
                "language": "zh-cn"
            },
            "attributeValueId": 1001537
        }],
        "stopPurchase": 1,
        "mallStateList": [{
            "mallState": 1
        }],
        "siteDetailImageInfoList": [{
            "imageGroupCode": "G4101b6x0x2q",
            "imageInfoList": [{
                "imageItemId": 1147525967,
                "imageSort": 1,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/16878497173382906927.jpg"
            }, {
                "imageItemId": 1147525968,
                "imageSort": 2,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/1687849716132016602.jpg"
            }, {
                "imageItemId": 1147525969,
                "imageSort": 3,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/16878497172100198531.jpg"
            }, {
                "imageItemId": 1147525972,
                "imageSort": 4,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/16878497171538544330.jpg"
            }, {
                "imageItemId": 1147525970,
                "imageSort": 5,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/168784971786427267.jpg"
            }, {
                "imageItemId": 1147525973,
                "imageSort": 6,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/16878497172692858196.jpg"
            }, {
                "imageItemId": 1147525971,
                "imageSort": 7,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/16878497171257169109.jpg"
            }, {
                "imageItemId": 1147525974,
                "imageSort": 8,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/1687849717267425053.jpg"
            }, {
                "imageItemId": 1147525966,
                "imageSort": 9,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/16878497172530412707.jpg"
            }, {
                "imageItemId": 1147525975,
                "imageSort": 10,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/16878497181300119333.jpg"
            }],
            "siteList": [{
                "channel": "",
                "mainSite": "rw",
                "site": "rw-fr"
            }]
        }, {
            "imageGroupCode": "G1gn3ar0kuri",
            "imageInfoList": [{
                "imageItemId": 1147525978,
                "imageSort": 1,
                "imageUrl": "http://imgdeal-test01.shein.com/images3_pi/2023/06/27/16878503612266741411.jpg"
            }],
            "siteList": [{
                "channel": "",
                "mainSite": "shein",
                "site": "shein-roe"
            }, {
                "channel": "",
                "mainSite": "shein",
                "site": "shein-euqs"
            }, {
                "channel": "",
                "mainSite": "shein",
                "site": "shein-uk"
            }, {
                "channel": "",
                "mainSite": "shein",
                "site": "shein-ca"
            }, {
                "channel": "",
                "mainSite": "shein",
                "site": "shein-ma"
            }]
        }],
        "proofOfStockList": null,
        "sampleInfo": {
            "reserveSampleFlag": 0,
            "sampleCode": "",
            "spotFlag": 0,
            "sampleJudgeType": 2
        },
        "competingProductLink": null
    }]
}

From the response we need to map the goodsInventory > sellerSku with Product > SKU and if we find a match, we need to store the goodsInventory > skuCode for the relevant sku into Product Account > ChannelItemID , store spuName into Product Account Shein > SPU and store skcName into Product Account Shein > SKC (new field) . Nothing else needs to be mapped/stored from the response.

We also need to put the correct statuses of the product as per the Product Listing general requirements abstraction.

We don’t expect it, but if we by any chance receive an error we want to store it in the terminal and log.

Is this article helpful?
0 0 0