Click or drag to resize

VehicleInformationServiceFilterSearch Method

OFV Kjøretøydata service

Search with filter values.

Returns resultset of brand, model and variant based on searchfilter.

Namespace:  OfvVehicleData.Service
Assembly:  OfvVehicleData.Service (in OfvVehicleData.Service.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public DTO FilterSearch(
	UserDTO user,
	SearchFilterDTO filter,
	int vehicleGroup,
	bool data,
	string format
)

Parameters

user
Type: OfvService.DTO.LoginUserDTO
UserDTO
filter
Type: OfvService.DTO.FilterSearchFilterDTO
Filter object that includes several search options.
vehicleGroup
Type: SystemInt32
Vehiclegroup code defines which group to work with.
data
Type: SystemBoolean
if set to true List of BrandDTO will be returned otherwise FilterCountDTO which represent how many vehicles fits the search.
format
Type: SystemString
json/xml - which format result will be delivered in.

Return Value

Type: DTO
List of BrandDTO.
Examples
Hers`s an example on how to find vehicles by doing a filtersearch on technical data.

Data set to true, which means result includes technical data for each vehicle, that has bean in filterinput.

Input
{
    "user" : {
        "username" : "my@email.com",
        "token" : "b0d7bfc7c0afd3092d50df077110783c",
        "ipAddress" : "192.168.1.254"
    },
    "filter" : {
        "chsFlt" : {
            "nm" : "Karosseri",
            "flt" : [{
                    "__type" : "chs:vehicle",
                    "id" : 2,
                    "nm" : "Sedan",
                    "sNm" : "SED",
                    "sort" : 20
                }, {
                    "__type" : "chs:vehicle",
                    "id" : 4,
                    "nm" : "Stasjonsvogn",
                    "sNm" : "STV",
                    "sort" : 30
                }
            ],
            "sort" : 0
        },
        "exhFlt" : {
            "nm" : "Utslippskategori",
            "flt" : [{
                    "__type" : "exh:vehicle",
                    "id" : 3,
                    "nm" : "Euro 5",
                    "desc" : "",
                    "sort" : 30,
                }
            ],
            "sort" : 1
        },
        "prcFlt" : {
            "nm" : "Pris importør",
            "val" : 0,
            "valTp" : "NOK",
            "flt" : [{
                    "min" : 400000,
                    "max" : 450000
                }
            ],
            "sort" : 2
        },
        "tdGrpFlt" : [{
                "id" : 1,
                "nm" : "Motordata total",
                "thdLs" : [{
                        "id" : 101,
                        "nm" : "Motorytelse total",
                        "valTp" : "kW",
                        "flt" : [{
                                "min" : 110,
                                "max" : 135
                            }
                        ],
                        "sort" : 4
                    }, {
                        "id" : 102,
                        "nm" : "Motorytelse total",
                        "valTp" : "hk",
                        "flt" : [],
                        "sort" : 5
                    }, {
                        "id" : 104,
                        "nm" : "Drivhjul total",
                        "flt" : [{
                                "nm" : "A",
                                "valAlt" : "Alle",
                                "id" : "A",
                            }
                        ],
                        "sort" : 9
                    }
                ]
            }, {
                "id" : 2,
                "nm" : "Motordata",
                "thdLs" : [{
                        "id" : 201,
                        "nm" : "Sylindervolum",
                        "valTp" : "cm3",
                        "flt" : [],
                        "sort" : 3
                    }, {
                        "id" : 216,
                        "nm" : "Stop/start",
                        "flt" : [],
                        "sort" : 6
                    }
                ]
            }, {
                "id" : 3,
                "nm" : "Miljødata",
                "thdLs" : [{
                        "id" : 306,
                        "nm" : "CO2-utslipp",
                        "valTp" : "g/km",
                        "flt" : [],
                        "sort" : 7
                    }, {
                        "id" : 307,
                        "nm" : "NOx-utslipp",
                        "valTp" : "mg/km",
                        "flt" : [],
                        "sort" : 8
                    }
                ]
            }
        ],
        "brFlt" : [{
                "id" : 151,
                "nm" : "BMW",
                "moLs" : [{
                        "id" : 48,
                        "nm" : "1-Serie",
                    }, {
                        "id" : 38,
                        "nm" : "3-Serie",
                    }, {
                        "id" : 49,
                        "nm" : "M3",
                    }, {
                        "id" : 46,
                        "nm" : "Z4",
                    }, {
                        "id" : 39,
                        "nm" : "5-Serie",
                    }, {
                        "id" : 50,
                        "nm" : "M5",
                    }, {
                        "id" : 41,
                        "nm" : "6-Serie",
                    }, {
                        "id" : 40,
                        "nm" : "7-Serie",
                    }, {
                        "id" : 1556,
                        "nm" : "X1",
                    }, {
                        "id" : 47,
                        "nm" : "X3",
                    }, {
                        "id" : 44,
                        "nm" : "X5",
                    }, {
                        "id" : 1532,
                        "nm" : "X6",
                    }
                ],
            }
        ]
    },
    "vehicleGroup" : "101",
    "data" : true
}
Output showing hits from search (intended for hit counter)
{
    "success" : true,
    "data" : {
        "__type" : "count:filter",
        "extract" : 3,
        "maxLimit" : 300,
        "total" : 3418
    }
}
Output with technical data (intended for listing)
{
    "success" : true,
    "data" : [{
            "__type" : "br:vehicle",
            "id" : 151,
            "nm" : "BMW",
            "moLs" : [{
                    "id" : 38,
                    "nm" : "3-Serie",
                    "moMap" : {
                        "id" : 447,
                        "nm" : "320d xDrive"
                    },
                    "vaLs" : [{
                            "id" : 184969,
                            "nm" : "Touring (163hk)",
                            "ve" : {
                                "thdGrpLs" : [{
                                        "id" : 0,
                                        "thdLs" : [{
                                                "id" : 101,
                                                "val" : "120"
                                            }, {
                                                "id" : 201,
                                                "val" : "1995"
                                            }, {
                                                "id" : 216,
                                                "val" : "1",
                                                "valAlt" : "Ja"
                                            }, {
                                                "id" : 306,
                                                "val" : "140"
                                            }, {
                                                "id" : 104,
                                                "val" : "A",
                                                "valAlt" : "Alle"
                                            }, {
                                                "id" : 307,
                                                "val" : "138"
                                            }, {
                                                "id" : 102,
                                                "val" : "163"
                                            }
                                        ]
                                    }
                                ],
                                "chs" : {
                                    "id" : 4,
                                    "nm" : "Stasjonsvogn",
                                    "sNm" : "STV"
                                },
                                "exh" : {
                                    "id" : 3,
                                    "nm" : "Euro 5"
                                },
                                "prc" : {
                                    "id" : 2216,
                                    "val" : 415300,
                                    "valTp" : "NOK"
                                }
                            }
                        }, {
                            "id" : 184970,
                            "nm" : "Touring (184hk)",
                            "ve" : {
                                "thdGrpLs" : [{
                                        "id" : 0,
                                        "thdLs" : [{
                                                "id" : 101,
                                                "val" : "135"
                                            }, {
                                                "id" : 201,
                                                "val" : "1995"
                                            }, {
                                                "id" : 216,
                                                "val" : "0",
                                                "valAlt" : "Nei"
                                            }, {
                                                "id" : 306,
                                                "val" : "140"
                                            }, {
                                                "id" : 104,
                                                "val" : "A",
                                                "valAlt" : "Alle"
                                            }, {
                                                "id" : 307,
                                                "val" : "138"
                                            }, {
                                                "id" : 102,
                                                "val" : "184"
                                            }
                                        ]
                                    }
                                ],
                                "chs" : {
                                    "id" : 4,
                                    "nm" : "Stasjonsvogn",
                                    "sNm" : "STV"
                                },
                                "exh" : {
                                    "id" : 3,
                                    "nm" : "Euro 5"
                                },
                                "prc" : {
                                    "id" : 2217,
                                    "val" : 435300,
                                    "valTp" : "NOK"
                                }
                            }
                        }, {
                            "id" : 184971,
                            "nm" : "Touring (163hk) Automat",
                            "ve" : {
                                "thdGrpLs" : [{
                                        "id" : 0,
                                        "thdLs" : [{
                                                "id" : 101,
                                                "val" : "120"
                                            }, {
                                                "id" : 201,
                                                "val" : "1995"
                                            }, {
                                                "id" : 216,
                                                "val" : "1",
                                                "valAlt" : "Ja"
                                            }, {
                                                "id" : 306,
                                                "val" : "153"
                                            }, {
                                                "id" : 104,
                                                "val" : "A",
                                                "valAlt" : "Alle"
                                            }, {
                                                "id" : 307,
                                                "val" : "131"
                                            }, {
                                                "id" : 102,
                                                "val" : "163"
                                            }
                                        ]
                                    }
                                ],
                                "chs" : {
                                    "id" : 4,
                                    "nm" : "Stasjonsvogn",
                                    "sNm" : "STV"
                                },
                                "exh" : {
                                    "id" : 3,
                                    "nm" : "Euro 5"
                                },
                                "prc" : {
                                    "id" : 2218,
                                    "val" : 448600,
                                    "valTp" : "NOK"
                                }
                            }
                        }
                    ]
                }
            ]
        }
    ]
}
See Also