B2Base

Bürokratie vereinfachen durch Standards

Benutzer-Werkzeuge

Webseiten-Werkzeuge


schemes:person:contactdetails

Dies ist eine alte Version des Dokuments!


contactdetails

descripton

Das Schema für person:contactdetails enthält folgende Eigenschaften:

  • E-Mail-Adresse: Das Hauptkontaktmittel (erforderlich).
  • Telefonnummern: Eine Liste mit Details zu verschiedenen Telefonnummern, einschließlich Typ (z. B. Mobil, Arbeit).
  • Social-Media-Handles: Optionale Plattformen und Benutzernamen.
  • Webseiten: Eine Liste von Webseiten, jeweils mit einem Typ (z. B. „personal“, „work“, „portfolio“) und der zugehörigen URL.

examples

json notation

{
  "emails": [
    {
      "type": "work",
      "address": "example@work.com"
    },
    {
      "type": "personal",
      "address": "example@personal.com"
    }
  ],
  "phoneNumbers": [
    {
      "type": "mobile",
      "countryCode": "+49",
      "areaCode": "30",
      "number": "123456789"
    },
    {
      "type": "home",
      "countryCode": "+1",
      "areaCode": "212",
      "number": "5551234",
      "extension": "56"
    }
  ],
  "socialMedia": [
    {
      "platform": "Twitter",
      "handle": "@example_user"
    },
    {
      "platform": "LinkedIn",
      "handle": "example-user"
    }
  ],
  "websites": [
    {
      "type": "personal",
      "url": "https://personal.example.com"
    },
    {
      "type": "work",
      "url": "https://work.example.com"
    }
  ]
}

array noatation

$person['contactDetails']['emails'][0]['type'] = "work";
$person['contactDetails']['emails'][0]['address'] = "example@work.com";
$person['contactDetails']['emails'][1]['type'] = "personal";
$person['contactDetails']['emails'][1]['address'] = "example@personal.com";

$person['contactDetails']['phoneNumbers'][0]['type'] = "mobile";
$person['contactDetails']['phoneNumbers'][0]['countryCode'] = "+49";
$person['contactDetails']['phoneNumbers'][0]['areaCode'] = "30";
$person['contactDetails']['phoneNumbers'][0]['number'] = "123456789";

$person['contactDetails']['phoneNumbers'][1]['type'] = "home";
$person['contactDetails']['phoneNumbers'][1]['countryCode'] = "+1";
$person['contactDetails']['phoneNumbers'][1]['areaCode'] = "212";
$person['contactDetails']['phoneNumbers'][1]['number'] = "5551234";
$person['contactDetails']['phoneNumbers'][1]['extension'] = "56";

$person['contactDetails']['socialMedia'][0]['platform'] = "Twitter";
$person['contactDetails']['socialMedia'][0]['handle'] = "@example_user";
$person['contactDetails']['socialMedia'][1]['platform'] = "LinkedIn";
$person['contactDetails']['socialMedia'][1]['handle'] = "example-user";

$person['contactDetails']['websites'][0]['type'] = "personal";
$person['contactDetails']['websites'][0]['url'] = "https://personal.example.com";
$person['contactDetails']['websites'][1]['type'] = "work";
$person['contactDetails']['websites'][1]['url'] = "https://work.example.com";

schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://b2base.eu/doku.php?id=schemes:person:contactdetails",
  "title": "b2base:schemes:person:contactdetails",
  "description": "A schema for representing a person's contact details.",
  "type": "object",
  "properties": {
    "emails": {
      "type": "array",
      "description": "A list of the person's email addresses with optional types.",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of email address, e.g., work, personal.",
            "example": "work"
          },
          "address": {
            "type": "string",
            "format": "email",
            "description": "The email address.",
            "example": "example@work.com"
          }
        },
        "required": ["address"]
      },
      "example": [
        {"type": "work", "address": "example@work.com"},
        {"type": "personal", "address": "example@personal.com"}
      ]
    },
    "phoneNumbers": {
      "type": "array",
      "description": "A list of the person's phone numbers.",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of phone number, e.g., mobile, home, work.",
            "example": "mobile"
          },
          "countryCode": {
            "type": "string",
            "description": "The international country code.",
            "example": "+49"
          },
          "areaCode": {
            "type": "string",
            "description": "The regional or area code.",
            "example": "30"
          },
          "number": {
            "type": "string",
            "description": "The local phone number.",
            "example": "123456789"
          },
          "extension": {
            "type": "string",
            "description": "Optional phone extension.",
            "example": "123"
          }
        },
        "required": ["type", "countryCode", "areaCode", "number"]
      },
      "example": [
        {"type": "mobile", "countryCode": "+49", "areaCode": "30", "number": "123456789"},
        {"type": "home", "countryCode": "+1", "areaCode": "212", "number": "5551234", "extension": "56"}
      ]
    },
    "socialMedia": {
      "type": "array",
      "description": "A list of the person's social media handles.",
      "items": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string",
            "description": "The name of the social media platform.",
            "example": "Twitter"
          },
          "handle": {
            "type": "string",
            "description": "The person's username or handle on the platform.",
            "example": "@example_user"
          }
        },
        "required": ["platform", "handle"]
      },
      "example": [
        {"platform": "Twitter", "handle": "@example_user"},
        {"platform": "LinkedIn", "handle": "example-user"}
      ]
    },
    "websites": {
      "type": "array",
      "description": "A list of the person's websites.",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of website, e.g., personal, work, portfolio.",
            "example": "portfolio"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL of the website.",
            "example": "https://example.com"
          }
        },
        "required": ["url"]
      },
      "example": [
        {"type": "personal", "url": "https://personal.example.com"},
        {"type": "work", "url": "https://work.example.com"}
      ]
    }
  },
  "required": ["emails"]
}
schemes/person/contactdetails.1734086761.txt.gz · Zuletzt geändert: (Externe Bearbeitung)

Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki