{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/listings-api/json-schema/listings-api-archive-locations-payload-schema.json",
  "title": "ArchiveLocationsPayload",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/listings-api-locations-api-openapi.yml#/components/schemas/ArchiveLocationsPayload",
  "type": "object",
  "properties": {
    "clientMutationId": {
      "type": "string"
    },
    "archivedCount": {
      "type": "integer",
      "format": "int32"
    },
    "locations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LocationSummaryType"
      }
    },
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MutationErrorType"
      }
    }
  },
  "required": [
    "archivedCount"
  ],
  "$defs": {
    "LocationStatusType": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "ARCHIVED",
        "PENDING",
        "TEMPORARILY_CLOSED",
        "SCHEDULED_FOR_ARCHIVE"
      ],
      "description": "Lifecycle states of a location."
    },
    "LocationSummaryType": {
      "type": "object",
      "description": "Summary view of a business location.",
      "properties": {
        "id": {
          "type": "string"
        },
        "databaseId": {
          "type": "integer",
          "format": "int32"
        },
        "storeId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "street": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "stateIso": {
          "type": "string"
        },
        "countryIso": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "latitude": {
          "type": "number",
          "format": "float"
        },
        "longitude": {
          "type": "number",
          "format": "float"
        },
        "phone": {
          "type": "string"
        },
        "website": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/LocationStatusType"
        },
        "primaryGbpSiteCategoryId": {
          "type": "string"
        },
        "additionalGbpSiteCategoryIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "serviceArea": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ServiceAreaType"
          }
        },
        "placeActionLinks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PlaceActionLinkType"
          }
        },
        "discoveredPlaceActionLinks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PlaceActionLinkType"
          }
        }
      },
      "required": [
        "id",
        "name"
      ]
    },
    "MutationErrorType": {
      "type": "object",
      "description": "(also defined by notifications) (also defined by reviewfunnel) (also defined by crawler)",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "path": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "message"
      ]
    },
    "PlaceActionLinkType": {
      "type": "object",
      "description": "A Google place action link (ordering, delivery, takeout, reservation, appointment, etc.).",
      "properties": {
        "placeActionType": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        },
        "isPreferred": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "providerType": {
          "type": "string"
        },
        "isEditable": {
          "type": "boolean"
        },
        "submissionStatus": {
          "type": "string"
        },
        "submissionMessage": {
          "type": "string"
        },
        "submissionCode": {
          "type": "string"
        },
        "lastSubmittedAt": {
          "type": "string"
        }
      },
      "required": [
        "placeActionType",
        "uri"
      ]
    },
    "PlaceInfoType": {
      "type": "object",
      "properties": {
        "placeId": {
          "type": "string"
        },
        "placeName": {
          "type": "string"
        }
      },
      "required": [
        "placeId"
      ]
    },
    "ServiceAreaType": {
      "type": "object",
      "properties": {
        "businessType": {
          "type": "string"
        },
        "regionCode": {
          "type": "string"
        },
        "placeInfos": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PlaceInfoType"
          }
        }
      }
    }
  }
}