# README
Go API client for productconfigurator
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 [email protected] and we will get back to you.
Overview
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: v1
- Package version: 1.0.0
- Generator version: 7.9.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import productconfigurator "github.com/Gemini-Commerce/go-client-product-configurator"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Configuration of Server URL
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
Select Server Configuration
For using other server than the one defined on index 0 set context value productconfigurator.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), productconfigurator.ContextServerIndex, 1)
Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value productconfigurator.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), productconfigurator.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identified by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using productconfigurator.ContextOperationServerIndices
and productconfigurator.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), productconfigurator.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), productconfigurator.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
Documentation for 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 |
Documentation For 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
Documentation For Authorization
Authentication schemes defined for the API:
APIAuthorization
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Note, each API key must be added to a map of map[string]APIKey
where the key is: APIAuthorization and passed in as the auth context for each request.
Example
auth := context.WithValue(
context.Background(),
productconfigurator.ContextAPIKeys,
map[string]productconfigurator.APIKey{
"APIAuthorization": {Key: "API_KEY_STRING"},
},
)
r, err := client.Service.Operation(auth, args)
standardAuthorization
- Type: OAuth
- Flow: implicit
- Authorization URL: https://iambackoffice.gogemini.io/iambackoffice.IamBackoffice/Login
- Scopes: N/A
Example
auth := context.WithValue(context.Background(), productconfigurator.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
import "golang.org/x/oauth2"
/* Perform OAuth2 round trip request and obtain a token */
tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, productconfigurator.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)
Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime