{
  "openapi": "3.0.1",
  "info": {
    "title": "Search Term Association",
    "description": "Create and administer search term associations",
    "version": "9.1.20.0",
    "x-introduced": "9.1.0.0"
  },
  "servers": [
    {
      "url": "https://{hostname}:{port}/rest/admin/v2",
      "variables": {
        "port": {
          "default": "443",
          "enum": [
            "443",
            "8000"
          ]
        },
        "hostname": {
          "default": "localhost",
          "enum": [
            "localhost",
            "test.hcl.com"
          ]
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Search Term Association",
      "description": "Create and administer search term associations"
    }
  ],
  "paths": {
    "/search-term-associations": {
      "get": {
        "summary": "Get the search term associations based on type.",
        "tags": [
          "Search Term Association"
        ],
        "responses": {
          "200": {
            "description": "The operation is successful..",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchTermAssociationCollection"
                },
                "example": {
                  "count": 0,
                  "items": [
                    {
                      "associatedTerms": "string",
                      "id": 0,
                      "languageId": 0,
                      "searchTerms": "string",
                      "type": "string"
                    }
                  ]
                }
              },
              "application/xhtml+xml": {
                "schema": {
                  "$ref": "#/components/schemas/SearchTermAssociationCollection"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "required": true,
            "description": "The unique numeric ID for identifying the store.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "dataLanguageIds",
            "in": "query",
            "required": true,
            "description": "The data language IDs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": true,
            "description": "The type of search term association.",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "Create search term association.",
        "tags": [
          "Search Term Association"
        ],
        "responses": {
          "201": {
            "description": "The operation is  successful.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "required": true,
            "description": "The unique numeric ID for identifying the store.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "body",
            "in": "query",
            "required": true,
            "description": "The request body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchTermAssociation"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/SearchTermAssociation"
              }
            }
          },
          "required": true
        }
      }
    },
    "/search-term-associations/{id}": {
      "delete": {
        "summary": "Create search term association.",
        "tags": [
          "Search Term Association"
        ],
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "required": true,
            "description": "The unique numeric ID for identifying the store.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The unique numeric ID for the search term association.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The operation is  successful.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update a search term association by ID.",
        "tags": [
          "Search Term Association"
        ],
        "responses": {
          "200": {
            "description": "The requested completed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Bad request. Some of the inputs provided to the request aren't valid."
          },
          "403": {
            "description": "The user isn't authorized to perform the specified request."
          },
          "404": {
            "description": "Not authenticated. The user session isn't valid."
          },
          "500": {
            "description": "Internal server error. Additional details will be contained on the server logs."
          }
        },
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "required": true,
            "description": "The unique numeric ID for identifying the store.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The unique numeric ID for identifying the search term association.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "body",
            "in": "query",
            "required": true,
            "description": "The request body.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchTermAssociation"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/SearchTermAssociation"
              }
            }
          },
          "required": true
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SearchTermAssociationCollection": {
        "description": "The collection of search term associations.",
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of item records that match the query parametes."
          },
          "items": {
            "$ref": "#/components/schemas/SearchTermAssociation"
          }
        }
      },
      "SearchTermAssociation": {
        "description": "A search term association..",
        "type": "object",
        "properties": {
          "associatedTerms": {
            "type": "string",
            "description": "Contains search related information based on the type of search term association."
          },
          "id": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the search term association."
          },
          "languageId": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the language."
          },
          "searchTerms": {
            "type": "string",
            "description": "Contains search related information based on the type of search term association."
          },
          "type": {
            "type": "string",
            "description": "TThe type of search term association."
          }
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-components": {}
}
