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
}Retrieve metadata schema definitions.
๐ Management API
If you have Management API enabled, you can also use the List Metadata Schemas endpoint to list all 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
}The access token received from the authorization server in the OAuth 2.0 flow.
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.
The type of the object represented by JSON. This object stores information about the metadata schemas in a dictionary.
list Identifies the name of the attribute that contains the array of metadata schema objects.
schemas The total number of metadata schema objects.
Array of metadata schema objects. The metadata schemas are listed by related object properties.
Show child attributes
Unique identifier of the metadata schema.
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".
Contains metadata definitions.
Show child attributes
Custom definition name. This is also shown in Project Settings > Metadata Schema in the Voucherify Dashboard.
Show child attributes
string, number, object, date, datetime, geopoint, boolean, image_url Indicates whether the definition is an array.
Indicates whether this definition is optional or not optional for the resource.
Returns the name of the custom resource if the resource was previously defined in the Dashboard as a custom (non-standard) Nested object.
Array of possible values when the setting for is equal to any of in the Dashboard is defined explicitly.
Array of values that are not allowed when the setting for is not equal to any of in the Dashboard is defined explicitly.
A property of number type must have less than this value.
A property of number type must be less than or equal to this value.
A property of number type must be greater than this value.
A property of number type must be greater than or equal to this value.
Indicates whether the definition was deleted from the schema.
Value for maximum length when the setting for has maximum length of in the Dashboard is defined explicitly.
Value indicating minimum length when the setting for has minimum length of in the Dashboard is defined explicitly.
Value indicating exact length when the setting for has exact length of in the Dashboard is defined explicitly.
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.
Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.
"2021-12-03T13:33:44.556Z"
Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.
"2022-08-11T08:05:30.695Z"
The type of the object represented by the JSON. This object stores information about the metadata schema.
Was this page helpful?