{
  "openapi": "3.0.1",
  "info": {
    "title": "Store Addresses",
    "description": "Create and administer a collection of store addresses.",
    "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"
          ]
        }
      }
    }
  ],
  "paths": {
    "/store-addresses": {
      "get": {
        "tags": [
          "store-addresses"
        ],
        "description": "Get a collection of store addresses.",
        "operationId": "getStoreAddresses",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "description": "The store address ID.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "The owner of the address.",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "address1",
            "in": "query",
            "description": "The first line of the store address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address2",
            "in": "query",
            "description": "The second line of the store address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "address3",
            "in": "query",
            "description": "The third line of the store address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "description": "The city within this address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "The country or region within this address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "The state within this address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zipCode",
            "in": "query",
            "description": "The ZIP code within this address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "firstName",
            "in": "query",
            "description": "First name for the contact person.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lastName",
            "in": "query",
            "description": "Last name for the contact person.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "middleName",
            "in": "query",
            "description": "Middle name for the contact person.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "personTitle",
            "in": "query",
            "description": "Title of the contact person (for example, Mr or Mrs).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "businessTitle",
            "in": "query",
            "description": "Occupation of the contact person (for example, Site Administrator or Customer Service Representative).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "nickName",
            "in": "query",
            "description": "Nickname or identifier for the address. Ensure that the nickname is unique for each store.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email1",
            "in": "query",
            "description": "The primary e-mail address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "email2",
            "in": "query",
            "description": "The secondary e-mail address.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fax1",
            "in": "query",
            "description": "The primary fax number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fax2",
            "in": "query",
            "description": "The secondary fax number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone1",
            "in": "query",
            "description": "The primary phone number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phone2",
            "in": "query",
            "description": "The secondary phone number.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "URL",
            "in": "query",
            "description": "The URL of the store.",
            "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": "field3",
            "in": "query",
            "description": "The customizable field.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "shippingGeoCode",
            "in": "query",
            "description": "Reserved for IBM internal use.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taxGeoCode",
            "in": "query",
            "description": "Reserved for IBM internal use.",
            "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 store addresses.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreAddressCollection"
                },
                "example": {
                  "href": "https://10.190.66.10:8000/rest/admin/v2/store-addresses",
                  "items": [
                    {
                      "id": 10001,
                      "userId": "7000000000000000501",
                      "address1": "1133 Smith Avenue",
                      "address2": null,
                      "address3": null,
                      "city": "White Plains",
                      "country": "United States",
                      "state": "New York",
                      "zipCode": "10604",
                      "firstName": null,
                      "lastName": null,
                      "middleName": null,
                      "personTitle": null,
                      "businessTitle": "Building B",
                      "nickName": "Extended Sites Hub location_de_DE",
                      "email1": "info@extendedsiteshub.xxx",
                      "email2": null,
                      "fax1": "1-888-888-8888",
                      "fax2": null,
                      "phone1": "1-888-333-3333",
                      "phone2": null,
                      "URL": null,
                      "field1": null,
                      "field2": null,
                      "field3": null,
                      "shippingGeoCode": null,
                      "taxGeoCode": null,
                      "links": {
                        "self": {
                          "href\"": "https://10.190.66.10:8000/rest/admin/v2/store-addresses/10001"
                        }
                      }
                    }
                  ],
                  "count": "196"
                }
              }
            }
          },
          "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": [
          "store-addresses"
        ],
        "description": "Create a store address.",
        "operationId": "createStoreAddress",
        "requestBody": {
          "description": "Store address.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreAddresses"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The operation was successful.",
            "content": {},
            "headers": {
              "Location": {
                "description": "The URI of the store-addresses.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "links": {
              "GetStoreAddressesById": {
                "operationRef": "#/paths/~1store-addresses~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 /store-addresses/{id}`.\n"
              },
              "DeleteStoreAddressesById": {
                "operationRef": "#/paths/~1store-addresses~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 /store-addresses/{id}`.\n"
              },
              "UpdateStoreAddressesById": {
                "operationRef": "#/paths/~1store-addresses~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 /store-addresses/{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": "StoreAddress"
      }
    },
    "/store-addresses/{id}": {
      "get": {
        "tags": [
          "store-addresses"
        ],
        "description": "Get a store address.",
        "operationId": "getStoreAddressById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The store address ID.",
            "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": "Store address.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreAddress"
                },
                "example": {
                  "id": 10001,
                  "userId": "7000000000000000501",
                  "address1": "1133 Smith Avenue",
                  "address2": null,
                  "address3": null,
                  "city": "White Plains",
                  "country": "United States",
                  "state": "New York",
                  "zipCode": "10604",
                  "firstName": null,
                  "lastName": null,
                  "middleName": null,
                  "personTitle": null,
                  "businessTitle": "Building B",
                  "nickName": "Extended Sites Hub location_de_DE",
                  "email1": "info@extendedsiteshub.xxx",
                  "email2": null,
                  "fax1": "1-888-888-8888",
                  "fax2": null,
                  "phone1": "1-888-333-3333",
                  "phone2": null,
                  "URL": null,
                  "field1": null,
                  "field2": null,
                  "field3": null,
                  "shippingGeoCode": null,
                  "taxGeoCode": null,
                  "links": {
                    "self": {
                      "href": "https://10.190.66.10:8000/rest/admin/v2/store-addresses/10001"
                    }
                  }
                }
              }
            }
          },
          "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": [
          "store-addresses"
        ],
        "description": "Delete a store address.",
        "operationId": "deleteStoreAddressById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The store address ID.",
            "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": [
          "store-addresses"
        ],
        "description": "Update a store address.",
        "operationId": "updateStoreAddressById",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The store address ID.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Store address.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreAddresses"
              }
            }
          },
          "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": "StoreAddress"
      }
    }
  },
  "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."
      },
      "StoreAddress": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The store address ID.",
            "format": "int32"
          },
          "userId": {
            "type": "integer",
            "description": "The owner of the address.",
            "format": "int64"
          },
          "address1": {
            "type": "string",
            "description": "The first line of the store address."
          },
          "address2": {
            "type": "string",
            "nullable": true,
            "description": "The second line of the store address."
          },
          "address3": {
            "type": "string",
            "nullable": true,
            "description": "The third line of the store address."
          },
          "city": {
            "type": "string",
            "description": "The city within this address."
          },
          "country": {
            "type": "string",
            "description": "The country or region within this address."
          },
          "state": {
            "type": "string",
            "description": "The state within this address."
          },
          "zipCode": {
            "type": "string",
            "description": "The ZIP code within this address."
          },
          "firstName": {
            "type": "string",
            "nullable": true,
            "description": "First name for the contact person."
          },
          "lastName": {
            "type": "string",
            "nullable": true,
            "description": "Last name for the contact person."
          },
          "middleName": {
            "type": "string",
            "nullable": true,
            "description": "Middle name for the contact person."
          },
          "personTitle": {
            "type": "string",
            "nullable": true,
            "description": "Title of the contact person (for example, Mr or Mrs)."
          },
          "businessTitle": {
            "type": "string",
            "description": "Occupation of the contact person (for example, Site Administrator or Customer Service Representative)."
          },
          "nickName": {
            "type": "string",
            "description": "Nickname or identifier for the address. Ensure that the nickname is unique for each store."
          },
          "email1": {
            "type": "string",
            "description": "The primary e-mail address."
          },
          "email2": {
            "type": "string",
            "nullable": true,
            "description": "The secondary e-mail address."
          },
          "fax1": {
            "type": "string",
            "description": "The primary fax number."
          },
          "fax2": {
            "type": "string",
            "nullable": true,
            "description": "The secondary fax number."
          },
          "phone1": {
            "type": "string",
            "description": "The primary phone number."
          },
          "phone2": {
            "type": "string",
            "description": "The secondary phone number."
          },
          "URL": {
            "type": "string",
            "description": "The URL of the store."
          },
          "field1": {
            "type": "string",
            "description": "The customizable field."
          },
          "field2": {
            "type": "string",
            "nullable": true,
            "description": "The customizable field."
          },
          "field3": {
            "type": "string",
            "nullable": true,
            "description": "The customizable field."
          },
          "shippingGeoCode": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for IBM internal use."
          },
          "taxGeoCode": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for IBM internal use."
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string",
                    "description": "The URL of the link."
                  }
                },
                "description": "The self link."
              }
            }
          }
        },
        "description": "Store address."
      },
      "StoreAddresses": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The store address ID.",
            "format": "int32"
          },
          "userId": {
            "type": "integer",
            "description": "The owner of the address.",
            "format": "int64"
          },
          "address1": {
            "type": "string",
            "description": "The first line of the store address."
          },
          "address2": {
            "type": "string",
            "nullable": true,
            "description": "The second line of the store address."
          },
          "address3": {
            "type": "string",
            "nullable": true,
            "description": "The third line of the store address."
          },
          "city": {
            "type": "string",
            "description": "The city within this address."
          },
          "country": {
            "type": "string",
            "description": "The country or region within this address."
          },
          "state": {
            "type": "string",
            "description": "The state within this address."
          },
          "zipCode": {
            "type": "string",
            "description": "The ZIP code within this address."
          },
          "firstName": {
            "type": "string",
            "nullable": true,
            "description": "First name for the contact person."
          },
          "lastName": {
            "type": "string",
            "nullable": true,
            "description": "Last name for the contact person."
          },
          "middleName": {
            "type": "string",
            "nullable": true,
            "description": "Middle name for the contact person."
          },
          "personTitle": {
            "type": "string",
            "nullable": true,
            "description": "Title of the contact person (for example, Mr or Mrs)."
          },
          "businessTitle": {
            "type": "string",
            "description": "Occupation of the contact person (for example, Site Administrator or Customer Service Representative)."
          },
          "nickName": {
            "type": "string",
            "description": "Nickname or identifier for the address. Ensure that the nickname is unique for each store."
          },
          "email1": {
            "type": "string",
            "description": "The primary e-mail address."
          },
          "email2": {
            "type": "string",
            "nullable": true,
            "description": "The secondary e-mail address."
          },
          "fax1": {
            "type": "string",
            "description": "The primary fax number."
          },
          "fax2": {
            "type": "string",
            "nullable": true,
            "description": "The secondary fax number."
          },
          "phone1": {
            "type": "string",
            "description": "The primary phone number."
          },
          "phone2": {
            "type": "string",
            "description": "The secondary phone number."
          },
          "URL": {
            "type": "string",
            "description": "The URL of the store."
          },
          "field1": {
            "type": "string",
            "description": "The customizable field."
          },
          "field2": {
            "type": "string",
            "nullable": true,
            "description": "The customizable field."
          },
          "field3": {
            "type": "string",
            "nullable": true,
            "description": "The customizable field."
          },
          "shippingGeoCode": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for IBM internal use."
          },
          "taxGeoCode": {
            "type": "string",
            "nullable": true,
            "description": "Reserved for IBM internal use."
          }
        }
      },
      "StoreAddressCollection": {
        "type": "object",
        "required": [
          "count"
        ],
        "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/StoreAddress"
            }
          }
        },
        "description": "A collection of store addresses."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ],
  "x-components": {}
}
