gemini-commerce / php-client-product-configurator
## Introduction This comprehensive guide will equip you with the knowledge to integrate and leverage our Product Configurator Service in your applications. ## Quick Start Get up and running in no time! Follow these steps to kickstart your integration: 1. **Authentication:** Obtain your integrati
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
README
Introduction
This comprehensive guide will equip you with the knowledge to integrate and leverage our Product Configurator Service in your applications.
Quick Start
Get up and running in no time! Follow these steps to kickstart your integration:
- Authentication: Obtain your integration JWT to authenticate your requests.
- Client Libraries: Explore our GitHub repositories to grab client libraries in your preferred programming language.
- API Overview: Familiarize yourself with our RESTful API using the OpenAPI specification.
Integration
API Overview
Our RESTful API is the gateway to unlocking the full potential of Product Configurator. Check out the detailed API Reference for a granular understanding of each endpoint and request/response format.
Client Libraries
To expedite your integration process, we provide client libraries for various programming languages. Find the one that suits your stack in our GitHub repositories.
Authentication
Security is paramount. Learn how to authenticate your requests using JWT. This ensures a secure and reliable connection between your application and Product Configurator.
Configuration Management
Configurator Lifecycle
Understand the lifecycle of configurators, from draft to active and deleted. This flexibility allows you to manage configurations at your own pace.
Steps and Options
Configure product steps with ease and define options effortlessly. Explore the power of dependencies to create dynamic and intuitive configurations.
Matrices
Delve into matrices—your secret weapon. Explore price and weight matrices, and learn how configured steps influence properties and pricing.
Price Management
Unleash dynamic pricing with our versatile price matrices. From fixed prices to incremental structures, adapt to diverse pricing models effortlessly.
Security
Your data is in safe hands. Discover how Product Configurator ensures security through JWT authentication, safeguarding your sensitive information.
Backward Compatibility
Stay ahead of the curve. Learn about our versioning strategy, providing backward compatibility while allowing our service to evolve seamlessly.
Developer Support
Have questions? Need assistance? Write to us at info@gemini-commerce.com and we will get back to you.
Installation & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0.
Composer
To install the bindings via Composer, add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/Gemini-Commerce/php-client-product-configurator.git" } ], "require": { "Gemini-Commerce/php-client-product-configurator": "*@dev" } }
Then run composer install
Manual Installation
Download the files and include autoload.php
:
<?php require_once('/path/to/product-configurator/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure OAuth2 access token for authorization: standardAuthorization $config = GeminiCommerce\ProductConfigurator\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); // Configure API key authorization: APIAuthorization $config = GeminiCommerce\ProductConfigurator\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = GeminiCommerce\ProductConfigurator\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); $apiInstance = new GeminiCommerce\ProductConfigurator\Api\ConfigurationApi( // 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 ); $tenant_id = 'tenant_id_example'; // string $product_id = 'product_id_example'; // string $configurator_id = 'configurator_id_example'; // string | If not set, the service returns the active configurator try { $result = $apiInstance->productConfiguratorGetAvailableConfiguration($tenant_id, $product_id, $configurator_id); print_r($result); } catch (Exception $e) { echo 'Exception when calling ConfigurationApi->productConfiguratorGetAvailableConfiguration: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://product-configurator.api.gogemini.io
Class | Method | HTTP request | Description |
---|---|---|---|
ConfigurationApi | productConfiguratorGetAvailableConfiguration | GET /v1/{tenantId}/product/{productId}/configuration | Get Available Configuration |
ConfigurationApi | productConfiguratorGetAvailableConfiguration2 | POST /v1/{tenantId}/product/{productId}/configuration | Get Available Configuration |
ConfigurationApi | productConfiguratorGetConfigurationFromSelections | POST /v1/{tenantId}/product/{productId}/configuration-from-selections | Get Configuration from Selections |
ConfiguratorApi | productConfiguratorCopyConfigurator | POST /v1/{tenantId}/product/{sourceConfiguratorId}/copy | Copy Configurator |
ConfiguratorApi | productConfiguratorCreateConfigurator | POST /v1/{tenantId}/product/{productId}/create | Create Configurator |
ConfiguratorApi | productConfiguratorDeleteConfigurator | DELETE /v1/{tenantId}/configurator/{configuratorId} | Delete Configurator |
ConfiguratorApi | productConfiguratorGetConfiguratorByProductId | GET /v1/{tenantId}/product/{productId} | Get Configurator by Product ID |
ConfiguratorApi | productConfiguratorGetConfiguratorByProductId2 | GET /v1/{tenantId}/product/{productId}/status/{status} | Get Configurator by Product ID |
ConfiguratorApi | productConfiguratorListConfigurators | POST /v1/{tenantId}/product/{productId}/page-size/{pageSize}/configurators | List Product Configurators |
ConfiguratorApi | productConfiguratorUpdateConfigurator | PUT /v1/{tenantId}/configurator/{configuratorId} | Update Configurator |
DependencyApi | productConfiguratorCreateDependency | POST /v1/{tenantId}/step/{stepId}/dependency/create | Create Dependency |
DependencyApi | productConfiguratorDeleteDependency | DELETE /v1/{tenantId}/dependency/{dependencyId} | Delete Dependency |
DependencyApi | productConfiguratorListDependencies | POST /v1/{tenantId}/page-size/{pageSize}/dependencies | List Dependencies |
DependencyApi | productConfiguratorUpdateDependency | PUT /v1/{tenantId}/dependency/{dependencyId} | Update Dependency |
MatrixApi | productConfiguratorCreateMatrix | POST /v1/{tenantId}/matrix/create | Create Matrix |
MatrixApi | productConfiguratorDeleteMatrix | DELETE /v1/{tenantId}/matrix/{matrixId} | Delete Matrix |
MatrixApi | productConfiguratorGetMatrix | GET /v1/{tenantId}/matrix/{matrixId} | Get Matrix |
MatrixApi | productConfiguratorListMatrices | POST /v1/{tenantId}/configurator/{configuratorId}/page-size/{pageSize}/matrices | List Matrices |
MatrixApi | productConfiguratorRemovePricelistFromMatrix | DELETE /v1/{tenantId}/matrix/{matrixId}/pricelist/{pricelistGrn} | Remove Pricelist from Matrix |
MatrixApi | productConfiguratorUpdateMatrix | PUT /v1/{tenantId}/matrix/{matrixId} | Update Matrix |
OptionApi | productConfiguratorBulkCreateOptions | POST /v1/{tenantId}/step/{stepId}/option/create/bulk | Bulk Create Options |
OptionApi | productConfiguratorBulkDeleteOptions | POST /v1/{tenantId}/option/delete/bulk | Bulk Delete Options |
OptionApi | productConfiguratorBulkUpdateOptions | PUT /v1/{tenantId}/option/bulk | Bulk Update Options |
OptionApi | productConfiguratorCopyOption | POST /v1/{tenantId}/option/{sourceOptionId}/copy | Copy Option |
OptionApi | productConfiguratorCreateOption | POST /v1/{tenantId}/step/{stepId}/option/create | Create Option |
OptionApi | productConfiguratorDeleteOption | DELETE /v1/{tenantId}/option/{optionId} | Delete Option |
OptionApi | productConfiguratorListOptions | POST /v1/{tenantId}/step/{stepId}/page-size/{pageSize}/options | List Options |
OptionApi | productConfiguratorUpdateOption | PUT /v1/{tenantId}/option/{optionId} | Update Option |
ProductConfiguratorApi | productConfiguratorGetProperty | GET /v1/{tenantId}/property/{propertyId} | |
ProductConfiguratorApi | productConfiguratorListPropertiesByConfiguration | POST /v1/{tenantId}/configurator/{configuratorId}/page-size/{pageSize}/properties | |
PropertyApi | productConfiguratorBulkCreateProperties | POST /v1/{tenantId}/property/create/bulk | Bulk Create Properties |
PropertyApi | productConfiguratorBulkUpdateProperties | PUT /v1/{tenantId}/properties/bulk | Bulk Update Properties |
PropertyApi | productConfiguratorCreateProperty | POST /v1/{tenantId}/property/create | Create Property |
PropertyApi | productConfiguratorListProperties | POST /v1/{tenantId}/matrix/{matrixId}/page-size/{pageSize}/properties | List Properties |
PropertyApi | productConfiguratorUpdateProperty | PUT /v1/{tenantId}/property/{propertyId} | Update Property |
StepApi | productConfiguratorBulkCreateSteps | POST /v1/{tenantId}/configurator/{configuratorId}/step/create/bulk | Bulk Create Steps |
StepApi | productConfiguratorBulkDeleteSteps | POST /v1/{tenantId}/step/delete/bulk | Bulk Delete Steps |
StepApi | productConfiguratorCopyStep | POST /v1/{tenantId}/step/{sourceStepId}/copy | Copy Step |
StepApi | productConfiguratorCreateStep | POST /v1/{tenantId}/configurator/{configuratorId}/step/create | Create Step |
StepApi | productConfiguratorDeleteStep | DELETE /v1/{tenantId}/step/{stepId} | Delete Step |
StepApi | productConfiguratorUpdateStep | PUT /v1/{tenantId}/step/{stepId} | Update Step |
Models
- ConfigurationConfigurationStep
- ConfigurationConfigurator
- ConfigurationGetAvailableConfigurationResponse
- ConfigurationGetConfigurationFromSelectionsResponse
- ConfigurationOptionProperty
- ConfigurationProperty
- ConfigurationPropertyFilter
- ConfigurationPropertyFilterGenericProperty
- ConfigurationStepOption
- ConfiguratorListResponse
- DependencyCondition
- DependencyListDependenciesResponse
- GooglerpcStatus
- ListMatricesRequestFilter
- LocalisationLocalizedText
- MatrixGenericType
- MatrixListMatricesResponse
- MatrixPriceType
- MatrixWeightType
- OptionListOptionsResponse
- OptionSwatch
- ProductConfiguratorBulkCreateOptionsRequest
- ProductConfiguratorBulkCreatePropertiesRequest
- ProductConfiguratorBulkCreateStepsRequest
- ProductConfiguratorBulkDeleteOptionsRequest
- ProductConfiguratorBulkDeleteStepsRequest
- ProductConfiguratorBulkUpdateOptionsRequest
- ProductConfiguratorBulkUpdatePropertiesRequest
- ProductConfiguratorCopyConfiguratorRequest
- ProductConfiguratorCopyOptionRequest
- ProductConfiguratorCopyStepRequest
- ProductConfiguratorCreateConfiguratorRequest
- ProductConfiguratorCreateDependencyRequest
- ProductConfiguratorCreateMatrixRequest
- ProductConfiguratorCreateOptionRequest
- ProductConfiguratorCreatePropertyRequest
- ProductConfiguratorCreateStepRequest
- ProductConfiguratorGetAvailableConfiguration2Request
- ProductConfiguratorGetConfigurationFromSelectionsRequest
- ProductConfiguratorListDependenciesRequest
- ProductConfiguratorListMatricesRequest
- ProductConfiguratorListPropertiesByConfigurationRequest
- ProductConfiguratorListPropertiesRequest
- ProductConfiguratorUpdateConfiguratorRequest
- ProductConfiguratorUpdateDependencyRequest
- ProductConfiguratorUpdateMatrixRequest
- ProductConfiguratorUpdateOptionRequest
- ProductConfiguratorUpdatePropertyRequest
- ProductConfiguratorUpdateStepRequest
- ProductconfiguratorMoney
- ProductconfiguratorPropertyMode
- ProductconfiguratorPropertyType
- ProductconfiguratorWeightUnit
- ProductconfiguratorconfigurationOption
- ProductconfiguratorconfigurationSelection
- ProductconfiguratorconfigurationStep
- ProductconfiguratorconfiguratorEntity
- ProductconfiguratorconfiguratorStatus
- ProductconfiguratorconfiguratorUpdatePayload
- ProductconfiguratordependencyEntity
- ProductconfiguratordependencyType
- ProductconfiguratordependencyUpdatePayload
- ProductconfiguratormatrixEntity
- ProductconfiguratormatrixStep
- ProductconfiguratormatrixUpdatePayload
- ProductconfiguratoroptionBulkCreateRequestCreateEntity
- ProductconfiguratoroptionBulkCreateResponse
- ProductconfiguratoroptionBulkUpdateRequestUpdateEntity
- ProductconfiguratoroptionBulkUpdateResponse
- ProductconfiguratoroptionEntity
- ProductconfiguratoroptionUpdatePayload
- ProductconfiguratorpropertyBulkCreateRequestCreateEntity
- ProductconfiguratorpropertyBulkCreateResponse
- ProductconfiguratorpropertyBulkUpdateRequestUpdateEntity
- ProductconfiguratorpropertyBulkUpdateResponse
- ProductconfiguratorpropertyEntity
- ProductconfiguratorpropertyGenericProperty
- ProductconfiguratorpropertyPriceProperty
- ProductconfiguratorpropertyUpdatePayload
- ProductconfiguratorpropertyWeightProperty
- ProductconfiguratorstepBulkCreateRequestCreateEntity
- ProductconfiguratorstepBulkCreateResponse
- ProductconfiguratorstepEntity
- ProductconfiguratorstepUpdatePayload
- PropertyListPropertiesByConfigurationRequestSelection
- PropertyListPropertiesByConfigurationResponse
- PropertyListPropertiesResponse
- PropertyUpdatePayloadGenericProperty
- PropertyUpdatePayloadPriceProperty
- PropertyUpdatePayloadWeightProperty
- ProtobufAny
Authorization
Authentication schemes defined for the API:
APIAuthorization
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
standardAuthorization
- Type:
OAuth
- Flow:
implicit
- Authorization URL:
https://iambackoffice.gogemini.io/iambackoffice.IamBackoffice/Login
- Scopes: N/A
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
v1
- Package version:
1.1.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen