{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/affinityrx-com/json-schema/affinityrx-com-practice-address-input-schema.json",
  "title": "PracticeAddressInput",
  "description": "The practice's US mailing address. PerfectRx prints it: use Windows-1252 characters, without < or >. Line 1 and line 2 together: 70 characters or fewer.",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/affinityrx-com-openapi.json#/components/schemas/PracticeAddressInput",
  "type": "object",
  "properties": {
    "line1": {
      "type": "string",
      "maxLength": 70,
      "pattern": "^\\s*[\\x21-\\x3b\\x3d\\x3f-\\x7e\\xa1-\\xac\\xae-\\xffŒœŠšŸŽžƒˆ˜̀-̧̃̈̊̌̀́;·`´–—‘-‚“-„†-•…‰‹›€™KÅ](?:[\\x09\\x20-\\x3b\\x3d\\x3f-\\x7e\\xa0-\\xac\\xae-\\xffŒœŠšŸŽžƒˆ˜̀-̧̃̈̊̌̀́;·`´–—‘-‚“-„†-•…‰‹›€™KÅ]*[\\x21-\\x3b\\x3d\\x3f-\\x7e\\xa1-\\xac\\xae-\\xffŒœŠšŸŽžƒˆ˜̀-̧̃̈̊̌̀́;·`´–—‘-‚“-„†-•…‰‹›€™KÅ])?\\s*$",
      "description": "The street address. Line 1 and line 2 together: 70 characters or fewer."
    },
    "line2": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^\\s*(?:[\\x21-\\x3b\\x3d\\x3f-\\x7e\\xa1-\\xac\\xae-\\xffŒœŠšŸŽžƒˆ˜̀-̧̃̈̊̌̀́;·`´–—‘-‚“-„†-•…‰‹›€™KÅ](?:[\\x09\\x20-\\x3b\\x3d\\x3f-\\x7e\\xa0-\\xac\\xae-\\xffŒœŠšŸŽžƒˆ˜̀-̧̃̈̊̌̀́;·`´–—‘-‚“-„†-•…‰‹›€™KÅ]*[\\x21-\\x3b\\x3d\\x3f-\\x7e\\xa1-\\xac\\xae-\\xffŒœŠšŸŽžƒˆ˜̀-̧̃̈̊̌̀́;·`´–—‘-‚“-„†-•…‰‹›€™KÅ])?\\s*)?$",
          "maxLength": 70
        },
        {
          "type": "null"
        }
      ],
      "description": "The apartment or suite, or null when there is none. Empty text, N/A, NA, none and - count as null. See notes, TBD and unknown return 422. Line 1 and line 2 together: 70 characters or fewer."
    },
    "city": {
      "type": "string",
      "maxLength": 100,
      "pattern": "^\\s*[\\x21-\\x3b\\x3d\\x3f-\\x7e\\xa1-\\xac\\xae-\\xffŒœŠšŸŽžƒˆ˜̀-̧̃̈̊̌̀́;·`´–—‘-‚“-„†-•…‰‹›€™KÅ](?:[\\x09\\x20-\\x3b\\x3d\\x3f-\\x7e\\xa0-\\xac\\xae-\\xffŒœŠšŸŽžƒˆ˜̀-̧̃̈̊̌̀́;·`´–—‘-‚“-„†-•…‰‹›€™KÅ]*[\\x21-\\x3b\\x3d\\x3f-\\x7e\\xa1-\\xac\\xae-\\xffŒœŠšŸŽžƒˆ˜̀-̧̃̈̊̌̀́;·`´–—‘-‚“-„†-•…‰‹›€™KÅ])?\\s*$",
      "description": "The city name."
    },
    "state": {
      "type": "string",
      "pattern": "^\\s*(?:[Aa][Ll]|[Aa][Kk]|[Aa][Zz]|[Aa][Rr]|[Cc][Aa]|[Cc][Oo]|[Cc][Tt]|[Dd][Ee]|[Dd][Cc]|[Ff][Ll]|[Gg][Aa]|[Hh][Ii]|[Ii][Dd]|[Ii][Ll]|[Ii][Nn]|[Ii][Aa]|[Kk][Ss]|[Kk][Yy]|[Ll][Aa]|[Mm][Ee]|[Mm][Dd]|[Mm][Aa]|[Mm][Ii]|[Mm][Nn]|[Mm][Ss]|[Mm][Oo]|[Mm][Tt]|[Nn][Ee]|[Nn][Vv]|[Nn][Hh]|[Nn][Jj]|[Nn][Mm]|[Nn][Yy]|[Nn][Cc]|[Nn][Dd]|[Oo][Hh]|[Oo][Kk]|[Oo][Rr]|[Pp][Aa]|[Rr][Ii]|[Ss][Cc]|[Ss][Dd]|[Tt][Nn]|[Tt][Xx]|[Uu][Tt]|[Vv][Tt]|[Vv][Aa]|[Ww][Aa]|[Ww][Vv]|[Ww][Ii]|[Ww][Yy]|[Pp][Rr])\\s*$",
      "description": "The two-letter code of a US state, DC or PR, in any letter case. Affinity stores and returns it in upper case."
    },
    "postalCode": {
      "type": "string",
      "pattern": "^\\s*\\d{5}(?:[ -]?\\d{4})?\\s*$",
      "description": "The US ZIP code: 78701, or ZIP+4 as 78701-1234, 78701 1234 or 787011234. Affinity stores and returns 78701 or 78701-1234."
    }
  },
  "required": [
    "line1",
    "city",
    "state",
    "postalCode"
  ],
  "additionalProperties": false
}