---
title: "What is a data type?"
slug: "what-is-a-data-type"
updated: 2024-09-02T16:01:44Z
published: 2024-09-02T16:01:44Z
canonical: "support.lusid.com/what-is-a-data-type"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.lusid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# What is a data type?

LUSID has a set of built-in data types that can be used to describe and constrain [property](/v1/docs/properties) values loaded into LUSID. [Create your own custom data type](/v1/docs/how-do-i-create-a-custom-data-type-and-store-reference-data).

For example, LUSID has a `rating` data type that only allows users to specify values such as AAA or BB into properties of this data type (see the definition of `rating` below). In this way, LUSID guarantees that all data of the same type is consistent and valid at the point it is inserted or updated.

To list the built-in data types, [obtain an API access token](/v1/docs/how-do-i-obtain-and-use-a-short-lived-api-access-token-from-okta) and call the LUSID [ListDataTypes](https://www.lusid.com/docs/api#operation/ListDataTypes) API for your domain as follows:

```powershell
curl -X GET "https://<your-domain>.lusid.com/api/api/datatypes/system?includeSystem=true"
  -H "Authorization: Bearer <your-API-access-token>"
```

For example, the `rating` data type has the following definition:

```json
{
  "values": [
    {
      "href": "https://<your-domain>.lusid.com/api/api/datatypes/system/rating",
      "typeValueRange": "Closed",
      "id": {
        "scope": "system",
        "code": "rating"
      },
      "displayName": "Rating",
      "description": "Example rating data",
      "valueType": "String",
      "acceptableValues": [
        "A",
        "NR",
        "CCCC",
        "B",
        "BB",
        "D",
        "CC",
        "C",
        "AAA",
        "BBB",
        "AA"
      ],
      "unitSchema": "NoUnits",
      "acceptableUnits": [],
      "referenceData": {
        "fieldDefinitions": [],
        "values": []
      }
    }
  ],
  ...
}
```

Note that because `typeValueRange` is `Closed`, users can only enter or load property values from the list of `acceptableValues`.

## A note on value types

A data type itself has a primitive `valueType` such as `String`, `Int`, `Boolean`, `DateTime` and so on. Possible types [are listed here](https://www.lusid.com/docs/api#operation/CreateDataType).

## A note on units

A data type has a `unitSchema` that identifies the unit of measurement of values; this is either `Basic`, `Iso4217Currency` or `NoUnits`. Acceptable units are always text values.
