Compose search results links
It is possible to link directly to search results. The following information outlines the process of composing such a link.
Base
Every search results link starts in the same way:
http://YOUR_DOMAIN/products/search_results?
where YOUR_DOMAIN would be of form demo.titleleaf.com.
Field/Value Pairs
The guts of the search results link are defined by field/value pairs. A single field/value pair is of form:
search%5BFIELD_NAME%5D=VALUE
Acceptable Fields
Field Description | Field Name |
---|---|
Keywords | q |
ISBNs | product_formats_isbn_in |
Contributors (eg, authors, illustrators) | contributors_name_contains |
BISAC codes | bisac_subjects_code_in |
Guided reading levels | guided_level_in |
Minimum release date | product_formats_release_on_from |
Maximum release date | product_formats_release_on_to |
Catalog page number | catalog_page_in |
Product type | type_in |
Minimum copyright year | product_formats_copyright_from |
Maximum copyright year | product_formats_copyright_to |
Product format | product_formats_format_id_in |
Product status | product_formats_status_in |
Dewey value | dewey_in |
Minimum dewey range | dewey_from |
Maximum dewey range | dewey_to |
Minimum interest level | interest_level_from |
Maximum interest level | interest_level_to |
Minimum reading level | reading_level_from |
Maximum reading level | reading_level_to |
Minimum AR reading level | alsreadlevel_from |
Maximum AR reading level | alsreadlevel_to |
Minimum Lexile | lexile_from |
Maximum Lexile | lexile_to |
Series name | collection_name_contains |
Minimum modified date | updated_at_from |
Maximum modified date | updated_at_to |
Product ID | id_in |
Proprietary product ID | proprietary_id_in |
Product format | product_formats_id_in |
Publisher | publisher_name_equals |
Imprint | imprint_equals |
Subject | categories_id_in |
Genre | genres_contains |
Language | language_equals |
Example
Field Description | Intended Value |
---|---|
Genre | Beginning reader |
search%5Bgenres_contains%5D=beginning_reader
Exception
If the FIELD_NAME ends in "_in" or "_notin", use the following notation:
search%5BFIELD_NAME%5D%5B%5D=VALUE
Example of exception
Field Description | Intended Value |
---|---|
Product status | ACT |
search%5Bproduct_formats_status_in%5D%5B%5D=ACT
Other examples:
Field Description | Intended Value |
---|---|
Subject | Science |
Note: Assuming the ID associated with the "Science" subject is 4.
search%5Bcategories_id_in%5D%5B%5D=4
Field Description | Intended Value |
---|---|
Minimum reading level | Grade 1 |
search%5Breading_level_from%5D=1
Field Description | Intended Value |
---|---|
Maximum reading level | Grade 3 |
search%5Breading_level_to%5D=3
Field Description | Intended Value |
---|---|
Product type | Set |
Note: Internally, a "Set" is referred to as an "Assembly".
search%5Btype_in%5D=Assembly
Field Description | Intended Value |
---|---|
Language | Spanish |
search%5Blanguage_equals%5D=Spanish
Combining Multiple Field/Value Pairs
Multiple field/value pairs are separated with an ampersand, &.
Example
Field Description | Intended Value |
---|---|
Genre | Beginning reader |
Subject | Science |
search%5Bgenres_contains%5D=beginning_reader&search%5Bcategories_id_in%5D%5B%5D=4
Caveat
Spaces (and other characters) are not allowed in URLs. Use "+" instead of a space.
For translation of other characters, refer to W3Schools URL Encoding Reference
Sort Order
The sort order of the search results is defined by the following form:
order=CODE
where CODE can is limited to the values in the following table.
Description | Code |
---|---|
Name (A to Z) | name |
Name (Z to A) | name_desc |
Date Available (New to Old) | date |
Date Available (Old to New) | date_desc |
Series Name (A to Z) | collection |
Series Name (Z to A) | collection_desc |
Grade (Low to High) | grade |
Grade (High to Low) | grade_desc |
Popularity (High to Low) | rate |
Popularity (Low to High) | rate_desc |
Conclusion
The following link finds all products that are in the genre of "Beginning Reader" and in the subject of "Science". The results are sorted by name in descending order:
http://demo.titleleaf.com/products/search_results?order=name_desc&search%5Bgenres_contains%5D=beginning_reader&search%5Bcategories_id_in%5D%5B%5D=4
If you intend to use such a link in an email, it is highly recommended that you employ a URL shortening service such as Bitly.