根据特定的车辆和品牌获取相关的产品

现在我们需要根据特定的车辆和品牌搜索关联的产品。我们想知道车辆为Audi A4 Allroad 2.0 TFSI Quattro (carId: 30990) 并且品牌为Bosch (brandId: 40) 的所有产品的信息。Bosch的brandId可以通过 getAmBrands 获取。

在这个案例中我们需要请求两个接口。 getArticleIdsWithStategetAssignedArticlesByIds6 第一个接口可以获取基本的信息,使用这些信息,通过第二个接口可以获取详细信息。

我们需要在 getArticleIdsWithState 请求的参数中填写brandIdbrandNocarIdlinkingTargetId。在这里,有些变量的名称根据方法可能会有些不同。在这个示例中carIdlinkingTargetId,但是在其他的请求中linkingTargetId可以为商用车或者发动机等其他的变量。

getArticleIdsWithState

JSON Input

{
  "getArticleIdsWithState": {
    "articleCountry": "CN",
    "brandNo": {
      "array": [
        5
      ]
    },
    "lang": "EN",
    "linkingTargetId": 30990,
    "linkingTargetType": "P",
    "provider": "Your provider ID",
    "sort": 1
  }
}

JSON Output

{
    "data": {
        "array": [{
                "articleId": 7679068,
                "articleLinkId": 7679535,
                "articleNo": "7.24807.29.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 387,
                "genericArticleName": "Vacuum Pump, brake system",
                "sortNo": 7679535
            },
            {
                "articleId": 7614723,
                "articleLinkId": 7615954,
                "articleNo": "7.00470.07.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 761,
                "genericArticleName": "Boost Pressure Control Valve",
                "sortNo": 7615954
            },
            {
                "articleId": 7620551,
                "articleLinkId": 7620887,
                "articleNo": "7.02074.90.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 999,
                "genericArticleName": "Water Pump, parking heater",
                "sortNo": 7620887
            },
            {
                "articleId": 252354983,
                "articleLinkId": 252355270,
                "articleNo": "7.07152.08.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 1260,
                "genericArticleName": "Water Pump",
                "sortNo": 252355270
            },
            {
                "articleId": 7639959,
                "articleLinkId": 7640767,
                "articleNo": "7.04071.65.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 1351,
                "genericArticleName": "Additional Water Pump",
                "sortNo": 7640767
            },
            {
                "articleId": 206516947,
                "articleLinkId": 206517026,
                "articleNo": "7.03280.04.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 3551,
                "genericArticleName": "Change-Over Valve, change-over flap (induction pipe)",
                "sortNo": 206517026
            },
            {
                "articleId": 7677009,
                "articleLinkId": 7677888,
                "articleNo": "7.22880.01.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 3551,
                "genericArticleName": "Change-Over Valve, change-over flap (induction pipe)",
                "sortNo": 7677888
            },
            {
                "articleId": 206517873,
                "articleLinkId": 206517943,
                "articleNo": "7.06032.10.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 3918,
                "genericArticleName": "High Pressure Pump",
                "sortNo": 206517943
            },
            {
                "articleId": 7668620,
                "articleLinkId": 7669116,
                "articleNo": "7.22184.75.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 3926,
                "genericArticleName": "Air Mass Sensor",
                "sortNo": 7669116
            },
            {
                "articleId": 252356671,
                "articleLinkId": 252356830,
                "articleNo": "7.07796.08.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 5763,
                "genericArticleName": "Control Unit, fuel pump",
                "sortNo": 252356830
            },
            {
                "articleId": 252356670,
                "articleLinkId": 252356772,
                "articleNo": "7.07796.09.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 5763,
                "genericArticleName": "Control Unit, fuel pump",
                "sortNo": 252356772
            },
            {
                "articleId": 252356931,
                "articleLinkId": 252357008,
                "articleNo": "7.07796.10.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 5763,
                "genericArticleName": "Control Unit, fuel pump",
                "sortNo": 252357008
            },
            {
                "articleId": 252356930,
                "articleLinkId": 252357007,
                "articleNo": "7.07796.11.0",
                "articleStateId": 1,
                "brandName": "PIERBURG",
                "brandNo": 5,
                "genericArticleId": 5763,
                "genericArticleName": "Control Unit, fuel pump",
                "sortNo": 252357007
            }
        ]
    },
    "status": 200
}

这里会相应一个包含articleIdarticleLinkId的列表。articleId为 TecDoc 的内部产品 ID,articleLinkId为 TecDoc 的内部车辆编号。我们会使用这两个变量作为我们第二的请求 getAssignedArticlesByIds6 的参数。

getAssignedArticlesByIds6

JSON Input

{
    "getAssignedArticlesByIds6": {
        "articleCountry": "CN",
        "articleIdPairs": {
            "array": [{
                "articleId": 7679068,
                "articleLinkId": 7679535
            }]
        },
        "attributs": false,
        "basicData": true,
        "documents": false,
        "eanNumbers": false,
        "immediateAttributs": false,
        "immediateInfo": false,
        "info": true,
        "lang": "EN",
        "linkingTargetId": 26582,
        "linkingTargetType": "P",
        "mainArticles": false,
        "manuId": 5,
        "modId": 5143,
        "normalAustauschPrice": false,
        "oeNumbers": false,
        "prices": false,
        "provider": "Your provider ID",
        "replacedByNumbers": false,
        "replacedNumbers": false,
        "thumbnails": false,
        "usageNumbers": false
    }
}

JSON Output

{
    "data": {
        "array": [{
            "articleInfo": "",
            "assignedArticle": {
                "articleId": 7679068,
                "articleLinkId": 7679535,
                "articleName": "Vacuum Pump, brake system",
                "articleNo": "7.24807.29.0",
                "articleState": 1,
                "articleStateName": "Normal",
                "flagCertificationCompulsory": false,
                "flagSuitedforSelfService": false,
                "hasAppendage": false,
                "hasAxleLink": false,
                "hasCsGraphics": false,
                "hasDocuments": true,
                "hasLessDiscount": false,
                "hasMarkLink": false,
                "hasMotorLink": false,
                "hasOEN": true,
                "hasPartList": false,
                "hasPrices": false,
                "hasSecurityInfo": false,
                "hasUsage": false,
                "hasVehicleLink": true,
                "packingUnit": 1
            }
        }]
    },
    "status": 200
}

这个方法会返回相关的所有有效的信息。