{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/listings-api/json-schema/listings-api-create-location-input-schema.json",
  "title": "CreateLocationInput",
  "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/CreateLocationInput",
  "type": "object",
  "properties": {
    "clientMutationId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "storeId": {
      "type": "string"
    },
    "street": {
      "type": "string"
    },
    "city": {
      "type": "string"
    },
    "stateIso": {
      "type": "string"
    },
    "postalCode": {
      "type": "string"
    },
    "countryIso": {
      "type": "string"
    },
    "subCategoryId": {
      "type": "integer",
      "format": "int32"
    },
    "phone": {
      "type": "string"
    },
    "businessHours": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BusinessHoursDayInput"
      }
    },
    "serviceArea": {
      "$ref": "#/$defs/ServiceAreaInput"
    },
    "enabledSiteIds": {
      "type": "array",
      "items": {
        "type": "integer",
        "format": "int32"
      }
    },
    "placeActionLinks": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PlaceActionLinkInputType"
      }
    }
  },
  "required": [
    "name",
    "description",
    "countryIso",
    "subCategoryId"
  ],
  "$defs": {
    "BusinessHours": {
      "type": "string",
      "enum": [
        "OPEN",
        "CLOSED"
      ]
    },
    "BusinessHoursDayInput": {
      "type": "object",
      "properties": {
        "day": {
          "$ref": "#/$defs/DayOfTheWeekType"
        },
        "slots": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BusinessHoursSlotInput"
          }
        },
        "type": {
          "$ref": "#/$defs/BusinessHours"
        }
      },
      "required": [
        "day",
        "type"
      ]
    },
    "BusinessHoursSlotInput": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string"
        },
        "end": {
          "type": "string"
        }
      },
      "required": [
        "start",
        "end"
      ]
    },
    "DayOfTheWeekType": {
      "type": "string",
      "enum": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
      ]
    },
    "PlaceActionLinkInputType": {
      "type": "object",
      "description": "Write payload for a Google place action link (append/upsert model).",
      "properties": {
        "placeActionType": {
          "$ref": "#/$defs/PlaceActionTypeEnum"
        },
        "uri": {
          "type": "string"
        },
        "isPreferred": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "providerType": {
          "type": "string"
        },
        "isEditable": {
          "type": "boolean"
        },
        "action": {
          "type": "string"
        }
      },
      "required": [
        "placeActionType",
        "uri"
      ]
    },
    "PlaceActionTypeEnum": {
      "type": "string",
      "enum": [
        "APPOINTMENT",
        "ONLINE_APPOINTMENT",
        "DINING_RESERVATION",
        "FOOD_ORDERING",
        "FOOD_DELIVERY",
        "FOOD_TAKEOUT",
        "SHOP_ONLINE"
      ],
      "description": "Google place action types."
    },
    "PlaceInfoInput": {
      "type": "object",
      "properties": {
        "placeId": {
          "type": "string"
        },
        "placeName": {
          "type": "string"
        }
      },
      "required": [
        "placeId"
      ]
    },
    "ServiceAreaInput": {
      "type": "object",
      "properties": {
        "businessType": {
          "type": "string"
        },
        "regionCode": {
          "type": "string"
        },
        "placeInfos": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PlaceInfoInput"
          }
        }
      }
    }
  }
}