swagger: '2.0'
info:
  title: Search Term Association REST APIs
  version: '2.0'
paths:
  /search-term-associations:
    get:
      produces:
        - application/json
      parameters:
        - description: The unique numeric ID for identifying the store.
          format: int32
          in: query
          name: storeId
          required: true
          type: integer
          x-context-data: storeId
        - description: The data language IDs.
          in: query
          name: dataLanguageIds
          required: true
          type: string
        - description: The type of search term association.
          in: query
          name: type
          required: true
          type: string
          x-context-data: associationType
          x-entity-path: 'dataArea/searchTermAssociation[1]/associationType'
      responses:
        '200':
          description: The operation is successful.
          schema:
            $ref: '#/definitions/SearchTermAssociationCollection'
          x-entity-path: dataArea/searchTermAssociation
      summary: Get the search term associations based on type.
      x-expression-template: >-
        {_wcf.ap='{accessProfile}';_wcf.dataLanguageIds='{dataLanguageIds}';_sch.associationType='{type}'}/SearchTermAssociation[(AssociationType='{type}')]
      x-facade-client-class: com.ibm.commerce.search.facade.client.SearchFacadeClient
      x-facade-client-method: getSearchTermAssociation
      x-parameters:
        accessProfile: IBM_Admin_Summary
      x-request-bod-class: com.ibm.commerce.search.facade.datatypes.GetSearchTermAssociationType
    post:
      consumes:
        - application/json
      parameters:
        - description: The unique numeric ID for identifying the store.
          format: int32
          in: query
          name: storeId
          required: true
          type: integer
          x-context-data: storeId
          x-entity-path: 'dataArea/searchTermAssociation[1]/storeIdentifier/uniqueID'
        - description: The request body.
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/SearchTermAssociation'
          x-entity-path: 'dataArea/searchTermAssociation[1]'
      responses:
        '201':
          description: The operation is successful.
          headers:
            Location:
              description: The URI of search term association.
              type: string
          x-entity-path: 'dataArea/searchTermAssociation[1]/uniqueID'
      summary: Create search term association
      x-action-code: Create
      x-expression-template: '/SearchTermAssociation[1]'
      x-facade-client-class: com.ibm.commerce.search.facade.client.SearchFacadeClient
      x-facade-client-method: processSearchTermAssociation
      x-request-bod-class: >-
        com.ibm.commerce.search.facade.datatypes.ProcessSearchTermAssociationType
  '/search-term-associations/{id}':
    delete:
      parameters:
        - description: The unique numeric ID for identifying the store.
          format: int32
          in: query
          name: storeId
          required: true
          type: integer
          x-context-data: storeId
          x-entity-path: 'dataArea/searchTermAssociation[1]/storeIdentifier/uniqueID'
        - description: The unique numeric ID for the search term association.
          format: int64
          in: path
          name: id
          required: true
          type: integer
          x-context-data: uniqueId
          x-entity-path: 'dataArea/searchTermAssociation[1]/uniqueID'
      responses:
        '204':
          description: The operation is successful.
      summary: Delete a search term association.
      x-action-code: Delete
      x-expression-template: '/SearchTermAssociation[1]'
      x-facade-client-class: com.ibm.commerce.search.facade.client.SearchFacadeClient
      x-facade-client-method: processSearchTermAssociation
      x-request-bod-class: >-
        com.ibm.commerce.search.facade.datatypes.ProcessSearchTermAssociationType
    patch:
      consumes:
        - application/json
      parameters:
        - description: The unique numeric ID for identifying the store.
          format: int32
          in: query
          name: storeId
          required: true
          type: integer
          x-context-data: storeId
          x-entity-path: 'dataArea/searchTermAssociation[1]/storeIdentifier/uniqueID'
        - description: The unique numeric ID for identifying the search term association.
          format: int64
          in: path
          name: id
          required: true
          type: integer
          x-context-data: uniqueId
          x-entity-path: 'dataArea/searchTermAssociation[1]/uniqueID'
        - description: The request body.
          in: body
          name: body
          required: true
          schema:
            $ref: '#/definitions/SearchTermAssociation'
          x-entity-path: 'dataArea/searchTermAssociation[1]'
      responses:
        '200':
          description: The operation is successful.
      summary: Update a search term association by ID.
      x-action-code: Change
      x-expression-template: '/SearchTermAssociation[1]'
      x-facade-client-class: com.ibm.commerce.search.facade.client.SearchFacadeClient
      x-facade-client-method: changeSearchTermAssociation
      x-request-bod-class: com.ibm.commerce.search.facade.datatypes.ChangeSearchTermAssociationType
definitions:
  SearchTermAssociation:
    description: A search term association.
    properties:
      associatedTerms:
        description: >-
          Contains search related information based on the type of search term
          association.
        type: string
        x-entity-path: associatedTerms
      id:
        description: The unique numeric ID for identifying the search term association.
        format: int64
        type: integer
        x-entity-path: uniqueID
      languageId:
        description: The unique numeric ID for identifying the language.
        format: int32
        type: integer
        x-entity-path: languageIdentifier
      searchTerms:
        description: >-
          Contains search related information based on the type of search term
          association.
        type: string
        x-entity-path: searchTerms
      type:
        description: The type of search term association.
        type: string
        x-entity-path: associationType
    type: object
    x-entity-class: com.ibm.commerce.search.facade.datatypes.SearchTermAssociationType
  SearchTermAssociationCollection:
    description: The collection of search term associations.
    properties:
      count:
        description: The total number of item records that match the query parameters.
        format: int64
        type: integer
      items:
        description: The data objects or resources that match the query parameters.
        items:
          $ref: '#/definitions/SearchTermAssociation'
        type: array
    type: object
x-components: {}
