{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/orla-finance/json-schema/orla-finance-contact-out-schema.json",
  "title": "ContactOut",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/orla-finance-openapi.json#/components/schemas/ContactOut",
  "properties": {
    "address": {
      "default": "",
      "title": "Address",
      "type": "string"
    },
    "addresses": {
      "items": {
        "$ref": "#/$defs/ContactAddressOut"
      },
      "title": "Addresses",
      "type": "array"
    },
    "billing_email": {
      "default": "",
      "title": "Billing Email",
      "type": "string"
    },
    "cc_emails": {
      "items": {
        "type": "string"
      },
      "title": "Cc Emails",
      "type": "array"
    },
    "city": {
      "default": "",
      "title": "City",
      "type": "string"
    },
    "collection_tone": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Collection Tone"
    },
    "compliance": {
      "title": "Compliance",
      "type": "string"
    },
    "country": {
      "default": "",
      "title": "Country",
      "type": "string"
    },
    "email": {
      "default": "",
      "title": "Email",
      "type": "string"
    },
    "id": {
      "format": "uuid",
      "title": "Id",
      "type": "string"
    },
    "identity_id": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Identity Id"
    },
    "kind": {
      "anyOf": [
        {
          "$ref": "#/$defs/ContactKind"
        },
        {
          "type": "string"
        }
      ],
      "title": "Kind"
    },
    "last_paid_on": {
      "anyOf": [
        {
          "format": "date",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Paid On"
    },
    "last_paid_usd": {
      "anyOf": [
        {
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Paid Usd"
    },
    "name": {
      "title": "Name",
      "type": "string"
    },
    "note": {
      "title": "Note",
      "type": "string"
    },
    "number_prefix": {
      "default": "",
      "title": "Number Prefix",
      "type": "string"
    },
    "phone": {
      "default": "",
      "title": "Phone",
      "type": "string"
    },
    "postcode": {
      "default": "",
      "title": "Postcode",
      "type": "string"
    },
    "reg_number": {
      "default": "",
      "title": "Reg Number",
      "type": "string"
    },
    "requisites_held_by": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/HeldContractOut"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Requisites Held By"
    },
    "requisites_pending": {
      "anyOf": [
        {
          "format": "uuid",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Requisites Pending"
    },
    "requisites_waiting": {
      "anyOf": [
        {
          "$ref": "#/$defs/RequisitesWaitingOut"
        },
        {
          "type": "null"
        }
      ]
    },
    "screening": {
      "anyOf": [
        {
          "$ref": "#/$defs/CounterpartyScreeningSummary"
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "default": "",
      "title": "State",
      "type": "string"
    },
    "street": {
      "default": "",
      "title": "Street",
      "type": "string"
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "title": "Tags",
      "type": "array"
    },
    "tax_id": {
      "default": "",
      "title": "Tax Id",
      "type": "string"
    },
    "tax_id_expected_format": {
      "default": "",
      "title": "Tax Id Expected Format",
      "type": "string"
    },
    "whitelist_reset": {
      "default": false,
      "title": "Whitelist Reset",
      "type": "boolean"
    },
    "whitelisted": {
      "title": "Whitelisted",
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "name",
    "note",
    "kind",
    "whitelisted",
    "compliance",
    "addresses"
  ],
  "type": "object",
  "$defs": {
    "ContactAddressOut": {
      "properties": {
        "address": {
          "title": "Address",
          "type": "string"
        },
        "chain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Chain"
        },
        "confirmed_at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Confirmed At"
        },
        "details": {
          "default": "",
          "title": "Details",
          "type": "string"
        },
        "id": {
          "format": "uuid",
          "title": "Id",
          "type": "string"
        },
        "is_primary": {
          "default": false,
          "title": "Is Primary",
          "type": "boolean"
        },
        "label": {
          "title": "Label",
          "type": "string"
        },
        "network": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Network"
        },
        "requisites": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requisites"
        }
      },
      "required": [
        "id",
        "label",
        "address",
        "chain"
      ],
      "title": "ContactAddressOut",
      "type": "object"
    },
    "ContactKind": {
      "description": "A person or a business (`policy_vocab.CONTACT_KINDS`, held equal by `test_schema_vocabularies`).",
      "enum": [
        "person",
        "business"
      ],
      "title": "ContactKind",
      "type": "string"
    },
    "CounterpartyScreeningSummary": {
      "description": "The one-line verdict that rides on `ContactOut` for the card and the phone: enough to draw the traffic light, not the whole record.",
      "properties": {
        "checked_at": {
          "format": "date-time",
          "title": "Checked At",
          "type": "string"
        },
        "hits_more": {
          "default": 0,
          "title": "Hits More",
          "type": "integer"
        },
        "hits_open": {
          "title": "Hits Open",
          "type": "integer"
        },
        "registry_checked": {
          "title": "Registry Checked",
          "type": "boolean"
        },
        "registry_found": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Registry Found"
        },
        "verdict": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Verdict"
        }
      },
      "required": [
        "verdict",
        "checked_at",
        "hits_open",
        "registry_checked"
      ],
      "title": "CounterpartyScreeningSummary",
      "type": "object"
    },
    "HeldContractOut": {
      "description": "A signed contract that holds a client's details (con2).",
      "properties": {
        "id": {
          "anyOf": [
            {
              "format": "uuid",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Id"
        },
        "title": {
          "default": "",
          "title": "Title",
          "type": "string"
        }
      },
      "title": "HeldContractOut",
      "type": "object"
    },
    "PendingRailOut": {
      "description": "A rail a change waiting for review would bring (`contact_requisites_waiting`).",
      "properties": {
        "address": {
          "default": "",
          "title": "Address",
          "type": "string"
        },
        "chain": {
          "default": "",
          "title": "Chain",
          "type": "string"
        },
        "details": {
          "default": "",
          "title": "Details",
          "type": "string"
        },
        "label": {
          "default": "",
          "title": "Label",
          "type": "string"
        },
        "network": {
          "default": "",
          "title": "Network",
          "type": "string"
        },
        "requisites": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requisites"
        }
      },
      "title": "PendingRailOut",
      "type": "object"
    },
    "RequisitesWaitingOut": {
      "description": "The open review of a change of this contact's rails, as the card shows it.",
      "properties": {
        "deciders": {
          "items": {
            "type": "string"
          },
          "title": "Deciders",
          "type": "array"
        },
        "decision_id": {
          "format": "uuid",
          "title": "Decision Id",
          "type": "string"
        },
        "how": {
          "title": "How",
          "type": "string"
        },
        "rails": {
          "items": {
            "$ref": "#/$defs/PendingRailOut"
          },
          "title": "Rails",
          "type": "array"
        }
      },
      "required": [
        "decision_id",
        "how"
      ],
      "title": "RequisitesWaitingOut",
      "type": "object"
    }
  }
}