---
agentTools:
  projectIndex: https://financial-cloud.readme.io/llms.txt
---

# Get Schemas

Returns information about how an item in the CRM looks, detailing which fields are required and what validations they have.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Core API",
    "description": "This is the Core API that will allow interaction with data in CRM",
    "version": "0.16.1"
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.glabs.financial-cloud.co.uk/core",
      "description": "GLabs Core API Endpoint"
    },
    {
      "url": "http://localhost:8080",
      "description": "Local API Endpoint"
    }
  ],
  "tags": [
    {
      "name": "schemas",
      "description": "Endpoints related to Schemas"
    }
  ],
  "paths": {
    "/schema": {
      "get": {
        "summary": "Get Schemas",
        "description": "Returns information about how an item in the CRM looks, detailing which fields are required and what validations they have.",
        "operationId": "get_schema",
        "tags": [
          "schemas"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "property",
            "description": "CRM property to get the schema for.",
            "schema": {
              "type": "string",
              "example": "FCCORE_address"
            }
          },
          {
            "in": "query",
            "name": "level",
            "description": "The property level. Some properties are at both customer and account; this parameter allows you to limit to a single level. Must be 'customer' or 'account'",
            "schema": {
              "type": "string",
              "example": "customer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Schema"
                  }
                },
                "example": [
                  {
                    "property": "FCCORE_address",
                    "level": "customer",
                    "displayName": "address",
                    "fields": [
                      {
                        "key": "address1",
                        "label": "Address Line 1",
                        "controlType": "input",
                        "validations": [
                          "ISSTRING"
                        ],
                        "options": null,
                        "required": true
                      },
                      {
                        "key": "status",
                        "label": "Address Status",
                        "controlType": "multiselect",
                        "validations": null,
                        "options": [
                          {
                            "key": "Correspondence",
                            "value": "correspondence"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "example": {
                  "message": "No data found"
                },
                "schema": {
                  "$ref": "#/components/schemas/GenericMessage"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenericMessage"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-access-token",
        "description": "Authentication mechanism where a unique key (API key) is sent in the header of the HTTP request. This key is used to authenticate the requester of the API, ensuring they have the appropriate permissions to access the resource."
      }
    },
    "schemas": {
      "GenericMessage": {
        "title": "Message",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "A generic message string."
          }
        }
      },
      "Schema": {
        "title": "System Table Schema",
        "description": "Schema defining the structure of a system table, including properties, levels, display names, fields, and other related attributes.",
        "type": "object",
        "example": {
          "property": "FCCORE_address",
          "level": "customer",
          "displayName": "address",
          "fields": [
            {
              "key": "address1",
              "label": "Address Line 1",
              "controlType": "input",
              "validations": [
                "ISSTRING"
              ],
              "options": null,
              "required": true
            },
            {
              "key": "status",
              "label": "Address Status",
              "controlType": "multiselect",
              "validations": null,
              "options": [
                {
                  "key": "Correspondence",
                  "value": "correspondence"
                }
              ]
            }
          ]
        },
        "properties": {
          "property": {
            "type": "string",
            "description": "The property or attribute name of the system table.",
            "example": "FCCORE_address"
          },
          "level": {
            "type": "string",
            "description": "The level of the property",
            "enum": [
              "customer",
              "account"
            ],
            "example": "customer"
          },
          "displayName": {
            "type": "string",
            "description": "A user-friendly name to be displayed for the property.",
            "example": "Address"
          },
          "fields": {
            "type": "array",
            "description": "An array of fields associated with the property.",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Unique identifier for the field.",
                  "example": "addressline1"
                },
                "label": {
                  "type": "string",
                  "description": "A label for the field.",
                  "example": "Address Line 1"
                },
                "controlType": {
                  "type": "string",
                  "description": "Type of control or UI element associated with the field (e.g., textbox, dropdown).",
                  "example": "textbox"
                },
                "required": {
                  "type": "boolean",
                  "description": "Indicates if the field is mandatory.",
                  "example": true
                },
                "validations": {
                  "type": "array",
                  "description": "List of validation rules or criteria for the field.",
                  "nullable": true,
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "ISSTRING"
                  ]
                },
                "options": {
                  "type": "array",
                  "description": "Possible options or values for the field, applicable for dropdowns or select controls.",
                  "nullable": true,
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "description": "Unique key for the option."
                      },
                      "value": {
                        "type": "string",
                        "description": "Display value for the option."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 100,
      "1": 255,
      "2": 2,
      "3": 38,
      "4": 2,
      "5": 3,
      "6": 39,
      "7": 8,
      "8": 155,
      "9": 85,
      "10": 144,
      "11": 139
    }
  }
}
```