Filtering
Filtering
Many of the productfeeds contain thousands of products, but what if you only want a selection of these products? Let’s say you have a website about Apple products, then you don’t want Samsung products. Or let’s say you have a website with last minute travel offers, then you don’t want trips with a departure date after a couple of months.
That’s why Daisycon created filter options, using this you can get parts of the feeds. First you have to create a productfeed using the interface or using the building a URL functionality. Use the feed URL and add one or more of the following options.
Filter options:
- Exact match: &search[equal][mobile_device_brand][]=Apple
- Wildcard with multiple characters: &search[equal][mobile_device_model][]=Iphone+6*
- Wildcard with one character: &search[equal][mobile_device_model][]=Iphone+6?
- Unequal: &search[unequal][mobile_device_model][]=Iphone
- Greater than or equal to: &search[gte][price]=200
- Smaller than: &search[lt][price]=600
- Greater than: &search[gt][release_date]=2023-03-08
- Smaller than or equal to: &search[lte][release_date]=2023-03-08
*Filtering is not possible on fields with TEXT as SQL Data Type.
As you can see in these parameters you can just insert the field name (for example ‘mobile_device_model’) and what you’re looking for. This option is available for all fields, except the description field. You can search this field using our free search. With this kind of filter you’re filtering searching in all fields (e.g. in title, description etc) using &search[free]=Sony+Xperia+Z5.
Example: a URL of trips with destination Greece with a departure date between 2023-03-01 and 2023-03-08:
https://daisycon.io/datafeed/?program_id=7611&media_id=22848&standard_id=1&language_code=nl&locale_id=1&type=xml&encoding=utf8&search[equal][destination_country][]=GR&search[gte][departure_date]=2023-03-01&search[lt][departure_date]=2023-03-08&
Example: a URL of products with the Adidas brand and size XL:
https://daisycon.io/datafeed/?program_id=7611&media_id=22848&standard_id=1&language_code=nl&locale_id=1&type=xml&encoding=utf8&search[equal][brand][]=Adidas&search[equal][size][]=*XL*
Updated data:
It’s also possible to retrieve only updated or removed products since a specific date:
- All products: &update=normal (default value)
- Updated products: &update=update
- New products: &update=insert
- Removed products &update=delete
- All changes: &update=all (includes updated, new and removed products)
When retrieving the updates, you always have to include a date: &update_since=2023-03-01%2000:00:00
Example: only the changes since 2023-03-01 00:00:00:
https://daisycon.io/datafeed/?program_id=7611&media_id=22848&standard_id=1&language_code=nl&locale_id=1&type=xml&encoding=utf8&update=all&update_since=2023-03-01%2000:00:00
Paginating:
If you don’t want all the products in one response but want to paginate, please read our paginating functionality.