2021-10-16 - Sample Search Result requests
Jump to navigation
Jump to search
new format 2021-10
{
searchType: "product",
requestProperties: {
browseQuantity: 50,
languageIds: [1,32],
locationNodeIds: [4,23]
},
requiredData: [
"quantityAvailable",
"maxPrice",
"minPrice",
"convertedMaxPrice",
"convertedMinPrice",
"mainImage"
"productAttribute_232",
"productAttribute_9845",
],
dataIds: [], // if set not need to process with complexFilter, put dataIds directly into SearchResultData and start finding requiredData
// also consider another option of sending fromTable details to searchResult service and it copies the dataIds (for large lists)
filter: {
// standard complex filter syntax
},
sortFields: {
// tba
}
}
old format example
{
"search_type": "product",
"browse_quantity": 50,
"required_data": {
"product": [
"quantity_available",
"max_price",
"min_price",
"converted_max_price",
"converted_min_price",
"main_image"
"product_attributes": [{
"attribute_id": 2,
"product_attribute_value_name"
}, {
"attribute_id": 5,
"product_attribute_value_name"
}
]
},
"filter": {
"type": "group",
"elements": [{
"type": "logical",
"sub_type": "filter_service",
"service_tag": "product_id",
"comparison": "greater-than",
"value": 2
}, {
"type": "logical_operator",
"operator": "or"
}, {
"type": "complex_filter",
"sub_type": "sell_offer",
"service_tag": "selloffer_attribute",
"complex_filter": {
"type": "group",
"elements": [{
"type": "logical",
"sub_type": "filter_service",
"service_tag": "location_tree_area_node_id",
"comparison": "equals_any",
"value": "1,13"
}, {
"type": "logical",
"sub_type": "filter_service",
"service_tag": "shipping_service_main_id",
"comparison": "equals_any",
"value": "2,3,5"
}, {
"type": "logical_operator",
"operator": "and"
}, {
"type": "logical",
"sub_type": "filter_service",
"service_tag": "payment_method_main_id",
"comparison": "equals_any",
"value": "1,2,6"
}, {
"type": "logical_operator",
"operator": "and"
}, {
"type": "group",
"elements": [{
"type": "logical",
"sub_type": "filter_service",
"service_tag": "selloffer_id",
"comparison": "greater-than",
"value": 10
}, {
"type": "logical_operator",
"operator": "or"
}, {
"type": "logical",
"sub_type": "filter_service",
"service_tag": "selloffer_id",
"comparison": "less-than",
"value": 3
}
]
}
]
}
}
]
}
}
{
"search_type": "sell_offer",
"browse_quantity": 50,
"required_data": {
“selloffer_price”: [
“quantity_available”,
“max_price”,
“min_price”,
“converted_max_price”,
“converted_min_price”
]
},
"complex_filter": {
"type": "group",
"elements": [{
"type": "logical",
"sub_type": "filter_service",
"service_tag": "location_tree_area_node_id",
"comparison": "equals_any",
"value": "1,13"
}, {
"type": "logical_operator",
"operator": "and"
}, {
"type": "logical",
"sub_type": "filter_service",
"service_tag": "shipping_service_main_id",
"comparison": "equals_any",
"value": "2,3,5"
}, {
"type": "logical_operator",
"operator": "and"
}, {
"type": "logical",
"sub_type": "filter_service",
"service_tag": "payment_method_main_id",
"comparison": "equals_any",
"value": "1,2,6"
}
]
}
}
//------------------------------------------------
{
"search_type": "sell_offer",
"browse_quantity": 50,
"required_data": {
“selloffer_price”: [
“quantity_available”
]
},
"complex_filter": {
"type": "group",
"elements": [{
"type": "logical",
"sub_type": "filter_service",
"service_tag": "location_tree_area_node_id",
"comparison": "equals_any",
"value": "1,13"
}, {
"type": "logical_operator",
"operator": "and"
}, {
"type": "logical",
"sub_type": "filter_service",
"service_tag": "shipping_service_main_id",
"comparison": "equals_any",
"value": "2,3,5"
}, {
"type": "logical_operator",
"operator": "and"
}, {
"type": "logical",
"sub_type": "filter_service",
"service_tag": "payment_method_main_id",
"comparison": "equals_any",
"value": "1,2,6"
}
]
}
}
//------------------------------------------------
{
"search_type": "sell_offer",
"browse_quantity": 50,
"required_data": {
“selloffer_price”: [
“max_price”,
“converted_min_price”
]
},
"complex_filter": {
"type": "group",
"elements": [{
"type": "logical",
"sub_type": "filter_service",
"service_tag": "location_tree_area_node_id",
"comparison": "equals_any",
"value": "1,13"
}, {
"type": "logical_operator",
"operator": "and"
}, {
"type": "logical",
"sub_type": "filter_service",
"service_tag": "shipping_service_main_id",
"comparison": "equals_any",
"value": "2,3,5"
}, {
"type": "logical_operator",
"operator": "and"
}, {
"type": "logical",
"sub_type": "filter_service",
"service_tag": "payment_method_main_id",
"comparison": "equals_any",
"value": "1,2,6"
}
]
}
}