Skip to main content
GET
/
v1
/
metadata-schemas
List Metadata Schemas
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/metadata-schemas \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
  "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
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Response

200 - application/json

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.

Object containing a list of metadata schemas.

object
enum<string>
default:list
required

The type of the object represented by JSON. This object stores information about the metadata schemas in a dictionary.

Available options:
list
data_ref
enum<string>
default:data
required

Identifies the name of the attribute that contains the array of metadata schema objects.

Available options:
schemas
total
integer
required

The total number of metadata schema objects.

schemas
object[]

Array of metadata schema objects. The metadata schemas are listed by related object properties.

I