public interface CpqClient
Accessing CPQ via REST and oAuth2
  • Method Details

    • token

      @POST @Produces("application/json") @Path("/basic/api/token") rx.Observable<com.hybris.charon.RawResponse<TokenResponseData>> token(String credentials)
      Get oAuth2 token, passing the credentials of a guest user
      Parameters:
      credentials -
      Returns:
      Token
    • createConfiguration

      @POST @Produces("application/json") @Path("/api/configuration/v1/configurations") rx.Observable<com.hybris.charon.RawResponse<ConfigurationCreatedResponseData>> createConfiguration(@HeaderParam("Authorization") String authorization, @HeaderParam("x-cpq-disable-cookies") boolean cookieless, ConfigurationCreateRequest createRequest)
      Initializes a new session configuration
      Parameters:
      authorization - OAuth2 authorization token
      cookieless - if true cookieless mode requested, CPQ should then return no ASP.Net Session cookie, but populate header field x-cpq-session-id with session id.
      createRequest - request body
      Returns:
      Response, used to extract the cookies needed for subsequent requests and configuration id
    • getConfiguration

      @GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<ConfigurationSummaryData>> getConfiguration(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId)
      Retrieves the configuration with given ID
      Parameters:
      authorization - OAuth2 token
      configId - Configuration ID
      Returns:
      Configuration Summary
    • getConfiguration

      @GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<ConfigurationSummaryData>> getConfiguration(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId)
      Retrieves the configuration with given ID
      Parameters:
      authorization - OAuth2 token
      cookie - Session and load balancer cookies
      configId - Configuration ID
      Returns:
      Configuration Summary
    • deleteConfiguration

      @DELETE @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<Object>> deleteConfiguration(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId)
      Deletes the configuration with given ID
      Parameters:
      authorization - OAuth2 token
      configId - Configuration ID
      Returns:
      no Content
    • deleteConfiguration

      @DELETE @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<Object>> deleteConfiguration(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId)
      Deletes the configuration with given ID
      Parameters:
      authorization - OAuth2 token
      cookie - Session and load balancer cookies
      configId - Configuration ID
      Returns:
      no Content
    • clone

      @POST @Produces("application/json") @Path("/api/configuration/v1/configurations/{configurationId}/clone") rx.Observable<com.hybris.charon.RawResponse<ConfigurationCloneData>> clone(@HeaderParam("Authorization") String authorization, @HeaderParam("x-cpq-disable-cookies") boolean cookieless, @PathParam("configurationId") String configId, ConfigurationCloneRequest cloneRequest)
      Clones the configuration with given ID
      Parameters:
      authorization - OAuth2 token
      cookieless - specifies whether cpq runs in cookieless mode
      configId - Configuration ID
      cloneRequest - options for cloning process
      Returns:
      Configuration ID of cloned configuration
    • clone

      @POST @Produces("application/json") @Path("/api/configuration/v1/configurations/{configurationId}/clone") rx.Observable<com.hybris.charon.RawResponse<ConfigurationCloneData>> clone(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @HeaderParam("x-cpq-disable-cookies") boolean cookieless, @PathParam("configurationId") String configId, ConfigurationCloneRequest cloneRequest)
      Clones the configuration with given ID
      Parameters:
      authorization - OAuth2 token
      cookie - Session and load balancer cookies
      cookieless - specifies whether cpq runs in cookieless mode
      configId - Configuration ID
      cloneRequest - options for cloning process
      Returns:
      Configuration ID of cloned configuration
    • createOrUpdateConfigurationContext

      @POST @Produces("application/json") @Path("/api/configuration/v1/configurations/configurationContext") rx.Observable<com.hybris.charon.RawResponse<Object>> createOrUpdateConfigurationContext(BusinessContextRequest businessContext, @HeaderParam("Authorization") String authorization)
      Sends the business context to CPQ for a given owner id
      Parameters:
      businessContext - business context to be sent
      authorization - OAuth2 token
      ownerId - owner id for which the business context is sent
      Returns:
      no content
    • makePermanent

      @PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<Object>> makePermanent(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId, ConfigurationPatchRequest requestData)
      Marks a persisted configuration as permanent.
      Should be called when the UI is 'done' configuring. Afterwards admin/server is required to do any changes. UI/Client scope is not sufficient anymore to do changes.
      Parameters:
      authorization - OAuth2 token
      configId - config id
      requestData - request body
      Returns:
      no content
    • makePermanent

      @PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}") rx.Observable<com.hybris.charon.RawResponse<Object>> makePermanent(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId, ConfigurationPatchRequest requestData)
      Marks a persisted configuration as permanent.
      Should be called when the UI is 'done' configuring. Afterwards admin/server is required to do any changes. UI/Client scope is not sufficient anymore to do changes.
      Parameters:
      authorization - OAuth2 token
      cookie - Session and load balancer cookies
      configId - config id
      requestData - request body
      Returns:
      no content
    • readConfigurationTab

      @GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/display") rx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>> readConfigurationTab(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId, @QueryParam("tabId") Integer tabId)
      Retrieves the configuration tab/group data for desired tab
      Parameters:
      authorization - OAuth2 token
      configId - Configuration id
      tabId - Tab id
      Returns:
      Configuration tab data
    • readConfigurationTab

      @GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/display") rx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>> readConfigurationTab(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId, @QueryParam("tabId") Integer tabId)
      Retrieves the configuration tab/group data for desired tab
      Parameters:
      authorization - OAuth2 token
      cookie - Session and load balancer cookies
      configId - Configuration id
      tabId - Tab id
      Returns:
      Configuration tab data
    • readConfigurationCurrentTab

      @GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/display") rx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>> readConfigurationCurrentTab(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId)
      Retrieves the configuration tab/group data for the current tab
      Parameters:
      authorization - OAuth2 token
      configId - Configuration id
      Returns:
      Configuration tab data
    • readConfigurationCurrentTab

      @GET @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/display") rx.Observable<com.hybris.charon.RawResponse<CpqConfigurationData>> readConfigurationCurrentTab(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId)
      Retrieves the configuration tab/group data for the current tab
      Parameters:
      authorization - OAuth2 token
      cookie - Session and load balancer cookies
      configId - Configuration id
      Returns:
      Configuration tab data
    • updateAttribute

      @PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/attributes/{standardAttributeCode}") rx.Observable<com.hybris.charon.RawResponse<Object>> updateAttribute(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId, @PathParam("standardAttributeCode") Integer attributeCode, ChangeAttributeValueData changeAttribute)
      Updates configuration attribute
      Parameters:
      authorization - OAuth2 token
      configId - configuration id
      attributeCode - standard attribute code
      changeAttribute - data structure containing information about updated attribute vaiues or quantity
    • updateAttribute

      @PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/attributes/{standardAttributeCode}") rx.Observable<com.hybris.charon.RawResponse<Object>> updateAttribute(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId, @PathParam("standardAttributeCode") Integer attributeCode, ChangeAttributeValueData changeAttribute)
      Updates configuration attribute
      Parameters:
      authorization - OAuth2 token
      cookie - Session and load balancer cookies
      configId - configuration id
      attributeCode - standard attribute code
      changeAttribute - data structure containing information about updated attribute vaiues or quantity
    • updateAttributeValueQuantity

      @PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/attributes/{standardAttributeCode}/attributeValues/{attributeValueId}") rx.Observable<com.hybris.charon.RawResponse<Object>> updateAttributeValueQuantity(@HeaderParam("Authorization") String authorization, @PathParam("configId") String configId, @PathParam("standardAttributeCode") Integer attributeCode, @PathParam("attributeValueId") Integer attributeValueId, ChangeAttributeValueQuantityData changeAttributeValueQuantity)
      Updates quantity of the configuration attribute value
      Parameters:
      authorization - OAuth2 token
      configId - configuration id
      attributeCode - standard attribute code
      attributeValueId - standard attribute code
      changeAttributeValueQuantity - data structure containing information about updated value quantity
    • updateAttributeValueQuantity

      @PATCH @Produces("application/json") @Path("/api/configuration/v1/configurations/{configId}/attributes/{standardAttributeCode}/attributeValues/{attributeValueId}") rx.Observable<com.hybris.charon.RawResponse<Object>> updateAttributeValueQuantity(@HeaderParam("Authorization") String authorization, @HeaderParam("Cookie") String cookie, @PathParam("configId") String configId, @PathParam("standardAttributeCode") Integer attributeCode, @PathParam("attributeValueId") Integer attributeValueId, ChangeAttributeValueQuantityData changeAttributeValueQuantity)
      Updates quantity of the configuration attribute value
      Parameters:
      authorization - OAuth2 token
      cookie - Session and load balancer cookies
      configId - configuration id
      attributeCode - standard attribute code
      attributeValueId - standard attribute code
      changeAttributeValueQuantity - data structure containing information about updated value quantity