获取所有有效的制造商、型号和车辆

车辆相关信息是在不同 TecDoc 相关应用和解决方案里的一个核心的数据资产。产品搜索结果将被筛选到一个特定的车辆上。在这个案例中,我们将展示在 TecDoc 目录中,哪些功能需要列出所有可用的汽车制造商车型和车辆。我们将从车辆上提取接下来的案例中需要的 carIdAudi A4 Allroad 2.0 TFSI Quattro 将被作为案例车辆。 首先,我们必须列出所有可用的汽车制造商。我们要使用 getManufacturers。 奥迪 A4 作为客用车。linkingTargetType 将被设定为“P”

getManufacturers

JSON Input

{
  "getManufacturers": {
    "country": "CN",
    "lang": "en",
    "linkingTargetType": "P",
    "provider": "Your provider ID"
  }
}

返回的结果如下:

JSON Output

{
  "data": {
    "array": [
      {
        "manuId": 5,
        "manuName": "AUDI"
      },
      {
        "manuId": 2858,
        "manuName": "AUDI (FAW)"
      },
      //...
      {
        "manuId": 16,
        "manuName": "BMW"
      },
      {
        "manuId": 3124,
        "manuName": "BMW (BRILLIANCE)"
      }
    ]
  },
  "status": 200
}

现在我们获取到了一个包含有名称和 ID 的乘用车和车辆制造商的列表。这种数据一般可以在特定的HTML应用里显示为一个选择字段。我们将使用manuId搜索车辆型号。manuId代表制造商的 ID。现在我们需要获取所有奥迪的型号。我们需要使用 getModelSeries 以获得制造商为奥迪(manuId: 5)的型号信息。

getModelSeries

JSON Input

{
  "getModelSeries": {
    "country": "CN",
    "lang": "EN",
    "linkingTargetType": "P",
    "manuId": 5,
    "provider": "Your provider ID"
  }
}

结果返回型号ID、型号名称和生产年限。我们需要使用modelId来筛选出我们需要的车辆。

JSON Output

{
    "data": {
        "array": [{
                "modelId": 19,
                "modelname": "100 (4A, C4)",
                "yearOfConstrFrom": 199012,
                "yearOfConstrTo": 199407
            },
            {
                "modelId": 1,
                "modelname": "80 (8C, B4)",
                "yearOfConstrFrom": 199109,
                "yearOfConstrTo": 199412
            },
            {
                "modelId": 8604,
                "modelname": "A1 (8X1, 8XK)",
                "yearOfConstrFrom": 201005
            },
            {
                "modelId": 1557,
                "modelname": "A3 (8L1)",
                "yearOfConstrFrom": 199609,
                "yearOfConstrTo": 200305
            },
            {
                "modelId": 4955,
                "modelname": "A3 (8P1)",
                "yearOfConstrFrom": 200305,
                "yearOfConstrTo": 201208
            },
            {
                "modelId": 6724,
                "modelname": "A3 Convertible (8P7)",
                "yearOfConstrFrom": 200804,
                "yearOfConstrTo": 201305
            },
            {
                "modelId": 11611,
                "modelname": "A3 Convertible (8V7, 8VE)",
                "yearOfConstrFrom": 201310
            },
            {
                "modelId": 11282,
                "modelname": "A3 Limousine (8VS, 8VM)",
                "yearOfConstrFrom": 201305
            },
            {
                "modelId": 5143,
                "modelname": "A3 Sportback (8PA)",
                "yearOfConstrFrom": 200409,
                "yearOfConstrTo": 201303
            },
            {
                "modelId": 10459,
                "modelname": "A3 Sportback (8VA, 8VF)",
                "yearOfConstrFrom": 201209
            },
            {
                "modelId": 5376,
                "modelname": "A4 (8EC, B7)",
                "yearOfConstrFrom": 200411,
                "yearOfConstrTo": 200806
            },
            {
                "modelId": 6418,
                "modelname": "A4 (8K2, B8)",
                "yearOfConstrFrom": 200711,
                "yearOfConstrTo": 201512
            },
            {
                "modelId": 8031,
                "modelname": "A4 Allroad (8KH, B8)",
                "yearOfConstrFrom": 200904,
                "yearOfConstrTo": 201605
            },
            {
                "modelId": 5377,
                "modelname": "A4 Avant (8ED, B7)",
                "yearOfConstrFrom": 200411,
                "yearOfConstrTo": 200806
            },
            {
                "modelId": 6988,
                "modelname": "A4 Avant (8K5, B8)",
                "yearOfConstrFrom": 200711,
                "yearOfConstrTo": 201512
            },
            {
                "modelId": 4840,
                "modelname": "A4 Convertible (8H7, B6, 8HE, B7)",
                "yearOfConstrFrom": 200204,
                "yearOfConstrTo": 200903
            },
            {
                "modelId": 6243,
                "modelname": "A5 (8T3)",
                "yearOfConstrFrom": 200706,
                "yearOfConstrTo": 201701
            },
            {
                "modelId": 8030,
                "modelname": "A5 Convertible (8F7)",
                "yearOfConstrFrom": 200903,
                "yearOfConstrTo": 201701
            },
            {
                "modelId": 8159,
                "modelname": "A5 Sportback (8TA)",
                "yearOfConstrFrom": 200909,
                "yearOfConstrTo": 201701
            },
            {
                "modelId": 258,
                "modelname": "A6 (4A, C4)",
                "yearOfConstrFrom": 199406,
                "yearOfConstrTo": 199710
            },
            {
                "modelId": 1891,
                "modelname": "A6 (4B2, C5)",
                "yearOfConstrFrom": 199701,
                "yearOfConstrTo": 200501
            },
            {
                "modelId": 5110,
                "modelname": "A6 (4F2, C6)",
                "yearOfConstrFrom": 200405,
                "yearOfConstrTo": 201103
            },
            {
                "modelId": 9154,
                "modelname": "A6 (4G2, C7, 4GC)",
                "yearOfConstrFrom": 201011
            },
            {
                "modelId": 5546,
                "modelname": "A6 Allroad (4FH, C6)",
                "yearOfConstrFrom": 200605,
                "yearOfConstrTo": 201108
            },
            {
                "modelId": 10161,
                "modelname": "A6 Allroad (4GH, 4GJ)",
                "yearOfConstrFrom": 201201
            },
            {
                "modelId": 3468,
                "modelname": "A6 Avant (4A, C4)",
                "yearOfConstrFrom": 199406,
                "yearOfConstrTo": 199712
            },
            {
                "modelId": 5381,
                "modelname": "A6 Avant (4F5, C6)",
                "yearOfConstrFrom": 200503,
                "yearOfConstrTo": 201108
            },
            {
                "modelId": 9627,
                "modelname": "A6 Avant (4G5, C7, 4GD)",
                "yearOfConstrFrom": 201105
            },
            {
                "modelId": 8986,
                "modelname": "A7 Sportback (4GA, 4GF)",
                "yearOfConstrFrom": 201010
            },
            {
                "modelId": 265,
                "modelname": "A8 (4D2, 4D8)",
                "yearOfConstrFrom": 199403,
                "yearOfConstrTo": 200212
            },
            {
                "modelId": 4935,
                "modelname": "A8 (4E_)",
                "yearOfConstrFrom": 200210,
                "yearOfConstrTo": 201007
            },
            {
                "modelId": 8627,
                "modelname": "A8 (4H_)",
                "yearOfConstrFrom": 200911
            },
            {
                "modelId": 9731,
                "modelname": "Q3 (8U)",
                "yearOfConstrFrom": 201106
            },
            {
                "modelId": 7534,
                "modelname": "Q5 (8R)",
                "yearOfConstrFrom": 200811
            },
            {
                "modelId": 5461,
                "modelname": "Q7 (4L)",
                "yearOfConstrFrom": 200603,
                "yearOfConstrTo": 201508
            },
            {
                "modelId": 14159,
                "modelname": "Q7 (4M)",
                "yearOfConstrFrom": 201501
            },
            {
                "modelId": 6244,
                "modelname": "R8",
                "yearOfConstrFrom": 200704,
                "yearOfConstrTo": 201507
            },
            {
                "modelId": 8262,
                "modelname": "R8 Spyder",
                "yearOfConstrFrom": 201002,
                "yearOfConstrTo": 201507
            },
            {
                "modelId": 5544,
                "modelname": "TT (8J3)",
                "yearOfConstrFrom": 200608,
                "yearOfConstrTo": 201406
            },
            {
                "modelId": 3851,
                "modelname": "TT (8N3)",
                "yearOfConstrFrom": 199810,
                "yearOfConstrTo": 200606
            },
            {
                "modelId": 12912,
                "modelname": "TT (FV3)",
                "yearOfConstrFrom": 201407
            },
            {
                "modelId": 5608,
                "modelname": "TT Roadster (8J9)",
                "yearOfConstrFrom": 200703,
                "yearOfConstrTo": 201406
            },
            {
                "modelId": 4089,
                "modelname": "TT Roadster (8N9)",
                "yearOfConstrFrom": 199910,
                "yearOfConstrTo": 200606
            },
            {
                "modelId": 13274,
                "modelname": "TT Roadster (FV9)",
                "yearOfConstrFrom": 201411
            }
        ]
    },
    "status": 200
}

