GroupBy Retail API
PHP 7.4 and later. Should also work with PHP 8.0.
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/groupby/gb-retailapi-php-client.git"
}
],
"require": {
"groupby/gb-retailapi-php-client": "*@dev"
}
}Then run composer install
Download the files and include autoload.php:
<?php
require_once('/path/to/GbRetailApiClient/vendor/autoload.php');Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: GroupByIncEmployee
$config = Groupby\RetailApiClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
// Configure API key authorization: ClientKey
$config = Groupby\RetailApiClient\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Groupby\RetailApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Groupby\RetailApiClient\Api\AutocompleteApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$x_groupby_customer_id = 'x_groupby_customer_id_example'; // string | Header on incoming HTTP requests that is populated by the API gateway and indicates the customer ID.
$identity = new \Groupby\RetailApiClient\Model\Identity(); // Identity
$merchandiser = new \Groupby\RetailApiClient\Model\Merchandiser(); // Merchandiser
$request = new \Groupby\RetailApiClient\Model\Request(); // Request | Object which is represent autocomplete request and encapsulate all passed parameters.
try {
$result = $apiInstance->autocompletesearch($x_groupby_customer_id, $identity, $merchandiser, $request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AutocompleteApi->autocompletesearch: ', $e->getMessage(), PHP_EOL;
}All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AutocompleteApi | autocompletesearch | GET /api/request | |
| ProductApi | getByProductIds | GET /api/search/product | Provided product search functionality |
| RecommendationsAPIApi | predict | POST /api/predict | Provide Recommendations AI functionality. |
| RecommendationsAPIApi | predictV2 | POST /api/recommendation | Provide Recommendations AI functionality. |
| SearchApi | facetSearch | POST /api/search/facet | Provided search functionality |
| SearchApi | search | POST /api/search | Provided search functionality |
- AdditionalInfo
- AttributeSuggestion
- Audience
- BiasDto
- BiasDtoStrengthDto
- BiasingProfileDto
- BoostedProductBucket
- ColorInfo
- CustomParameterDto
- CustomParameterTrigger
- DebugDto
- ErrorDto
- ErrorResponse
- Experiment
- ExperimentVariant
- Facet
- FacetSearchRequestDto
- FacetSearchResponseDto
- FieldMask
- Filter
- FilterParameter
- FulfillmentInfo
- Identity
- Image
- Interval
- Merchandiser
- MessageType
- Metadata
- NavigationDto
- NavigationType
- NavigationTypeDto
- Order
- Overwrites
- PageInfoDto
- PinnedRefinement
- PredictResults
- PriceInfo
- PriceInfoPriceEffectiveTime
- PriceInfoPriceExpireTime
- PriceInfoPriceRange
- PriceInfoPriceRangeOriginalPrice
- PriceInfoPriceRangePrice
- ProductCustomAttribute
- ProductDto
- ProductDtoAudience
- ProductDtoAvailableTime
- ProductDtoColorInfo
- ProductDtoPriceInfo
- ProductDtoPublishTime
- ProductDtoRating
- ProductDtoRetrievableFields
- Promotion
- QueryPatternTrigger
- QueryPatternTriggerType
- Range
- RangeFilter
- Rating
- RecommendationsErrorResponse
- RecommendationsRequest
- RecordDto
- Refinement
- RefinementDto
- Request
- Role
- RuleConfiguration
- RuleTemplate
- RuleTemplateSection
- RuleType
- RuleVariant
- SearchFilter
- SearchMetadataDto
- SearchRequestDto
- SearchRequestDtoOverwrites
- SearchResponseDto
- SearchResults
- SearchResultsStats
- SearchTerms
- SelectedRefinementDto
- SelectedRefinementTrigger
- SelectedRefinementTriggerType
- Sort
- SortDto
- SortDtoOrderDto
- SpellCorrectionMode
- Stats
- TemplateDto
- TemplateDtoTriggerSet
- Timestamp
- TriggerSet
- ValueFilter
- ValueFilterValueFilterType
- ZoneDto
- ZoneDtoType
- ZoneType
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
- Type: HTTP basic authentication
To run the tests, use:
composer install
vendor/bin/phpunitThis PHP package is automatically generated by the OpenAPI Generator project:
- API version:
0.0.0 - Build package:
org.openapitools.codegen.languages.PhpClientCodegen