> ## 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.

# List Metadata Schema Definitions

> Retrieve metadata schema definitions.

>📘 Management API
>
>If you have Management API enabled, you can also use the [List Metadata Schemas](/api-reference/management/list-metadata-schemas) endpoint to list all metadata schemas.



## OpenAPI

````yaml /openapi/metadata-schemas.json get /v1/metadata-schemas
openapi: 3.0.1
info:
  title: Voucherify API - Metadata Schemas
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v1/metadata-schemas:
    get:
      tags:
        - Metadata Schemas
      summary: List Metadata Schema Definitions
      description: >-
        Retrieve metadata schema definitions.


        >📘 Management API

        >

        >If you have Management API enabled, you can also use the [List Metadata
        Schemas](/api-reference/management/list-metadata-schemas) endpoint to
        list all metadata schemas.
      operationId: list-metadata-schemas
      parameters: []
      responses:
        '200':
          description: >-
            Returns an array of metadata schema definitions. The response does
            not include unknown metadata properties in the response, i.e. those
            that have been defined outside of the **Project Settings** >
            **Metadata Schema** definitions. For example, an unknown metadata
            property can be defined in the campaign manager while creating a
            campaign.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataSchemasListResponseBody'
              examples:
                Example:
                  value:
                    object: list
                    data_ref: schemas
                    schemas:
                      - id: ms_yqMHRHH6S1KYIHPmQHealNf4
                        related_object: Payment
                        properties:
                          payment_tax:
                            type: number
                            array: false
                            optional: true
                            objectType: null
                          payment_method:
                            type: string
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: true
                        created_at: '2022-03-07T11:01:01.747Z'
                        updated_at: '2022-03-07T11:01:44.785Z'
                        object: metadata_schema
                      - id: ms_DwUjpX32sY3fJEoQELpS7bN3
                        related_object: campaign
                        properties:
                          Store:
                            type: string
                            array: false
                            deleted: true
                            optional: true
                            objectType: null
                          locale:
                            type: string
                            array: false
                            optional: true
                            objectType: null
                          date_tag:
                            type: date
                            array: false
                            optional: true
                            objectType: null
                          store_names:
                            eq:
                              - Store 1 - New York - Broadway
                              - Store 2 - Florida - Miami
                              - Store 3 - London - Heathrow
                              - Store 4 - Berlin - Alexanderplatz
                            type: string
                            array: false
                            optional: true
                            objectType: null
                          date_time_tag:
                            type: datetime
                            array: false
                            optional: true
                            objectType: null
                          favorite_brands:
                            type: string
                            array: true
                            deleted: true
                            optional: true
                            objectType: null
                          height_customer_number:
                            type: number
                            array: false
                            optional: true
                            objectType: null
                          location_country_string:
                            type: string
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: false
                        created_at: '2021-12-03T13:33:44.556Z'
                        updated_at: '2022-07-26T13:57:42.288Z'
                        object: metadata_schema
                      - id: ms_f0r4hm3ta6a4a5ch3ma
                        related_object: customer
                        properties:
                          birth_date:
                            type: datetime
                            array: false
                            optional: true
                            objectType: null
                          CRM_created_date:
                            type: datetime
                            array: false
                            optional: true
                            objectType: null
                          customer_location:
                            type: geopoint
                            array: false
                            optional: true
                            objectType: null
                          acquisition_channel:
                            eq:
                              - Facebook
                              - Twitter
                              - Website
                            type: string
                            array: false
                            optional: true
                            objectType: null
                          customer_life_time_value:
                            type: number
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: false
                        created_at: '2021-12-03T06:33:45.894Z'
                        updated_at: '2022-07-14T15:15:34.928Z'
                        object: metadata_schema
                      - id: ms_7X7krsG84H6MeNuIaKkb4LXN
                        related_object: earning_rule
                        properties:
                          Type:
                            type: string
                            array: false
                            optional: true
                            minLength: 6
                            objectType: null
                        allow_defined_only: false
                        created_at: '2022-07-27T08:54:07.980Z'
                        updated_at: null
                        object: metadata_schema
                      - id: ms_OF36L2rk4EqhdxvZs56IW9iE
                        related_object: loyalty_tier
                        properties:
                          has_funds:
                            type: boolean
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: false
                        created_at: '2022-03-30T06:22:16.685Z'
                        updated_at: '2022-07-27T08:55:01.628Z'
                        object: metadata_schema
                      - id: ms_f1r5Tm3ta6a4a5ch3ma
                        related_object: order
                        properties:
                          Payment:
                            type: object
                            array: false
                            deleted: true
                            optional: true
                            objectType: Payment
                          day_of_week:
                            type: number
                            array: false
                            optional: true
                            objectType: null
                          location_id:
                            eq:
                              - L1
                              - L2
                              - L3
                            type: string
                            array: true
                            optional: true
                            objectType: null
                          payment_mean:
                            eq:
                              - credit-card
                              - wire-transfer
                              - paypal
                            type: string
                            array: true
                            optional: true
                            objectType: null
                          booking_end_date:
                            type: datetime
                            array: false
                            optional: true
                            objectType: null
                          booking_start_date:
                            type: datetime
                            array: false
                            optional: true
                            objectType: null
                          number_of_store_visits:
                            type: number
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: false
                        created_at: '2021-12-03T06:33:45.798Z'
                        updated_at: '2022-04-20T06:47:10.350Z'
                        object: metadata_schema
                      - id: ms_0qgIlxP7bYb8H59DqpnWBCUN
                        related_object: order_item
                        properties:
                          Size:
                            type: number
                            array: false
                            optional: true
                            objectType: null
                          Color:
                            type: string
                            array: false
                            optional: true
                            objectType: null
                          Thickness:
                            eq:
                              - Thin
                              - Medium
                              - Thick
                            type: string
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: false
                        created_at: '2022-03-11T13:32:55.029Z'
                        updated_at: '2022-05-23T13:46:01.463Z'
                        object: metadata_schema
                      - id: ms_s3c0N6m3ta6a4a5ch3ma
                        related_object: product
                        properties:
                          color:
                            type: string
                            array: true
                            optional: true
                            objectType: null
                          origin:
                            type: string
                            array: false
                            optional: true
                            minLength: 1
                            objectType: null
                          product_location:
                            type: geopoint
                            array: false
                            optional: true
                            objectType: null
                          metadata_attribute_name_with_date_property:
                            type: date
                            array: false
                            optional: true
                            objectType: null
                          metadata_attribute_name_with_number_property:
                            type: number
                            array: false
                            optional: true
                            objectType: null
                          metadata_attribute_name_with_boolean_property:
                            type: boolean
                            array: false
                            optional: true
                            objectType: null
                          metadata_attribute_name_with_datetime_property:
                            type: datetime
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: false
                        created_at: '2021-12-03T06:33:45.880Z'
                        updated_at: '2022-07-14T15:46:47.994Z'
                        object: metadata_schema
                      - id: ms_th8YHt9yFYY1yAA99XOasT5W
                        related_object: promotion_tier
                        properties:
                          has_budget:
                            type: boolean
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: false
                        created_at: '2022-01-24T07:22:21.523Z'
                        updated_at: '2022-07-27T08:54:42.909Z'
                        object: metadata_schema
                      - id: ms_Z7niydc0OpGjDRL4yB40niXn
                        related_object: publication
                        properties:
                          year:
                            type: number
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: false
                        created_at: '2022-03-30T06:23:49.715Z'
                        updated_at: '2022-04-19T10:28:24.568Z'
                        object: metadata_schema
                      - id: ms_t4ir0Dm3ta6a4a5ch3ma
                        related_object: redemption
                        properties:
                          location_id:
                            eq:
                              - L1
                              - L2
                              - L3
                            type: string
                            array: true
                            optional: true
                            objectType: null
                          store_names:
                            eq:
                              - Store 1 - New York - Broadway
                              - Store 2 - Florida - Miami
                              - Store 3 - London - Heathrow
                              - Store 4 - Berlin - Alexanderplatz
                            type: string
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: false
                        created_at: '2021-12-03T06:33:45.890Z'
                        updated_at: '2022-07-26T14:58:24.546Z'
                        object: metadata_schema
                      - id: ms_EnSASZVEIDsZAYa8Z0nG8Rlg
                        related_object: reward
                        properties:
                          Type:
                            type: string
                            array: false
                            optional: true
                            objectType: null
                            exactLength: 4
                        allow_defined_only: false
                        created_at: '2022-07-27T08:53:32.257Z'
                        updated_at: '2022-07-27T08:53:48.542Z'
                        object: metadata_schema
                      - id: ms_xUHvkRBPvVJAlWcTkVzufKx4
                        related_object: voucher
                        properties:
                          unit:
                            type: number
                            array: false
                            optional: true
                            objectType: null
                          Region:
                            type: string
                            array: false
                            optional: true
                            objectType: null
                          Season:
                            eq:
                              - Spring
                              - Summer
                              - Fall
                              - Winter
                            type: string
                            array: false
                            optional: true
                            objectType: null
                          CATEGORY:
                            type: string
                            array: false
                            optional: true
                            objectType: null
                          active_on_calendar_month:
                            eq:
                              - 1
                              - 2
                              - 3
                              - 5
                              - 7
                              - 9
                              - 10
                              - 11
                              - 12
                            type: number
                            array: false
                            optional: true
                            objectType: null
                        allow_defined_only: false
                        created_at: '2022-01-24T07:22:01.281Z'
                        updated_at: '2022-06-22T07:22:09.577Z'
                        object: metadata_schema
                    total: 13
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - metadata-schemas
components:
  schemas:
    MetadataSchemasListResponseBody:
      type: object
      description: Object containing a list of metadata schemas.
      properties:
        object:
          type: string
          default: list
          description: >-
            The type of the object represented by JSON. This object stores
            information about the metadata schemas in a dictionary.
          enum:
            - list
        data_ref:
          type: string
          default: data
          description: >-
            Identifies the name of the attribute that contains the array of
            metadata schema objects.
          enum:
            - schemas
        schemas:
          type: array
          description: >-
            Array of metadata schema objects. The metadata schemas are listed by
            related object properties.
          items:
            $ref: '#/components/schemas/MetadataSchemaDeprecated'
        total:
          type: integer
          description: The total number of metadata schema objects.
      required:
        - object
        - data_ref
        - data
        - total
    MetadataSchemaDeprecated:
      type: object
      description: Object representing a metadata schema.
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: Unique identifier of the metadata schema.
            related_object:
              type: string
              description: >-
                The resource type. You can define custom metadata schemas, which
                have a custom `"related_object"` resource type. The standard
                metadata schemas are: `"campaign"`, `"customer"`,
                `"earning_rule"`, `"loyalty_tier"`, `"order"`, `"order_item"`,
                `"product"`, `"promotion_tier"`, `"publication"`,
                `"redemption"`, `"reward"`, `"voucher"`.
        - type: object
          properties:
            properties:
              type: object
              description: Contains metadata definitions.
              additionalProperties:
                $ref: '#/components/schemas/MetadataSchemaDefinitionDeprecated'
          required:
            - properties
        - type: object
          properties:
            allow_defined_only:
              type: boolean
              nullable: true
              description: >-
                Restricts the creation of metadata fields when set to `true`. It
                indicates whether or not you can create new metadata
                definitions, e.g. in the campaign or publication manager. If set
                to `true`, then only the defined fields are available for
                assigning values.
            created_at:
              type: string
              example: '2021-12-03T13:33:44.556Z'
              description: >-
                Timestamp representing the date and time when the metadata
                schema was created. The value for this parameter is shown in the
                ISO 8601 format.
              format: date-time
            updated_at:
              type: string
              nullable: true
              example: '2022-08-11T08:05:30.695Z'
              description: >-
                Timestamp representing the date and time when the metadata
                schema was updated. The value for this parameter is shown in the
                ISO 8601 format.
              format: date-time
            object:
              type: string
              default: metadata_schema
              description: >-
                The type of the object represented by the JSON. This object
                stores information about the metadata schema.
      required:
        - id
        - related_object
        - properties
        - allow_defined_only
        - created_at
        - updated_at
        - object
    MetadataSchemaDefinitionDeprecated:
      type: object
      title: Metadata Definitions
      description: >-
        Custom definition name. This is also shown in **Project Settings** >
        **Metadata Schema** in the Voucherify Dashboard.
      properties:
        type:
          type: string
          enum:
            - string
            - number
            - object
            - date
            - datetime
            - geopoint
            - boolean
            - image_url
        array:
          type: boolean
          description: Indicates whether the definition is an array.
        optional:
          type: boolean
          description: >-
            Indicates whether this definition is optional or not optional for
            the resource.
        objectType:
          type: string
          nullable: true
          description: >-
            Returns the name of the custom resource if the resource was
            previously defined in the Dashboard as a custom (non-standard)
            Nested object.
        eq:
          type: array
          description: >-
            Array of possible values when the setting for `is equal to any of`
            in the Dashboard is defined explicitly.
          items: {}
        ne:
          type: array
          description: >-
            Array of values that are not allowed when the setting for `is not
            equal to any of` in the Dashboard is defined explicitly.
          items: {}
        lt:
          type: integer
          description: A property of `number` type must have `less than` this value.
        lte:
          type: integer
          description: >-
            A property of `number` type must be `less than or equal` to this
            value.
        gt:
          type: integer
          description: A property of `number` type must be `greater than` this value.
        gte:
          type: integer
          description: >-
            A property of `number` type must be `greater than or equal` to this
            value.
        deleted:
          type: boolean
          description: Indicates whether the definition was deleted from the schema.
        maxLength:
          type: integer
          description: >-
            Value for maximum length when the setting for `has maximum length
            of` in the Dashboard is defined explicitly.
        minLength:
          type: integer
          description: >-
            Value indicating minimum length when the setting for `has minimum
            length of` in the Dashboard is defined explicitly.
        exactLength:
          type: integer
          description: >-
            Value indicating exact length when the setting for `has exact length
            of` in the Dashboard is defined explicitly.
      required:
        - type
        - optional
        - array
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    X-Voucherify-OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.voucherify.io/v1/oauth/token
          scopes:
            api: Gives access to whole server-side API.
            vouchers: >-
              Gives access to all endpoints and methods starting with
              `v1/vouchers`.
            client_api: Gives access to whole client-side API.
            client_vouchers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/vouchers`.
            promotions: >-
              Gives access to all endpoints and methods starting with
              `/v1/promotions`.
            client_promotions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/promotions`
            campaigns: >-
              Gives access to all endpoints and methods starting with
              `v1/campaigns`.
            client_publish: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/publish`.
            exports: >-
              Gives access to all endpoints and methods starting with
              `/v1/exports`.
            publications: >-
              Gives access to all endpoints and methods starting with
              `/v1/publications`.
            client_validate: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validate`.
            validations: >-
              Gives access to all endpoints and methods starting with
              `/v1/validations`.
            client_validations: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validations`.
            qualifications: >-
              Gives access to all endpoints and methods starting with
              `/v1/qualifications`.
            client_qualifications: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/qualifications`.
            client_redeem: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redeem
            redemptions: >-
              Gives access to all endpoints and methods starting with
              `/v1/redemptions`.
            client_redemptions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redemptions`
            customers: >-
              Gives access to all endpoints and methods starting with
              `/v1/customers`.
            client_customers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/customers`.
            orders: >-
              Gives access to all endpoints and methods starting with
              `/v1/orders`.
            products: >-
              Gives access to all endpoints and methods starting with
              `/v1/products`.
            skus: >-
              Gives access to all endpoints and methods starting with
              `/v1/SKUs`.
            validation-rules: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules`.
            validation-rules-assignments: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules-assignments
            segments: >-
              Gives access to all endpoints and methods starting with
              `/v1/segments`.
            events: >-
              Gives access to all endpoints and methods starting with
              `/v1/events`.
            client_events: >-
              Gives access to all endpoints and methods starting with
              `client/v1/events`.
            rewards: >-
              Gives access to all endpoints and methods starting with
              `/v1/rewards`.
            assets: >-
              Gives access to all endpoints and methods starting with
              `/v1/assets`.
            task-results: >-
              Gives access to all endpoints and methods starting with
              `/v1/task-results`.
            loyalties: >-
              Gives access to all endpoints and methods starting with
              `/v1/loyalties`.
            client_consents: >-
              Gives access to all endpoints and methods starting with
              `client/v1/consents`.
            consents: >-
              Gives access to all endpoints and methods starting with
              `/v1/consents`.
            async-actions: >-
              Gives access to all endpoints and methods starting with
              `/v1/async-actions`.
            product-collections: >-
              Gives access to all endpoints and methods starting with
              `/v1/product-collections`.
            categories: >-
              Gives access to all endpoints and methods starting with
              `/v1/categories`.
            metadata-schemas: >-
              Gives access to all endpoints and methods starting with
              `/v1/metadata-schemas`.
            locations: >-
              Gives access to all endpoints and methods starting with
              `/v1/locations`.
            referrals: >-
              Gives access to all endpoints and methods starting with
              `/v1/referrals`.
            trash-bin: >-
              Gives access to all endpoints and methods starting with
              `/v1/trash-bin`.
            templates: >-
              Gives access to all endpoints and methods starting with
              `/v1/templates`.

````