About Metafield ​
Access scope
Multiple access scopes needed — refer to each endpoint for access scope requirements.
Meta Fields is a fundamental service component of the Genstore platform, providing flexible business metadata management capabilities. Through the Meta Fields service, business systems can achieve dynamic field extension and data value management, ensuring business model scalability.
Core Functions
- Meta Field Definition Management: Enable creation, update, deletion and query of meta fields, supporting field model extension across business domains.
- Metadata Value Management: Provide metadata access, update and batch processing capabilities, ensuring business data consistency.
Use Cases
- Dynamic Field Extension: Business teams can add new properties to existing models through meta field definitions, enabling rapid business model iteration.
- Flexible Data Management: Operations teams can configure and manage various business tags and properties, improving business data management efficiency.
Endpoints
POST
/api/202412/metafields/{domainName}/{bizId}: Create metafield value
PUT
/api/202412/metafields/{domainName}/{bizId}: Update metafield value
DELETE
/api/202412/metafields/{domainName}/{bizId}: Delete metafield value
GET
/api/202412/metafields/count/{domainName}/{bizId}: Get metafield value count
GET
/api/202412/metafields/detail/{domainName}/{bizId}: Get metafield value details
GET
/api/202412/metafields/{domainName}/{bizId}: Get metafield values
Metafield Object ​
The product object.
Properties ​
* SingleLineText - single line text;
* MultiLineText - multiple lines of text;
* Integer - an integer;
* Decimal - decimal;
* MonthDay - month day;
* Date - Date, which is in ISO 8601 format and does not include a time zone.
* DateTime - Date and time, supporting date values in ISO 8601 format and time values in UTC time.
* Weight - weight;
* Size - the size;
* Volume - volume;
* Product - a product;
* Customer - a customer;
* SKU - Product specifications;
* Collection - a collection of goods;
* Page - page; File - file;
* Color - a color;
* Money - the amount of money;
* Url-url;
* Boolean - True or False.
{
"metafield": {
"definitionName": "MyFieldName01",
"code": "MyFieldCode1",
"namespace": "AppleName",
"description": "this is meta field description sample",
"optionMap": "{"search":true}",
"fieldType": "Weight",
"multi": "false",
"schemaRule": "{"min":{"value":2,"unit":"g"},"max":{"value":200,"unit":"kg"}}"
}
}
POST
Create metafield value ​
Create metafield values in batch.
Access scope
Requires ANY of the following access scopes: write_metafields
Endpoint
POST
/api/202412/metafields/{domainName}/{bizId}
Request Params
Response Data
curl -X POST \
https://{shop}.genmystore.com/api/202412/metafields/{domainName}/{bizId}" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"list":[
{
"code":"MyFieldCode1",
"namespace":"AppleName",
"value":"{\"value\": 9,\"unit\": \"kg\"}"
}
]
}'
HTTP/1.1 200 OK
{
"metafields": {
"list": [
{
"code": "MyFieldCode1",
"namespace": "AppleName",
"value": "{\"value\": 9,\"unit\": \"kg\"}"
}
]
}
}
PUT
Update metafield value ​
Update metafield value.
Access scope
Requires ANY of the following access scopes: write_metafields
Endpoint
PUT
/api/202412/metafields/{domainName}/{bizId}
Request Params
Response Data
curl -X PUT \
https://{shop}.genmystore.com/api/202412/metafields/{domainName}/{bizId}" \
-H "X-Genstore-Access-Token: {access_token}" \
-H "Content-Type: application/json" \
-d '{
"code":"MyFieldKey01",
"namespace":"AppleName",
"value":"{\"value\": 9,\"unit\": \"kg\"}"
}'
HTTP/1.1 200 OK
{
"metafields": {
"code": "MyFieldCode1",
"namespace": "AppleName",
"value": "{\"value\": 9,\"unit\": \"kg\"}"
}
}
DELETE
Delete metafield value ​
Delete metafield value.
Access scope
Requires ANY of the following access scopes: write_metafields
Endpoint
DELETE
/api/202412/metafields/{domainName}/{bizId}
Request Params
Response Data
curl -X DELETE \
https://{shop}.genmystore.com/api/202412/metafields/{domainName}/{bizId}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"metafields": {
"code": "MyFieldCode1",
"namespace": "AppleName",
"value": "{\"value\": 9,\"unit\": \"kg\"}"
}
}
GET
Get metafield value count ​
Get metafield value count.
Access scope
Requires ANY of the following access scopes: read_metafields
write_metafields
Endpoint
GET
/api/202412/metafields/count/{domainName}/{bizId}
Request Params
Response Data
curl -X GET \
https://{shop}.genmystore.com/api/202412/metafields/count/{domainName}/{bizId}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"count": "999"
}
GET
Get metafield value details ​
Get metafield value detail.
Access scope
Requires ANY of the following access scopes: read_metafields
write_metafields
Endpoint
GET
/api/202412/metafields/detail/{domainName}/{bizId}
Request Params
Response Data
* SingleLineText - single line text;
* MultiLineText - multiple lines of text;
* Integer - an integer;
* Decimal - decimal;
* MonthDay - month day;
* Date - Date, which is in ISO 8601 format and does not include a time zone.
* DateTime - Date and time, supporting date values in ISO 8601 format and time values in UTC time.
* Weight - weight;
* Size - the size;
* Volume - volume;
* Product - a product;
* Customer - a customer;
* SKU - Product specifications;
* Collection - a collection of goods;
* Page - page; File - file;
* Color - a color;
* Money - the amount of money;
* Url-url;
* Boolean - True or False.
curl -X GET \
https://{shop}.genmystore.com/api/202412/metafields/detail/{domainName}/{bizId}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"metafield": {
"code": "MyFieldKey01",
"definitionName": "MyFieldShowName",
"namespace": "ProductA01",
"bizId": "102744460756584",
"description": "This is my field description",
"value": "hello",
"fieldType": "SingleLineText",
"bizResource": "SingleLineText/Integer/Weight/Customer"
}
}
GET
Get metafield values ​
Get list of metafield values.
Access scope
Requires ANY of the following access scopes: read_metafields
write_metafields
Endpoint
GET
/api/202412/metafields/{domainName}/{bizId}
Request Params
* SingleLineText - single line text;
* MultiLineText - multiple lines of text;
* Integer - an integer;
* Decimal - decimal;
* MonthDay - month day;
* Date - Date, which is in ISO 8601 format and does not include a time zone.
* DateTime - Date and time, supporting date values in ISO 8601 format and time values in UTC time.
* Weight - weight;
* Size - the size;
* Volume - volume;
* Product - a product;
* Customer - a customer;
* SKU - Product specifications;
* Collection - a collection of goods;
* Page - page; File - file;
* Color - a color;
* Money - the amount of money;
* Url-url;
* Boolean - True or False.
Response Data
* SingleLineText - single line text;
* MultiLineText - multiple lines of text;
* Integer - an integer;
* Decimal - decimal;
* MonthDay - month day;
* Date - Date, which is in ISO 8601 format and does not include a time zone.
* DateTime - Date and time, supporting date values in ISO 8601 format and time values in UTC time.
* Weight - weight;
* Size - the size;
* Volume - volume;
* Product - a product;
* Customer - a customer;
* SKU - Product specifications;
* Collection - a collection of goods;
* Page - page; File - file;
* Color - a color;
* Money - the amount of money;
* Url-url;
* Boolean - True or False.
curl -X GET \
https://{shop}.genmystore.com/api/202412/metafields/{domainName}/{bizId}" \
-H "X-Genstore-Access-Token: {access_token}" \
HTTP/1.1 200 OK
{
"metafields": [
{
"code": "MyFieldKey01",
"definitionName": "MyFieldShowName",
"namespace": "ProductA01",
"bizId": "102744460756584",
"description": "This is my field description",
"value": "hello",
"fieldType": "SingleLineText",
"bizResource": "SingleLineText"
}
]
}
About Metafield
Access scope
Multiple access scopes needed — refer to each endpoint for access scope requirements.
Meta Fields is a fundamental service component of the Genstore platform, providing flexible business metadata management capabilities. Through the Meta Fields service, business systems can achieve dynamic field extension and data value management, ensuring business model scalability.
Core Functions
- Meta Field Definition Management: Enable creation, update, deletion and query of meta fields, supporting field model extension across business domains.
- Metadata Value Management: Provide metadata access, update and batch processing capabilities, ensuring business data consistency.
Use Cases
- Dynamic Field Extension: Business teams can add new properties to existing models through meta field definitions, enabling rapid business model iteration.
- Flexible Data Management: Operations teams can configure and manage various business tags and properties, improving business data management efficiency.
Metafield Object
The product object.
Properties
POST
Create metafield value
Create metafield values in batch.
Access scope
Requires ANY of the following access scopes: write_metafields
Endpoint
POST
/api/202412/metafields/{domainName}/{bizId}
PUT
Update metafield value
Update metafield value.
Access scope
Requires ANY of the following access scopes: write_metafields
Endpoint
PUT
/api/202412/metafields/{domainName}/{bizId}
DELETE
Delete metafield value
Delete metafield value.
Access scope
Requires ANY of the following access scopes: write_metafields
Endpoint
DELETE
/api/202412/metafields/{domainName}/{bizId}
GET
Get metafield value count
Get metafield value count.
Access scope
Requires ANY of the following access scopes: read_metafields
write_metafields
Endpoint
GET
/api/202412/metafields/count/{domainName}/{bizId}
GET
Get metafield value details
Get metafield value detail.
Access scope
Requires ANY of the following access scopes: read_metafields
write_metafields
Endpoint
GET
/api/202412/metafields/detail/{domainName}/{bizId}
GET
Get metafield values
Get list of metafield values.
Access scope
Requires ANY of the following access scopes: read_metafields
write_metafields
Endpoint
GET
/api/202412/metafields/{domainName}/{bizId}