{
  "openapi": "3.0.1",
  "info": {
    "title": "Stores",
    "description": "Create and administer a collection of stores.",
    "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": "stores",
      "description": "Provide RESTful services to manage store resources."
    }
  ],
  "paths": {
    "/stores": {
      "get": {
        "tags": [
          "stores"
        ],
        "description": "Get a collection of stores.",
        "operationId": "getStores",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The store ID which is generated unique numeric identifier.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "identifier",
            "in": "query",
            "description": "A string that, together with organizationId, uniquely identifies the store.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "storeType",
            "in": "query",
            "description": "The store type, which is used by a user interface to provide appropriate functions.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "The status of the store. Valid values are, 1 = open. 0 = closed. -1 = suspended.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "directory",
            "in": "query",
            "description": "The base name of the directory in which store-specific Web assets, such as JSP files and property files, are found.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "description": "The default currency for a store that will be used by a customer who has not specified a preferred currency.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "query",
            "description": "The organization ID of the store.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "languageId",
            "in": "query",
            "description": "The default language for information displayed to customers shopping in the store.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "contractId",
            "in": "query",
            "description": "The store contract ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "storeGroupId",
            "in": "query",
            "description": "The store group ID for this store.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "storeCategoryId",
            "in": "query",
            "description": "The store category ID, if any, for this store.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fulfillmentCenterId",
            "in": "query",
            "description": "The default fulfillment center for the store.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "returnFFMCenterId",
            "in": "query",
            "description": "The ID of the fulfillment center that is used as the default for returning merchandise to the store.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fulfillmentCenterSelectionFlags",
            "in": "query",
            "description": "Contains bit flags that specify policy used by the default implementation of GetEligibleFulfillmentCenters.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "inventorySystem",
            "in": "query",
            "description": "The inventory system is used by the store. Valid values are, -2 = Non-ATP (Default value), -3 = No inventory, -4 = external inventory management system, -5 = DOM inventory system.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "inventoryOpFlags",
            "in": "query",
            "description": "Contains bit flags indicating how to perform inventory operations. A value of 1 indicates that the RECEIPT table is updated during shipment confirmation.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "quoteGoodFor",
            "in": "query",
            "description": "If this many seconds have passed since an order was prepared and the customer has not committed to pay, the prices and other monetary amounts in the order may change when OrderProcess is run.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "allocationGoodFor",
            "in": "query",
            "description": "When this many seconds have passed since the allocations were made, the ReleaseExpiredAllocations scheduler job can reverse available to promise (ATP) inventory allocations. If 0, ATP inventory allocation is not used by this store, and the INVENTORY table is used instead.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "rejectedOrderExpiry",
            "in": "query",
            "description": "Orders with payment in declined state longer than this many seconds are candidates for cancellation.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "bopmpadFactor",
            "in": "query",
            "description": "The bopmpadFactor specifies the percentage amount (\"padding factor\") by which the order amount presented to the payments subsystem can be increased, if necessary.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "defaultBoOffset",
            "in": "query",
            "description": "When an estimated availability time cannot be determined for a back-ordered order item, by default, it will be set to this many seconds into the future.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "maxBoOffset",
            "in": "query",
            "description": "The maximum period of time that can be requested for a future ship date after the date the requested ship date is entered.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "priceRefFlags",
            "in": "query",
            "description": "Contains bit flags that control which trading agreements and offers are searched when prices are refreshed by the default implementation of the GetContractunitPrices task command.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "avsAcceptCodes",
            "in": "query",
            "description": "The payments subsystem AVS result codes.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "RMAGoodFor",
            "in": "query",
            "description": "The time period in seconds for which return merchandise authorization (RMA) calculations are valid. If this time period elapses before an RMA is completed, charges or credits and approval will be recalculated.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "blockingActive",
            "in": "query",
            "description": "Specifies whether the order blocking feature is in use. The order blocking feature can be disabled for this particular store by setting this field to 0. The default value is 1.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "blkExtAsynch",
            "in": "query",
            "description": "Allows the merchant-extensible code for order blocking to be run asynchronously. This column can be used when a merchant wants to test for blocking conditions by connecting to external systems. To enable this feature, this column must be set to 1. By default, it is turned off (that is, set to 0).",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "persistentSession",
            "in": "query",
            "description": "This indicates whether remember me session is enabled or not. The default value is 0 (disabled).",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "allocationOffset",
            "in": "query",
            "description": "Amount of time before the requested ship date when inventory allocation should be performed.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "maxFoOffset",
            "in": "query",
            "description": "The maximum period of time that can be requested for a future ship date after the date the requested ship date is entered.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "orderHistoryActive",
            "in": "query",
            "description": "Indicates whether order change history tracking is enabled. The default value is Y (Yes).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field1",
            "in": "query",
            "description": "The customizable field.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "field2",
            "in": "query",
            "description": "The customizable field.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lastUpdateStatus",
            "in": "query",
            "description": "Indicates the last date and time the status of the store was updated.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "storeLevel",
            "in": "query",
            "description": "The store level is used as a flag to tell if various features are used in the store. The possible values are MC and MOBILE comma separated, or Null.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "markForDelete",
            "in": "query",
            "description": "Indicates whether the store has been marked for deletion as follows, 0 = do not delete. 1 = delete if no longer in use. Refer to the Database Cleanup utility.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "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 stores.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreCollection"
                }
              }
            }
          },
          "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": [
          "stores"
        ],
        "description": "Create a store.",
        "operationId": "createStore",
        "requestBody": {
          "description": "The store.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Store"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The operation was successful.",
            "headers": {
              "Location": {
                "description": "The URI of the stores.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {},
            "links": {
              "GetstoreBystoreId": {
                "operationRef": "#/paths/~1stores~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 /stores/{id}`.\n"
              },
              "DeletestoresBystoreId": {
                "operationRef": "#/paths/~1stores~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 /stores/{id}`.\n"
              },
              "UpdatestoresBystoreId": {
                "operationRef": "#/paths/~1stores~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 /stores/{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": "Store"
      }
    },
    "/stores/{id}": {
      "get": {
        "tags": [
          "stores"
        ],
        "description": "Get a store by ID.",
        "operationId": "getStoreById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The store ID which is generated unique numeric identifier.",
            "required": true,
            "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": "The store.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Store"
                }
              }
            }
          },
          "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": [
          "stores"
        ],
        "operationId": "deleteStoreById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The store ID which is generated unique numeric identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "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": [
          "stores"
        ],
        "description": "Update a store.",
        "operationId": "updateStoreById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The store ID which is generated unique numeric identifier.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "The store.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Store"
              }
            }
          },
          "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": "Store"
      }
    }
  },
  "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."
      },
      "Store": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The store ID which is generated unique numeric identifier.",
            "format": "int32"
          },
          "identifier": {
            "type": "string",
            "description": "A string that, together with organizationId, uniquely identifies the store."
          },
          "storeType": {
            "type": "string",
            "description": "The store type, which is used by a user interface to provide appropriate functions."
          },
          "status": {
            "type": "integer",
            "description": "The status of the store. Valid values are, 1 = open. 0 = closed. -1 = suspended.",
            "format": "int32"
          },
          "directory": {
            "type": "string",
            "description": "The base name of the directory in which store-specific Web assets, such as JSP files and property files, are found."
          },
          "currency": {
            "type": "string",
            "description": "The default currency for a store that will be used by a customer who has not specified a preferred currency."
          },
          "organizationId": {
            "type": "string",
            "description": "The organization ID of the store."
          },
          "languageId": {
            "type": "integer",
            "description": "The default language for information displayed to customers shopping in the store.",
            "format": "int32"
          },
          "contractId": {
            "type": "string",
            "description": "The store contract ID."
          },
          "storeGroupId": {
            "type": "integer",
            "description": "The store group ID for this store.",
            "format": "int32"
          },
          "storeCategoryId": {
            "type": "integer",
            "description": "The store category ID, if any, for this store.",
            "format": "int32"
          },
          "fulfillmentCenterId": {
            "type": "integer",
            "description": "The default fulfillment center for the store.",
            "format": "int32"
          },
          "returnFFMCenterId": {
            "type": "integer",
            "description": "The ID of the fulfillment center that is used as the default for returning merchandise to the store.",
            "format": "int32"
          },
          "fulfillmentCenterSelectionFlags": {
            "type": "integer",
            "description": "Contains bit flags that specify policy used by the default implementation of GetEligibleFulfillmentCenters.",
            "format": "int32"
          },
          "inventorySystem": {
            "type": "number",
            "description": "The inventory system is used by the store. Valid values are, -2 = Non-ATP (Default value), -3 = No inventory, -4 = external inventory management system, -5 = DOM inventory system."
          },
          "inventoryOpFlags": {
            "type": "integer",
            "description": "Contains bit flags indicating how to perform inventory operations. A value of 1 indicates that the RECEIPT table is updated during shipment confirmation.",
            "format": "int32"
          },
          "quoteGoodFor": {
            "type": "integer",
            "description": "If this many seconds have passed since an order was prepared and the customer has not committed to pay, the prices and other monetary amounts in the order may change when OrderProcess is run.",
            "format": "int32"
          },
          "allocationGoodFor": {
            "type": "integer",
            "description": "When this many seconds have passed since the allocations were made, the ReleaseExpiredAllocations scheduler job can reverse available to promise (ATP) inventory allocations. If 0, ATP inventory allocation is not used by this store, and the INVENTORY table is used instead.",
            "format": "int32"
          },
          "rejectedOrderExpiry": {
            "type": "integer",
            "description": "Orders with payment in declined state longer than this many seconds are candidates for cancellation.",
            "format": "int32"
          },
          "bopmpadFactor": {
            "type": "integer",
            "description": "The bopmpadFactor specifies the percentage amount (\"padding factor\") by which the order amount presented to the payments subsystem can be increased, if necessary.",
            "format": "int32"
          },
          "defaultBoOffset": {
            "type": "integer",
            "description": "When an estimated availability time cannot be determined for a back-ordered order item, by default, it will be set to this many seconds into the future.",
            "format": "int32"
          },
          "maxBoOffset": {
            "type": "integer",
            "description": "The maximum period of time that can be requested for a future ship date after the date the requested ship date is entered.",
            "format": "int32"
          },
          "priceRefFlags": {
            "type": "integer",
            "description": "Contains bit flags that control which trading agreements and offers are searched when prices are refreshed by the default implementation of the GetContractunitPrices task command.",
            "format": "int32"
          },
          "avsAcceptCodes": {
            "type": "string",
            "description": "The payments subsystem AVS result codes."
          },
          "RMAGoodFor": {
            "type": "integer",
            "description": "The time period in seconds for which return merchandise authorization (RMA) calculations are valid. If this time period elapses before an RMA is completed, charges or credits and approval will be recalculated.",
            "format": "int32"
          },
          "blockingActive": {
            "type": "number",
            "description": "Specifies whether the order blocking feature is in use. The order blocking feature can be disabled for this particular store by setting this field to 0. The default value is 1."
          },
          "blkExtAsynch": {
            "type": "number",
            "description": "Allows the merchant-extensible code for order blocking to be run asynchronously. This column can be used when a merchant wants to test for blocking conditions by connecting to external systems. To enable this feature, this column must be set to 1. By default, it is turned off (that is, set to 0)."
          },
          "persistentSession": {
            "type": "number",
            "description": "This indicates whether remember me session is enabled or not. The default value is 0 (disabled)."
          },
          "allocationOffset": {
            "type": "integer",
            "description": "Amount of time before the requested ship date when inventory allocation should be performed.",
            "format": "int32"
          },
          "maxFoOffset": {
            "type": "integer",
            "description": "The maximum period of time that can be requested for a future ship date after the date the requested ship date is entered.",
            "format": "int32"
          },
          "orderHistoryActive": {
            "type": "string",
            "description": "Indicates whether order change history tracking is enabled. The default value is Y (Yes)."
          },
          "field1": {
            "type": "string",
            "description": "The customizable field."
          },
          "field2": {
            "type": "string",
            "description": "The customizable field."
          },
          "lastUpdateStatus": {
            "type": "string",
            "description": "Indicates the last date and time the status of the store was updated.",
            "format": "date-time"
          },
          "storeLevel": {
            "type": "string",
            "description": "The store level is used as a flag to tell if various features are used in the store. The possible values are MC and MOBILE comma separated, or Null."
          },
          "markForDelete": {
            "type": "integer",
            "description": "Indicates whether the store has been marked for deletion as follows, 0 = do not delete. 1 = delete if no longer in use. Refer to the Database Cleanup utility.",
            "format": "int32"
          }
        },
        "required": [
          "identifier",
          "organizationId",
          "storeGroupId",
          "storeType"
        ],
        "description": "The store."
      },
      "StoreCollection": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/Store"
            }
          }
        },
        "required": [
          "count",
          "items"
        ],
        "description": "A collection of stores."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-components": {}
}
