Get Metadata Schema
curl --request GET \
--url https://{cluster}.voucherify.io/management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} \
--header 'X-Management-Id: <api-key>' \
--header 'X-Management-Token: <api-key>'{
"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"
}{
"code": 401,
"message": "Unauthorized",
"key": "unauthorized"
}{
"code": 402,
"message": "Payment required",
"details": "Your current plan does not include a feature required to perform this operation.",
"key": "missing_required_feature"
}{
"code": 404,
"message": "Resource not found",
"details": "Cannot find project with id proj_2F3txY7"
}Get Metadata Schema
Retrieves a metadata schema.
Metadata Documentation
Read the Getting Started with Metadata and Metadata Mapping articles to learn how metadata work in Voucherify.
GET
/
management
/
v1
/
projects
/
{projectId}
/
metadata-schemas
/
{metadataSchemaId}
Get Metadata Schema
curl --request GET \
--url https://{cluster}.voucherify.io/management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId} \
--header 'X-Management-Id: <api-key>' \
--header 'X-Management-Token: <api-key>'{
"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"
}{
"code": 401,
"message": "Unauthorized",
"key": "unauthorized"
}{
"code": 402,
"message": "Payment required",
"details": "Your current plan does not include a feature required to perform this operation.",
"key": "missing_required_feature"
}{
"code": 404,
"message": "Resource not found",
"details": "Cannot find project with id proj_2F3txY7"
}Path Parameters
Response
Returns the metadata schema.
Response body schema for GET management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}.
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".

