{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sap-commerce-cloud/json-schema/sap-commerce-cloud-store-finder-stock-search-page-schema.json",
  "title": "StoreFinderStockSearchPage",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sap-commerce-cloud-products-api-openapi.yml#/components/schemas/StoreFinderStockSearchPage",
  "type": "object",
  "properties": {
    "stores": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "pointOfService": {
            "$ref": "#/$defs/PointOfService"
          },
          "stockInfo": {
            "$ref": "#/$defs/Stock"
          }
        }
      }
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    }
  },
  "$defs": {
    "Address": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Address identifier"
        },
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "lastName": {
          "type": "string",
          "description": "Last name"
        },
        "titleCode": {
          "type": "string",
          "description": "Title code"
        },
        "line1": {
          "type": "string",
          "description": "Address line 1"
        },
        "line2": {
          "type": "string",
          "description": "Address line 2"
        },
        "town": {
          "type": "string",
          "description": "City or town"
        },
        "region": {
          "$ref": "#/$defs/Region"
        },
        "district": {
          "type": "string",
          "description": "District"
        },
        "postalCode": {
          "type": "string",
          "description": "Postal or ZIP code"
        },
        "country": {
          "$ref": "#/$defs/Country"
        },
        "phone": {
          "type": "string",
          "description": "Phone number"
        },
        "email": {
          "type": "string",
          "description": "Email address"
        },
        "defaultAddress": {
          "type": "boolean",
          "description": "Whether this is the default address"
        }
      }
    },
    "Country": {
      "type": "object",
      "properties": {
        "isocode": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code"
        },
        "name": {
          "type": "string",
          "description": "Country name"
        }
      }
    },
    "GeoPoint": {
      "type": "object",
      "properties": {
        "latitude": {
          "type": "number",
          "format": "double",
          "description": "Latitude"
        },
        "longitude": {
          "type": "number",
          "format": "double",
          "description": "Longitude"
        }
      }
    },
    "Image": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "Image URL"
        },
        "altText": {
          "type": "string",
          "description": "Alternative text"
        },
        "format": {
          "type": "string",
          "description": "Image format (e.g., thumbnail, product, zoom)"
        },
        "imageType": {
          "type": "string",
          "enum": [
            "PRIMARY",
            "GALLERY"
          ],
          "description": "Image type"
        }
      }
    },
    "OpeningSchedule": {
      "type": "object",
      "properties": {
        "weekDayOpeningList": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "weekDay": {
                "type": "string"
              },
              "openingTime": {
                "type": "object",
                "properties": {
                  "formattedHour": {
                    "type": "string"
                  }
                }
              },
              "closingTime": {
                "type": "object",
                "properties": {
                  "formattedHour": {
                    "type": "string"
                  }
                }
              },
              "closed": {
                "type": "boolean"
              }
            }
          }
        }
      }
    },
    "Pagination": {
      "type": "object",
      "properties": {
        "currentPage": {
          "type": "integer",
          "description": "Current page number"
        },
        "pageSize": {
          "type": "integer",
          "description": "Number of results per page"
        },
        "totalPages": {
          "type": "integer",
          "description": "Total number of pages"
        },
        "totalResults": {
          "type": "integer",
          "description": "Total number of results"
        }
      }
    },
    "PointOfService": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Store name"
        },
        "displayName": {
          "type": "string",
          "description": "Display name"
        },
        "description": {
          "type": "string",
          "description": "Store description"
        },
        "address": {
          "$ref": "#/$defs/Address"
        },
        "geoPoint": {
          "$ref": "#/$defs/GeoPoint"
        },
        "openingHours": {
          "$ref": "#/$defs/OpeningSchedule"
        },
        "storeImages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Image"
          }
        },
        "features": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Store features"
        }
      }
    },
    "Region": {
      "type": "object",
      "properties": {
        "isocode": {
          "type": "string",
          "description": "Region ISO code"
        },
        "name": {
          "type": "string",
          "description": "Region name"
        }
      }
    },
    "Stock": {
      "type": "object",
      "properties": {
        "stockLevelStatus": {
          "type": "string",
          "enum": [
            "inStock",
            "lowStock",
            "outOfStock"
          ],
          "description": "Stock level status"
        },
        "stockLevel": {
          "type": "integer",
          "description": "Actual stock level quantity"
        }
      }
    }
  }
}