v4

latestOpenAPI 3.0.22026-07-3188146256.6 KB
Schemas

getJsonSchema

Get formal JSON schema definition draft 2020-12 for the given epilot schema

get/v1/entity/schemas/{slug}/json/schema

Path parameters

slugstring required

URL-friendly identifier for the entity schema

Example:contact

Entity Type

Query parameters

dereferenceboolean

Response

Success

object required

Example response

{
  "$schema": "http://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "_id": {
      "type": "string",
      "format": "uuid",
      "example": "123e4567-e89b-12d3-a456-426614174000"
    },
    "_org": {
      "type": "string",
      "description": "Organization Id the entity belongs to",
      "readOnly": true
    },
    "_owners": {
      "type": "array",
      "readOnly": true,
      "items": {
        "description": "The user / organization owning this entity.\n\nNote: Owner implicitly has access to the entity regardless of ACLs.\n",
        "type": "object",
        "properties": {
          "org_id": {
            "type": "string",
            "example": "123"
          },
          "user_id": {
            "type": "string",
            "example": "123"
          }
        },
        "required": [
          "org_id"
        ]
      }
    },
    "_schema": {
      "readOnly": true,
      "type": "string"
    },
    "_title": {
      "readOnly": true,
      "type": "string"
    },
    "_tags": {
      "type": "array",
      "nullable": true,
      "items": {
        "type": "string"
      }
    },
    "_manifest": {
      "type": "array",
      "description": "Manifest ID used to create/update the entity",
      "items": {
        "type": "string",
        "format": "uuid",
        "example": "123e4567-e89b-12d3-a456-426614174000"
      }
    },
    "_created_at": {
      "readOnly": true,
      "type": "string",
      "format": "date-time"
    },
    "_updated_at": {
      "readOnly": true,
      "type": "string",
      "format": "date-time"
    },
    "_acl": {
      "readOnly": true,
      "type": "object",
      "description": "Access control list (ACL) for an entity. Defines sharing access to external orgs or users.",
      "additionalProperties": true,
      "properties": {
        "view": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "org:456"
          }
        },
        "edit": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "org:456"
          }
        },
        "delete": {
          "type": "array",
          "items": {
            "type": "string",
            "example": "org:456"
          }
        }
      }
    },
    "title": {
      "type": "string",
      "nullable": true,
      "enum": [
        "Dr.",
        "Prof.",
        "Prof. Dr.",
        null
      ]
    },
    "salutation": {
      "type": "string",
      "nullable": true,
      "enum": [
        "Mr.",
        "Ms. / Mrs.",
        "Company",
        "Contact Person",
        "Company/Contact Person",
        "Spouse",
        "Family",
        "Ownership",
        "Assembly",
        "Other",
        null
      ]
    },
    "first_name": {
      "type": "string"
    },
    "last_name": {
      "type": "string"
    },
    "customer_number": {
      "type": "string",
      "nullable": true
    },
    "birthdate": {
      "type": "string",
      "format": "date",
      "nullable": true
    },
    "account": {
      "type": "object",
      "nullable": true,
      "properties": {
        "$relation": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "entity_id": {
                "type": "string",
                "format": "uuid",
                "example": "123e4567-e89b-12d3-a456-426614174000"
              },
              "_tags": {
                "type": "array",
                "nullable": true,
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "entity_id"
            ]
          }
        }
      },
      "additionalProperties": true
    },
    "address": {
      "type": "array",
      "nullable": true,
      "description": "Addresses as a list of object, the element with index 0 is treated as the primary one.\n",
      "items": {
        "type": "object",
        "properties": {
          "street": {
            "type": "string",
            "nullable": true
          },
          "street_number": {
            "type": "string",
            "nullable": true
          },
          "postal_code": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true,
            "enum": [
              "DE",
              "AT",
              "CH",
              null
            ]
          },
          "additional_info": {
            "type": "string",
            "nullable": true
          },
          "_tags": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "_id": {
            "type": "string",
            "example": "xHcOoJCa07eysJ1GaQeSb"
          }
        },
        "required": [
          "street",
          "street_number",
          "postal_code",
          "city",
          "country"
        ]
      }
    },
    "email": {
      "type": "array",
      "nullable": true,
      "description": "Email addresses as a list of object, the element with index 0 is treated as the primary one.\n",
      "items": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "example": "xHcOoJCa07eysJ1GaQeSb"
          },
          "_tags": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "email": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ]
      }
    },
    "phone": {
      "type": "array",
      "description": "Phone numbers as a list of object, the element with index 0 is treated as the primary one.\n",
      "items": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "example": "xHcOoJCa07eysJ1GaQeSb"
          },
          "_tags": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "phone": {
            "type": "string"
          }
        },
        "required": [
          "phone"
        ]
      }
    }
  },
  "required": [
    "first_name",
    "last_name",
    "_id",
    "_org",
    "_owners",
    "_schema",
    "_title",
    "_tags",
    "_created_at",
    "_updated_at",
    "_acl"
  ]
}