{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/aftership/main/json-schema/aftership-address-v1-schema.json",
  "title": "Address",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aftership-coverages-api-openapi.yml#/components/schemas/Address.v1",
  "type": "object",
  "x-internal": false,
  "x-tags": [
    "Primitive"
  ],
  "properties": {
    "street_1": {
      "type": "string",
      "minLength": 1,
      "description": "Street address 1, a complete line"
    },
    "street_2": {
      "type": "string",
      "minLength": 1,
      "description": "Street address 2, a complete line"
    },
    "street_3": {
      "type": "string",
      "minLength": 1,
      "description": "Street address 3, a complete line"
    },
    "postal_code": {
      "type": "string",
      "minLength": 1,
      "description": "Postal code / zip code"
    },
    "city": {
      "type": "string",
      "minLength": 1,
      "description": "City name, e.g. San Jose"
    },
    "state": {
      "type": "object",
      "description": "State object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "State name, e.g. California"
        }
      }
    },
    "country_region": {
      "description": "Country region object",
      "type": "object",
      "required": [
        "code"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "Country code, ISO 3166-1 alpha 3 standard, e.g. USA"
        }
      }
    },
    "phone": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "first_name": {
      "type": "string"
    },
    "last_name": {
      "type": "string"
    }
  },
  "required": [
    "street_1",
    "postal_code",
    "city",
    "state",
    "country_region",
    "first_name",
    "last_name"
  ]
}