brdiscovery 0.1.0 brdiscovery: ^0.1.0 copied to clipboard
Bloomreach Discovery - API SDK
brdiscovery #
Bloomreach Discovery - API Client
This Dart package is automatically generated by the OpenAPI Generator project:
- API version: 0.1.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
Requirements #
Dart 3.2.0 or later
Installation & Usage #
Github #
If this Dart package is published to Github, add the following dependency to your pubspec.yaml
dependencies:
brdiscovery:
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
Local #
To use the package in your local drive, add the following dependency to your pubspec.yaml
dependencies:
brdiscovery:
path: /path/to/brdiscovery
Tests #
TODO
Getting Started #
Please follow the installation procedure and then run the following:
import 'package:brdiscovery/api.dart';
final api_instance = ProductSearchApi();
final accountId = 6702; // int | Your site's numerical Bloomreach account ID. Your Bloomreach representative gives your site's account ID to you before or during your integration kickoff meeting.
final authKey = authKey_example; // String | The Bloomreach-provided authentication key for the Bloomreach account that's sending the request.
final brUid2 = uid%3D7797686432023%3Av%3D11.5%3Ats%3D1428617911187%3Ahc%3D55; // String | A first-party cookie created by the Bloomreach tracking pixel library (BrTrk). This cookie creates a unique, anonymous identifier for every browser or device.
final domainKey = documentation_site; // String | Site domain ID which is provided by Bloomreach
final fl = pid; // String | Filtered list of attributes you want returned in your API response (i.e. productID, price). Multiplevalues should be comma separated)
final q = cable; // String | Your site visitor's partial search query that Autosuggest should operate on. You can percent encode spaces between terms as %20, or you can leave the spaces unencoded.
final requestId = requestId_example; // String | An ID to track site visitor clicks. We recommend that you generate unique, random values of 13 digits to enable click-tracking.
final requestType = search; // String | The type of API request. Value should be suggest for Autosuggest requests.
final searchType = keyword; // String | The type of search. Value should be keyword for Product Search requests, category for Category requests.
final start = 0; // int | The number of the first item on a page of results. For example, the first item on the first page is 0, making the start value also 0. The maximum value is 10000.
final rows = 20; // int | The number of matching items to return per results page in the API response. The maximum value is 200.
final url = https://www.documentation-site.com; // String | The URL of the page or HTTP referrer where the request is started.
final refUrl = https://localhost; // String | The URL of the page or HTTP referrer where the request is started.
final callback = callback_example; // String | Indicates whether to return data wrapped in the function for cross-origin requests.
final efq = efq_example; // String | Extends the filtered query and applies a complex boolean filter to search results to include or exclude items that fit your parameter values. Any product attribute in your product feed is valid, such as brand names and sizes.
final facetPeriodRange = facetPeriodRange_example; // String | Return a count of ranged facets, such as price and sale price. Use numeric attributes only. You need to parse the values that are in the facets_counts section of the response.
final fq = fq_example; // String | The fq parameter applies a faceted filter to the returned products, searching for products that fit your parameter values. Use fq=store_lat_lon to enable filtering by distance for BOPIS.
final ll = ll_example; // String | The latitude-longitude of the end-customer used for the Buy Online Pick-up In Store (BOPIS) feature. Value should be provided as latitude,longitude. For example, ll=11.09,10.018.
final sort = sort=sale_price desc; // String | Sorts results based on the field value in ascending, descending, or another combination of orders. You can sort any fl field. Value is a field name, followed by asc/desc for ascending/descending order respectively.
final statsPeriodField = statsPeriodField_example; // String | This parameter allows you to display the maximum and minimum values of any numeric field in your data set for a user query. With this parameter, you can get all the documents matching a query and display the minimum and maximum values of single-valued, numeric attributes such as price, sale_price, length, width, reviews, etc.
final userId = userId_example; // String | The universal customer ID of the user. You only need to pass this field if your particular integration tracks customers this way. The parameter captures user IDs from the customer side, and reuses the information when powering apps or enhancing cross-device linking. In this way, Bloomreach recognizes users in a way that's aligned with your system. Use an anonymous string. Don't use email or other personally identifiable information. If you do not track users this way, then omit this field.
final viewId = viewId_example; // String | A unique identifier for a specific view of your product catalog. If you have multiple versions of your site, each with their own product catalog characteristics like product titles and prices, then add view_id to your call. Bloomreach uses your view_id parameter value to display the right product information for your customers based on their individual site views. You can enter any string value to identify the specific site catalog view. This string must be consistent in your pixel, API, and product catalog.
final widgetId = widgetId_example; // String | The widget_id provided in the Dashboard for the Dynamic Widgets feature, which is used to provided curated results.This is an optional feature that can be enabled by discussing with your CSM.
try {
final result = api_instance.getProductSearchResults(accountId, authKey, brUid2, domainKey, fl, q, requestId, requestType, searchType, start, rows, url, refUrl, callback, efq, facetPeriodRange, fq, ll, sort, statsPeriodField, userId, viewId, widgetId);
print(result);
} catch (e) {
print('Exception when calling ProductSearchApi->getProductSearchResults: $e\n');
}
Documentation for API Endpoints #
All URIs are relative to https://core.dxpapi.com/api/v1/core
Class | Method | HTTP request | Description |
---|---|---|---|
ProductSearchApi | getProductSearchResults | GET / |
Documentation For Models #
- BadRequestResponse
- ProductSearchResponse
- ProductSearchResponseFacetCounts
- ProductSearchResponseFacetCountsFacetFields
- ProductSearchResponseFacetCountsFacetFieldsCategoryInner
- ProductSearchResponseFacetCountsFacetFieldsValue
- ProductSearchResponseFacetCountsFacetRanges
- ProductSearchResponseFacetCountsFacetRangesPriceInner
- ProductSearchResponseFacetCountsFacetRangesValue
- ProductSearchResponseResponse
Documentation For Authorization #
Endpoints do not require authorization.