我们发现,Audi A4 Avant (8ED, B7)modelId8031。最终,我们将使用 getVehicleIdsByCriteria 对所有车辆使用制造商和型号进行筛选。

getVehicleIdsByCriteria

JSON Input

{
  "getVehicleIdsByCriteria": {
    "countriesCarSelection": "CN",
    "lang": "EN",
    "carType": "P",
    "manuId": 5,
    "modId": 8031,
    "provider": "Your provider ID"
  }
}

返回的结果包含了所有有效的包含了carId的车辆信息。

JSON Output

{
    "data": {
        "array": [{
                "carId": 30990,
                "carName": "2.0 TFSI quattro",
                "carType": "P",
                "firstCountry": "CN"
            },
            {
                "carId": 59571,
                "carName": "2.0 TFSI quattro",
                "carType": "P",
                "firstCountry": "CN"
            }
        ]
    },
    "status": 200
}

如果需要更多的信息,那使用 getVehicleByIds3会是一个更好的选择。

getVehicleByIds3

JSON Input

{
    "getVehicleByIds3": {
        "articleCountry": "CN",
        "carIds": {
            "array": [
                30990,
                59571
            ]
        },
        "lang": "EN",
        "countriesCarSelection": "CN",
        "country": "CN",
        "provider": "Your provider ID"
    }
}

getVehicleByIds3 会返回全部的车辆信息,比如制造类型、马力和KW等。

JSON Output

{
    "data": {
        "array": [{
                "carId": 30990,
                "vehicleDetails": {
                    "carId": 30990,
                    "ccmTech": 1984,
                    "constructionType": "Estate",
                    "cylinder": 4,
                    "cylinderCapacityCcm": 1984,
                    "cylinderCapacityLiter": 200,
                    "fuelType": "Petrol",
                    "fuelTypeProcess": "Direct Injection",
                    "impulsionType": "All-wheel Drive",
                    "manuId": 5,
                    "manuName": "AUDI",
                    "modId": 8031,
                    "modelName": "A4 Allroad (8KH, B8)",
                    "motorType": "Petrol Engine",
                    "powerHpFrom": 211,
                    "powerHpTo": 211,
                    "powerKwFrom": 155,
                    "powerKwTo": 155,
                    "typeName": "2.0 TFSI quattro",
                    "typeNumber": 30990,
                    "valves": 4,
                    "yearOfConstrFrom": 200904,
                    "yearOfConstrTo": 201605
                }
            },
            {
                "carId": 59571,
                "vehicleDetails": {
                    "carId": 59571,
                    "ccmTech": 1984,
                    "constructionType": "Estate",
                    "cylinder": 4,
                    "cylinderCapacityCcm": 1984,
                    "cylinderCapacityLiter": 200,
                    "fuelType": "Petrol",
                    "fuelTypeProcess": "Direct Injection",
                    "impulsionType": "All-wheel Drive",
                    "manuId": 5,
                    "manuName": "AUDI",
                    "modId": 8031,
                    "modelName": "A4 Allroad (8KH, B8)",
                    "motorType": "Petrol Engine",
                    "powerHpFrom": 224,
                    "powerHpTo": 224,
                    "powerKwFrom": 165,
                    "powerKwTo": 165,
                    "typeName": "2.0 TFSI quattro",
                    "typeNumber": 59571,
                    "valves": 4,
                    "yearOfConstrFrom": 201401
                }
            }
        ]
    },
    "status": 200
}

我们将会使用 Audi A4 with 211 Hp。它的carId30990。这个carId将会在后续的实例中使用。