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

# Metadata Schema Object

<div class="prose dark:prose-invert custom-html">
  <h2 id="metadata-schema-object">Metadata Schema Object</h2>

  <table>
    <thead>
      <tr>
        <th>Attributes</th>
        <th>Description</th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <td>
          <p>
            id

            <br />

            <code>string</code>
          </p>
        </td>

        <td>
          <p>Unique metadata schema ID.</p>

          <p>
            <strong>Example:</strong>
            ms\_OF36L2rk4EqhdxvZs56IW9iE
          </p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            related\_object

            <br />

            <code>string</code>
          </p>
        </td>

        <td>
          <p>The resource type. There is an infinite number of possibilities for the resource type because you can define custom metadata schemas. Some examples are included here to show you the standard metadata schema resource types.</p>

          <p>
            Available values:
            <code>campaign</code>,
            <code>customer</code>,
            <code>earning\_rule</code>,
            <code>loyalty\_tier</code>,
            <code>order</code>,
            <code>order\_item</code>,
            <code>product</code>,
            <code>promotion\_tier</code>,
            <code>publication</code>,
            <code>redemption</code>,
            <code>reward</code>,
            <code>voucher</code>
          </p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            properties

            <br />

            <code>object</code>
          </p>
        </td>

        <td>
          <p>Contains the metadata definitions. There can be many properties within this object.</p>

          <table>
            <thead>
              <tr>
                <th>Attributes</th>
                <th>Description</th>
              </tr>
            </thead>

            <tbody>
              <tr>
                <td>
                  <p>
                    custom\_property\_name

                    <br />

                    <code>object</code>
                  </p>
                </td>

                <td>
                  <p>
                    Custom property name. This is defined in
                    <strong>Project Settings</strong>

                    >

                    <strong>Metadata Schema</strong>
                    in the Dashboard.
                  </p>

                  <table>
                    <thead>
                      <tr>
                        <th>Attributes</th>
                        <th>Description</th>
                      </tr>
                    </thead>

                    <tbody>
                      <tr>
                        <td>
                          <p>
                            type

                            <br />

                            <code>string</code>
                          </p>
                        </td>

                        <td>
                          <p>
                            Available values:
                            <code>string</code>,
                            <code>number</code>,
                            <code>object</code>,
                            <code>date</code>,
                            <code>datetime</code>,
                            <code>geopoint</code>,
                            <code>boolean</code>,
                            <code>image\_url</code>
                          </p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            array

                            <br />

                            <code>boolean</code>
                          </p>
                        </td>

                        <td>
                          <p>Indicates whether the definition is an array.</p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            optional

                            <br />

                            <code>boolean</code>
                          </p>
                        </td>

                        <td>
                          <p>Indicates whether this definition is optional or not optional for the resource.</p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            objectType

                            <br />

                            <code>string</code>,
                            <code>null</code>
                          </p>
                        </td>

                        <td>
                          <p>Returns the name of the custom resource if the resource was previously defined in the Dashboard as a custom (non-standard) Nested object.</p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            eq

                            <br />

                            <code>array</code>
                          </p>
                        </td>

                        <td>
                          <p>
                            Array of possible values when the setting for
                            <code>is equal to any of</code>
                            in the Dashboard is defined explicitly.
                          </p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            ne

                            <br />

                            <code>array</code>
                          </p>
                        </td>

                        <td>
                          <p>
                            Array of values that are not allowed when the setting for
                            <code>is not equal to any of</code>
                            in the Dashboard is defined explicitly.
                          </p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            lt

                            <br />

                            <code>integer</code>
                          </p>
                        </td>

                        <td>
                          <p>
                            A property of
                            <code>number</code>
                            type must have
                            <code>less than</code>
                            this value.
                          </p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            lte

                            <br />

                            <code>integer</code>
                          </p>
                        </td>

                        <td>
                          <p>
                            A property of
                            <code>number</code>
                            type must be
                            <code>less than or equal</code>
                            to this value.
                          </p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            gt

                            <br />

                            <code>integer</code>
                          </p>
                        </td>

                        <td>
                          <p>
                            A property of
                            <code>number</code>
                            type must be
                            <code>greater than</code>
                            this value.
                          </p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            gte

                            <br />

                            <code>integer</code>
                          </p>
                        </td>

                        <td>
                          <p>
                            A property of
                            <code>number</code>
                            type must be
                            <code>greater than or equal</code>
                            to this value.
                          </p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            deleted

                            <br />

                            <code>boolean</code>
                          </p>
                        </td>

                        <td>
                          <p>Indicates whether the definition was deleted from the schema.</p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            maxLength

                            <br />

                            <code>integer</code>
                          </p>
                        </td>

                        <td>
                          <p>
                            Value for maximum length when the setting for
                            <code>has maximum length of</code>
                            in the Dashboard is defined explicitly.
                          </p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            minLength

                            <br />

                            <code>integer</code>
                          </p>
                        </td>

                        <td>
                          <p>
                            Value indicating minimum length when the setting for
                            <code>has minimum length of</code>
                            in the Dashboard is defined explicitly.
                          </p>
                        </td>
                      </tr>

                      <tr>
                        <td>
                          <p>
                            exactLength

                            <br />

                            <code>integer</code>
                          </p>
                        </td>

                        <td>
                          <p>
                            Value indicating exact length when the setting for
                            <code>has exact length of</code>
                            in the Dashboard is defined explicitly.
                          </p>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                </td>
              </tr>
            </tbody>
          </table>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            allow\_defined\_only

            <br />

            <code>boolean</code>
          </p>
        </td>

        <td>
          <p>
            Restricts the creation of metadata fields when set to
            <code>true</code>.
            In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values.
          </p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            created\_at

            <br />

            <code>string</code>
          </p>
        </td>

        <td>
          <p>Timestamp representing the date and time when the metadata schema was created. The value is shown in the ISO 8601 format.</p>

          <p>
            <strong>Example:</strong>
            2021-12-03T13:33:44.556Z
          </p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            updated\_at

            <br />

            <code>string</code>
          </p>
        </td>

        <td>
          <p>Timestamp representing the date and time when the metadata schema was updated. The value is shown in the ISO 8601 format.</p>

          <p>
            <strong>Example:</strong>
            2022-08-11T08:05:30.695Z
          </p>
        </td>
      </tr>

      <tr>
        <td>
          <p>
            object

            <br />

            <code>string</code>
          </p>
        </td>

        <td>
          <p>The type of the object represented by the JSON. This object stores information about the metadata schema.</p>
        </td>
      </tr>
    </tbody>
  </table>
</div>
