{
  "openapi": "3.0.1",
  "info": {
    "title": "Inventory configurations",
    "description": "Create and administer collection of inventory configurations.",
    "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": "Inventory configurations",
      "description": "Provide RESTful services to manage inventory configurations resources."
    }
  ],
  "paths": {
    "/inventory-configurations": {
      "get": {
        "tags": [
          "Inventory configurations"
        ],
        "description": "Get a collection of inventory configurations.",
        "operationId": "getInventoryConfigurations",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The inventory configuration ID.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "identifier",
            "in": "query",
            "description": "The external identifier of this inventory configuration.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "description",
            "in": "query",
            "description": "The administrative description of this inventory configuration.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "precedence",
            "in": "query",
            "description": "The precedence of this inventory configuration when an item is associated with multiple inventory configurations at the location specified.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "flags",
            "in": "query",
            "description": "The bit field for specifying the following inventory configuration options, 0 = The default value. None of the following flags are applicable, 1 = Cache inventory availability in a WebSphere distributed object cache, 2 = Cache inventory availability in the Commerce database, 4 = Retrieve inventory availability from DOM by making an outbound GetInventoryAvailability service request when the information is not cached locally, or when the cached information is no longer valid, 8 = Decrement the cached inventory availability records when an order/shopping cart is submitted for processing, 16 = Update the cached inventory availability records as the information is retrieved from DOM.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "thresholdQuantity",
            "in": "query",
            "description": "The threshold quantity. It determines the expiry time used. A value of NULL is equivalent to a value of negative infinity, which means that the cached available quantity (minus the requested quantity if present) is always greater than or equal to the threshold quantity.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "expiryAboveThreshold",
            "in": "query",
            "description": "The expiry time of a cached inventory availability record when the cached available quantity (minus the requested quantity if present) is greater than or equal to the threshold quantity. Such a record has expired when the number of seconds elapsed since the record was last updated is greater than this value. A value of 0 means that the record expires immediately, and a value of NULL means that the record never expires.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "expiryBelowThreshold",
            "in": "query",
            "description": "The expiry time of a cached inventory availability record when the cached available quantity (minus the requested quantity if present) is less than the threshold quantity. Such a record has expired when the number of seconds elapsed since the record was last updated is greater than this value. A value of 0 means that the record expires immediately, and a value of NULL means that the record never expires.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cachePriority",
            "in": "query",
            "description": "The priority of a cached inventory availability record when cached in the WebSphere distributed object cache. Records with higher priorities will remain in the cache longer than those with lower priorities in the case of cache overflow.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fallbackInventoryStatus",
            "in": "query",
            "description": "The fallback inventory status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fallBackAvailabilityDate",
            "in": "query",
            "description": "The fallback availability date.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fallBackAvailabilityOffset",
            "in": "query",
            "description": "The fallback availability offset in seconds.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "field1",
            "in": "query",
            "description": "Customizable.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "field2",
            "in": "query",
            "description": "Customizable.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "field3",
            "in": "query",
            "description": "Customizable.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quantityUnit",
            "in": "query",
            "description": "The unit of measure of the quantity above.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The position within the resulting dataset where the query begins returning item records. If the offset is \"5\", the records that returned begin with the sixth record that matches the query parameters. If the offset is \"0\", the records that are returned begin with the first record that matches the query parameters.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of records to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A collection of DOM inventory configurations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryConfigurationCollection"
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Inventory configurations"
        ],
        "description": "Create an inventory configuration.",
        "operationId": "createInventoryConfiguration",
        "requestBody": {
          "description": "DOM inventory configurations.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventoryConfigurations"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The operation was successful.",
            "content": {},
            "headers": {
              "Location": {
                "description": "The URI of the Inventory Configurations.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "links": {
              "GetInventoryConfigurationsById": {
                "operationRef": "#/paths/~1inventory-configurations~1{id}/get",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `GET /inventory-configurations/{id}`.\n"
              },
              "DeleteInventoryConfigurationsById": {
                "operationRef": "#/paths/~1inventory-configurations~1{id}/delete",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `DELETE /inventory-configurations/{id}`.\n"
              },
              "UpdateInventoryConfigurationsById": {
                "operationRef": "#/paths/~1inventory-configurations~1{id}/patch",
                "parameters": {
                  "id": "$request.body#/id"
                },
                "description": "The `id` value used in the request body can be used as the `id` parameter in `PATCH /inventory-configurations/{id}`.  \n"
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "InventoryConfiguration"
      }
    },
    "/inventory-configurations/{id}": {
      "get": {
        "tags": [
          "Inventory configurations"
        ],
        "description": "Get an inventory configuration.",
        "operationId": "getInventoryConfigurationById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The inventory configuration ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DOM inventory configurations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventoryConfiguration"
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Inventory configurations"
        ],
        "description": "Delete an inventory configuration.",
        "operationId": "deleteInventoryConfigurationById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The inventory configuration ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The operation was successful.",
            "content": {}
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Inventory configurations"
        ],
        "description": "Update an inventory configuration.",
        "operationId": "updateInventoryConfigurationById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The inventory configuration ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "description": "DOM inventory configurations.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventoryConfigurations"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The operation was successful.",
            "content": {}
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "InventoryConfiguration"
      }
    }
  },
  "components": {
    "schemas": {
      "Link": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "description": "The URL of the link.",
            "format": "uri"
          }
        },
        "description": "Links to related resources."
      },
      "Error": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "The error message code."
          },
          "errorMessage": {
            "type": "string",
            "description": "The error message."
          },
          "errorKey": {
            "type": "string",
            "description": "The error message key."
          },
          "errorParameters": {
            "type": "array",
            "description": "The arguments used to construct the error message.",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "errorLevel": {
            "type": "string",
            "description": "The error level."
          },
          "errorHref": {
            "type": "string",
            "description": "The error hypertext reference."
          }
        },
        "description": "The error message item model."
      },
      "ErrorResponseContainer": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "description": "The request identifier."
          },
          "errors": {
            "type": "array",
            "description": "The errors.",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The error message model."
      },
      "InventoryConfigurations": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The inventory configuration ID.",
            "format": "int64"
          },
          "identifier": {
            "type": "string",
            "description": "The external identifier of this inventory configuration."
          },
          "description": {
            "type": "string",
            "description": "The administrative description of this inventory configuration."
          },
          "precedence": {
            "type": "number",
            "description": "The precedence of this inventory configuration when an item is associated with multiple inventory configurations at the location specified.",
            "format": "double"
          },
          "flags": {
            "type": "integer",
            "description": "The bit field for specifying the following inventory configuration options, 0 = The default value. None of the following flags are applicable, 1 = Cache inventory availability in a WebSphere distributed object cache, 2 = Cache inventory availability in the Commerce database, 4 = Retrieve inventory availability from DOM by making an outbound GetInventoryAvailability service request when the information is not cached locally, or when the cached information is no longer valid, 8 = Decrement the cached inventory availability records when an order/shopping cart is submitted for processing, 16 = Update the cached inventory availability records as the information is retrieved from DOM.",
            "format": "int32"
          },
          "thresholdQuantity": {
            "type": "number",
            "description": "The threshold quantity. It determines the expiry time used. A value of NULL is equivalent to a value of negative infinity, which means that the cached available quantity (minus the requested quantity if present) is always greater than or equal to the threshold quantity.",
            "format": "double"
          },
          "expiryAboveThreshold": {
            "type": "integer",
            "description": "The expiry time of a cached inventory availability record when the cached available quantity (minus the requested quantity if present) is greater than or equal to the threshold quantity. Such a record has expired when the number of seconds elapsed since the record was last updated is greater than this value. A value of 0 means that the record expires immediately, and a value of NULL means that the record never expires.",
            "format": "int32"
          },
          "expiryBelowThreshold": {
            "type": "integer",
            "description": "The expiry time of a cached inventory availability record when the cached available quantity (minus the requested quantity if present) is less than the threshold quantity. Such a record has expired when the number of seconds elapsed since the record was last updated is greater than this value. A value of 0 means that the record expires immediately, and a value of NULL means that the record never expires.",
            "format": "int32"
          },
          "cachePriority": {
            "type": "integer",
            "description": "The priority of a cached inventory availability record when cached in the WebSphere distributed object cache. Records with higher priorities will remain in the cache longer than those with lower priorities in the case of cache overflow.",
            "format": "int32"
          },
          "fallbackInventoryStatus": {
            "type": "string",
            "description": "The fallback inventory status."
          },
          "fallBackAvailabilityDate": {
            "type": "string",
            "description": "The fallback availability date.",
            "format": "date-time"
          },
          "fallBackAvailabilityOffset": {
            "type": "integer",
            "description": "The fallback availability offset in seconds.",
            "format": "int32"
          },
          "field1": {
            "type": "integer",
            "description": "Customizable.",
            "format": "int32"
          },
          "field2": {
            "type": "number",
            "description": "Customizable.",
            "format": "double"
          },
          "field3": {
            "type": "string",
            "description": "Customizable."
          },
          "quantityUnit": {
            "type": "string",
            "description": "The unit of measure of the quantity above."
          }
        },
        "description": "DOM inventory configurations."
      },
      "InventoryConfiguration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The inventory configuration ID.",
            "format": "int64"
          },
          "identifier": {
            "type": "string",
            "description": "The external identifier of this inventory configuration."
          },
          "description": {
            "type": "string",
            "description": "The administrative description of this inventory configuration."
          },
          "precedence": {
            "type": "number",
            "description": "The precedence of this inventory configuration when an item is associated with multiple inventory configurations at the location specified.",
            "format": "double"
          },
          "flags": {
            "type": "integer",
            "description": "The bit field for specifying the following inventory configuration options, 0 = The default value. None of the following flags are applicable, 1 = Cache inventory availability in a WebSphere distributed object cache, 2 = Cache inventory availability in the Commerce database, 4 = Retrieve inventory availability from DOM by making an outbound GetInventoryAvailability service request when the information is not cached locally, or when the cached information is no longer valid, 8 = Decrement the cached inventory availability records when an order/shopping cart is submitted for processing, 16 = Update the cached inventory availability records as the information is retrieved from DOM.",
            "format": "int32"
          },
          "thresholdQuantity": {
            "type": "number",
            "description": "The threshold quantity. It determines the expiry time used. A value of NULL is equivalent to a value of negative infinity, which means that the cached available quantity (minus the requested quantity if present) is always greater than or equal to the threshold quantity.",
            "format": "double"
          },
          "expiryAboveThreshold": {
            "type": "integer",
            "description": "The expiry time of a cached inventory availability record when the cached available quantity (minus the requested quantity if present) is greater than or equal to the threshold quantity. Such a record has expired when the number of seconds elapsed since the record was last updated is greater than this value. A value of 0 means that the record expires immediately, and a value of NULL means that the record never expires.",
            "format": "int32"
          },
          "expiryBelowThreshold": {
            "type": "integer",
            "description": "The expiry time of a cached inventory availability record when the cached available quantity (minus the requested quantity if present) is less than the threshold quantity. Such a record has expired when the number of seconds elapsed since the record was last updated is greater than this value. A value of 0 means that the record expires immediately, and a value of NULL means that the record never expires.",
            "format": "int32"
          },
          "cachePriority": {
            "type": "integer",
            "description": "The priority of a cached inventory availability record when cached in the WebSphere distributed object cache. Records with higher priorities will remain in the cache longer than those with lower priorities in the case of cache overflow.",
            "format": "int32"
          },
          "fallbackInventoryStatus": {
            "type": "string",
            "description": "The fallback inventory status."
          },
          "fallBackAvailabilityDate": {
            "type": "string",
            "description": "The fallback availability date.",
            "format": "date-time"
          },
          "fallBackAvailabilityOffset": {
            "type": "integer",
            "description": "The fallback availability offset in seconds.",
            "format": "int32"
          },
          "field1": {
            "type": "integer",
            "description": "Customizable.",
            "format": "int32"
          },
          "field2": {
            "type": "number",
            "description": "Customizable.",
            "format": "double"
          },
          "field3": {
            "type": "string",
            "description": "Customizable."
          },
          "quantityUnit": {
            "type": "string",
            "description": "The unit of measure of the quantity above."
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "description": "DOM inventory configurations."
      },
      "InventoryConfigurationCollection": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/InventoryConfiguration"
            }
          }
        },
        "description": "A collection of DOM inventory configurations."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ]
}
