{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/acculynx/json-schema/acculynx-contact-schema.json",
  "title": "contact",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acculynx-contacts-api-openapi.yml#/components/schemas/contact",
  "allOf": [
    {
      "$ref": "#/$defs/contactLink"
    },
    {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "description": "First name of the contact."
        },
        "lastName": {
          "type": "string",
          "description": "Last name of the contact."
        },
        "salutation": {
          "type": "string",
          "description": "Salutation of the contact."
        },
        "crossReference": {
          "type": "string",
          "description": "CrossReference of the contact."
        },
        "companyName": {
          "type": "string",
          "description": "CompanyName of the contact."
        },
        "phoneNumbers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/phoneNumberLink"
          }
        },
        "emailAddresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/emailAddressLink"
          }
        },
        "mailingAddress": {
          "$ref": "#/$defs/address"
        },
        "billingAddress": {
          "$ref": "#/$defs/address"
        },
        "createdDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Date the contact was created, in ISO 8601 format. Null when unavailable."
        },
        "modifiedDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Date the contact was last modified, in ISO 8601 format. Null when unavailable."
        }
      }
    }
  ],
  "$defs": {
    "address": {
      "type": "object",
      "properties": {
        "street1": {
          "type": "string"
        },
        "street2": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "$ref": "#/$defs/state"
        },
        "zipCode": {
          "type": "string"
        },
        "country": {
          "$ref": "#/$defs/country"
        }
      }
    },
    "contactLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The unique GUID identifying this contact.",
          "format": "uuid"
        },
        "_link": {
          "type": "string",
          "description": "The unique URI for this resource."
        }
      }
    },
    "country": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The id for the Country."
        },
        "name": {
          "type": "string",
          "description": "The name of the Country."
        },
        "abbreviation": {
          "type": "string",
          "description": "The 2 character abbreviation for the Country.",
          "minLength": 2,
          "maxLength": 2
        },
        "_link": {
          "type": "string",
          "description": "The URI of the Country."
        }
      }
    },
    "emailAddressLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The GUID of the Email Address.",
          "format": "uuid",
          "readOnly": true
        },
        "_link": {
          "type": "string",
          "description": "The URI of the Email Address",
          "readOnly": true
        }
      }
    },
    "phoneNumberLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The GUID of the Phone Number.",
          "format": "uuid",
          "readOnly": true
        },
        "_link": {
          "type": "string",
          "description": "The URI of the Phone Number.",
          "readOnly": true
        }
      }
    },
    "state": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "The id for the state."
        },
        "name": {
          "type": "string",
          "description": "The name of the State."
        },
        "abbreviation": {
          "type": "string",
          "description": "The 2 character abbreviation for the State.",
          "minLength": 2,
          "maxLength": 2
        },
        "_link": {
          "type": "string",
          "description": "The URI of the State."
        }
      }
    }
  }
}