{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/grubhub/main/json-schema/grubhub-responsewrapperservicearearesponse-schema.json",
  "title": "ResponseWrapperServiceAreaResponse",
  "x-generated": "2026-09-17",
  "x-method": "derived",
  "x-source": "openapi/grubhub-connect-endpoints-openapi.yml#/components/schemas/ResponseWrapperServiceAreaResponse",
  "type": "object",
  "properties": {
    "response": {
      "$ref": "#/$defs/ServiceAreaResponse"
    },
    "errors": {
      "type": "array",
      "description": "A list of errors returned.",
      "items": {
        "$ref": "#/$defs/PublicApiError"
      }
    }
  },
  "$defs": {
    "DeliveryArea": {
      "required": [
        "features",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of delivery area.",
          "example": "FeatureCollection"
        },
        "features": {
          "type": "array",
          "description": "The list of features that make up the delivery area.",
          "items": {
            "$ref": "#/$defs/Feature"
          }
        }
      },
      "description": "The delivery area information."
    },
    "Feature": {
      "required": [
        "geometry",
        "properties",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of feature.",
          "example": "Feature"
        },
        "properties": {
          "$ref": "#/$defs/Properties"
        },
        "geometry": {
          "$ref": "#/$defs/Geometry"
        }
      },
      "description": "The feature information of the delivery area."
    },
    "Geometry": {
      "required": [
        "coordinates",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of geometric shape of the delivery area.",
          "example": "Polygon"
        },
        "coordinates": {
          "type": "array",
          "description": "The coordinates of the delivery area.",
          "example": [
            [
              [
                0.0,
                0.0
              ],
              [
                0.0,
                1.0
              ],
              [
                1.0,
                1.0
              ],
              [
                1.0,
                0.0
              ],
              [
                0.0,
                0.0
              ]
            ]
          ],
          "items": {
            "type": "array",
            "description": "The coordinates of the delivery area.",
            "example": [
              [
                [
                  0.0,
                  0.0
                ],
                [
                  0.0,
                  1.0
                ],
                [
                  1.0,
                  1.0
                ],
                [
                  1.0,
                  0.0
                ],
                [
                  0.0,
                  0.0
                ]
              ]
            ],
            "items": {
              "type": "array",
              "description": "The coordinates of the delivery area.",
              "example": [
                [
                  [
                    0.0,
                    0.0
                  ],
                  [
                    0.0,
                    1.0
                  ],
                  [
                    1.0,
                    1.0
                  ],
                  [
                    1.0,
                    0.0
                  ],
                  [
                    0.0,
                    0.0
                  ]
                ]
              ],
              "items": {
                "type": "number",
                "description": "The coordinates of the delivery area.",
                "format": "double"
              }
            }
          }
        }
      },
      "description": "The geometry of the delivery area."
    },
    "Properties": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the delivery area.",
          "example": "CHICAGO-IL"
        }
      },
      "description": "The properties of the delivery area."
    },
    "PublicApiError": {
      "required": [
        "code",
        "message"
      ],
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "A code representing the type of error that occurred."
        },
        "message": {
          "type": "string",
          "description": "A detailed description of the error that occurred."
        }
      },
      "description": "An error returned by the delivery API."
    },
    "ServiceAreaResponse": {
      "required": [
        "delivery_areas"
      ],
      "type": "object",
      "properties": {
        "delivery_areas": {
          "type": "array",
          "description": "The list of delivery areas that are currently active.",
          "items": {
            "$ref": "#/$defs/DeliveryArea"
          }
        }
      },
      "description": "The response information for delivery service areas."
    }
  }
}