curl --request GET \
--url https://{cluster}.voucherify.io/management/v1/projects/{projectId}/metadata-schemas \
--header 'X-Management-Id: <api-key>' \
--header 'X-Management-Token: <api-key>'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "ms_bwBVnq2YHcbsfCMfdqfCi4zl",
"related_object": "Test-MANAPI-custom-schema-01",
"properties": {
"Test-manAPI-01": {
"type": "string",
"array": false,
"optional": true,
"object_type": null,
"eq": [
"Test-01",
"Test-02",
"Test-03",
"Test-04"
]
},
"Test-manAPI-02": {
"type": "number",
"array": false,
"optional": true,
"object_type": null,
"eq": [
1,
2,
3,
4
]
},
"Test-manAPI-03": {
"type": "object",
"array": false,
"optional": true,
"object_type": "unknown"
},
"Test-manAPI-04": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"Value-01",
"Value-02",
"Value-03"
]
}
},
"allow_defined_only": true,
"created_at": "2024-04-18T17:24:46.980Z",
"updated_at": "2024-04-18T18:17:20.108Z",
"object": "metadata_schema"
},
{
"id": "ms_ctw7O05ZLsMb1zFCGMRQ8qnP",
"related_object": "campaign",
"properties": {
"Test-manAPI": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"Test1",
"Test2",
"Test3"
],
"max_length": 5,
"min_length": 2
},
"Test-manAPI-08": {
"type": "number",
"array": false,
"optional": true,
"object_type": null,
"eq": [
105.5
],
"lt": 9.5,
"lte": 10.5
},
"Test-manAPI-09": {
"type": "object",
"array": true,
"optional": false,
"object_type": "Test-MANAPI-custom-schema-01",
"deleted": true
}
},
"allow_defined_only": false,
"created_at": "2024-04-18T17:21:13.555Z",
"updated_at": "2024-04-19T06:43:09.218Z",
"object": "metadata_schema"
},
{
"id": "ms_f0r4hm3ta6a4a5ch3ma",
"related_object": "customer",
"properties": {
"age": {
"type": "number",
"array": false,
"optional": true,
"object_type": null
},
"Test-MANAPI-06": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"Class-01,",
"Class-02",
"Class-03"
]
},
"Test-manAPI-07": {
"type": "string",
"array": false,
"optional": true,
"object_type": null,
"eq": [
"Tick",
"Tack",
"Toe"
]
},
"acquisition_channel": {
"type": "string",
"array": false,
"optional": true,
"object_type": null,
"eq": [
"Portal-01",
"Portal-02",
"Portal-03"
]
},
"customer_life_time_value": {
"type": "number",
"array": false,
"optional": true,
"object_type": null
}
},
"allow_defined_only": false,
"created_at": "2023-08-03T10:37:48.696Z",
"updated_at": "2024-04-18T18:23:58.380Z",
"object": "metadata_schema"
},
{
"id": "ms_f1r5Tm3ta6a4a5ch3ma",
"related_object": "order",
"properties": {
"region": {
"type": "string",
"array": false,
"optional": true,
"object_type": null,
"eq": [
"EU",
"US",
"EMEA",
"APAC"
]
},
"location_id": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"L1",
"L2",
"L3"
]
},
"payment_mean": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"credit-card",
"wire-transfer",
"paypal"
]
},
"booking_end_date": {
"type": "datetime",
"array": false,
"optional": true,
"object_type": null
},
"booking_start_date": {
"type": "datetime",
"array": false,
"optional": true,
"object_type": null
}
},
"allow_defined_only": false,
"created_at": "2023-08-03T10:37:48.662Z",
"updated_at": "2023-08-28T11:24:43.518Z",
"object": "metadata_schema"
},
{
"id": "ms_s3c0N6m3ta6a4a5ch3ma",
"related_object": "product",
"properties": {
"brand": {
"type": "string",
"array": false,
"optional": true,
"object_type": null
},
"vendor": {
"type": "string",
"array": false,
"optional": true,
"object_type": null
},
"category": {
"type": "string",
"array": false,
"optional": true,
"object_type": null
}
},
"allow_defined_only": false,
"created_at": "2023-08-03T10:37:48.670Z",
"updated_at": "2023-09-14T09:30:26.314Z",
"object": "metadata_schema"
},
{
"id": "ms_t4ir0Dm3ta6a4a5ch3ma",
"related_object": "redemption",
"properties": {
"location_id": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"L1",
"L2",
"L3"
]
}
},
"allow_defined_only": null,
"created_at": "2023-08-03T10:37:48.692Z",
"updated_at": null,
"object": "metadata_schema"
}
],
"total": 6
}Lists all metadata schemas available in the project.
๐ Metadata Documentation
Read the Getting Started with Metadata and Metadata Mapping articles to learn how metadata work in Voucherify.
curl --request GET \
--url https://{cluster}.voucherify.io/management/v1/projects/{projectId}/metadata-schemas \
--header 'X-Management-Id: <api-key>' \
--header 'X-Management-Token: <api-key>'{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "ms_bwBVnq2YHcbsfCMfdqfCi4zl",
"related_object": "Test-MANAPI-custom-schema-01",
"properties": {
"Test-manAPI-01": {
"type": "string",
"array": false,
"optional": true,
"object_type": null,
"eq": [
"Test-01",
"Test-02",
"Test-03",
"Test-04"
]
},
"Test-manAPI-02": {
"type": "number",
"array": false,
"optional": true,
"object_type": null,
"eq": [
1,
2,
3,
4
]
},
"Test-manAPI-03": {
"type": "object",
"array": false,
"optional": true,
"object_type": "unknown"
},
"Test-manAPI-04": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"Value-01",
"Value-02",
"Value-03"
]
}
},
"allow_defined_only": true,
"created_at": "2024-04-18T17:24:46.980Z",
"updated_at": "2024-04-18T18:17:20.108Z",
"object": "metadata_schema"
},
{
"id": "ms_ctw7O05ZLsMb1zFCGMRQ8qnP",
"related_object": "campaign",
"properties": {
"Test-manAPI": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"Test1",
"Test2",
"Test3"
],
"max_length": 5,
"min_length": 2
},
"Test-manAPI-08": {
"type": "number",
"array": false,
"optional": true,
"object_type": null,
"eq": [
105.5
],
"lt": 9.5,
"lte": 10.5
},
"Test-manAPI-09": {
"type": "object",
"array": true,
"optional": false,
"object_type": "Test-MANAPI-custom-schema-01",
"deleted": true
}
},
"allow_defined_only": false,
"created_at": "2024-04-18T17:21:13.555Z",
"updated_at": "2024-04-19T06:43:09.218Z",
"object": "metadata_schema"
},
{
"id": "ms_f0r4hm3ta6a4a5ch3ma",
"related_object": "customer",
"properties": {
"age": {
"type": "number",
"array": false,
"optional": true,
"object_type": null
},
"Test-MANAPI-06": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"Class-01,",
"Class-02",
"Class-03"
]
},
"Test-manAPI-07": {
"type": "string",
"array": false,
"optional": true,
"object_type": null,
"eq": [
"Tick",
"Tack",
"Toe"
]
},
"acquisition_channel": {
"type": "string",
"array": false,
"optional": true,
"object_type": null,
"eq": [
"Portal-01",
"Portal-02",
"Portal-03"
]
},
"customer_life_time_value": {
"type": "number",
"array": false,
"optional": true,
"object_type": null
}
},
"allow_defined_only": false,
"created_at": "2023-08-03T10:37:48.696Z",
"updated_at": "2024-04-18T18:23:58.380Z",
"object": "metadata_schema"
},
{
"id": "ms_f1r5Tm3ta6a4a5ch3ma",
"related_object": "order",
"properties": {
"region": {
"type": "string",
"array": false,
"optional": true,
"object_type": null,
"eq": [
"EU",
"US",
"EMEA",
"APAC"
]
},
"location_id": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"L1",
"L2",
"L3"
]
},
"payment_mean": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"credit-card",
"wire-transfer",
"paypal"
]
},
"booking_end_date": {
"type": "datetime",
"array": false,
"optional": true,
"object_type": null
},
"booking_start_date": {
"type": "datetime",
"array": false,
"optional": true,
"object_type": null
}
},
"allow_defined_only": false,
"created_at": "2023-08-03T10:37:48.662Z",
"updated_at": "2023-08-28T11:24:43.518Z",
"object": "metadata_schema"
},
{
"id": "ms_s3c0N6m3ta6a4a5ch3ma",
"related_object": "product",
"properties": {
"brand": {
"type": "string",
"array": false,
"optional": true,
"object_type": null
},
"vendor": {
"type": "string",
"array": false,
"optional": true,
"object_type": null
},
"category": {
"type": "string",
"array": false,
"optional": true,
"object_type": null
}
},
"allow_defined_only": false,
"created_at": "2023-08-03T10:37:48.670Z",
"updated_at": "2023-09-14T09:30:26.314Z",
"object": "metadata_schema"
},
{
"id": "ms_t4ir0Dm3ta6a4a5ch3ma",
"related_object": "redemption",
"properties": {
"location_id": {
"type": "string",
"array": true,
"optional": true,
"object_type": null,
"eq": [
"L1",
"L2",
"L3"
]
}
},
"allow_defined_only": null,
"created_at": "2023-08-03T10:37:48.692Z",
"updated_at": null,
"object": "metadata_schema"
}
],
"total": 6
}Provide the unique identifier of the project.
"proj_TrlkLiH4"
Returns the details about the metadata schemas created in the project.
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.
data 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
Indicates the type of metadata. Note that "geopoint" type is a paid feature.
string, number, object, date, datetime, geopoint, boolean, image_url Indicates if this definition is optional or not for the resource.
Indicates if the definition is an array.
Indicates if the definition has been deleted from the schema.
The name of the custom resource (i.e. a nested object) if the resource has been previously defined. Otherwise, it is null for other types.
Value indicating the minimum length. Available only for the string type.
Value indicating the maximum length. Available only for the string type.
Value indicating the exact length. Available only for the string type.
Array of values that are allowed. Available only for the string and number types.
Adds numbers to the array. The value should be up to two decimal places.
Array of values that are not allowed. Available only for the number type.
Adds number to the array. The value should be up to two decimal places.
A property of the number type must have less than this value. The value should be up to two decimal places.
A property of the number type must be less than or equal to this value. The value should be up to two decimal places.
A property of number type must be greater than this value. The value should be up to two decimal places.
A property of number type must be greater than or equal to this value. The value should be up to two decimal places.
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.
The total number of metadata schema objects.
Was this page helpful?