View Categories

Shopify Native Actions – Meta Fields Actions

2 min read

In this section, we will talk about the “Meta Fields” related actions. ihakimi support below customer related actions:

  • Create Meta Field
  • Update Meta Field
  • Get Meta Field Information
  • Search Meta Fields
  • Delete Meta Field

Now, let’s go over these actions one by one.

Create Metafield

This action is used to create a metafield for a resource such as customer, draft order, order , product etc.

Input

Response Payload

{
“metafield”: {
“id”: 20794390872130,
“namespace”: “test metafield”,
“key”: “test_1”,
“value”: “test”,
“value_type”: “string”,
“description”: “This is a test metafield”,
“owner_id”: 932223320130,
“created_at”: “2023-04-07T05:19:02-04:00”,
“updated_at”: “2023-04-07T05:19:02-04:00”,
“owner_resource”: “draft_order”,
“type”: “single_line_text_field”,
“admin_graphql_api_id”: “gid://shopify/Metafield/20794390872130”
}
}

Update Metafield

This action is used to update the metafield

Input

Resource Payload

{
“metafield”: {
“value”: “test1”,
“value_type”: “string”,
“owner_id”: 932223320130,
“namespace”: “test metafield”,
“key”: “test_1”,
“id”: 20794390872130,
“description”: “This is a test metafield”,
“created_at”: “2023-04-07T05:19:02-04:00”,
“updated_at”: “2023-04-07T05:43:48-04:00”,
“owner_resource”: “draft_order”,
“type”: “single_line_text_field”,
“admin_graphql_api_id”: “gid://shopify/Metafield/20794390872130”
}
}

Get Metafield Info

This action is used to bring up information regarding a particular metafield using metafield and resource ids.

Input

Response Payload

{
“metafield”: {
“id”: 20794390872130,
“namespace”: “test metafield”,
“key”: “test_1”,
“value”: “test1”,
“description”: “This is a test metafield”,
“owner_id”: 932223320130,
“owner_resource”: “draft_order”,
“type”: “single_line_text_field”
}
}

Search Metafields

This action is used to search for metafields associated with a resource.

Input

Response Payload

{
“metafields”: [
{
“id”: 20794390872130,
“namespace”: “test metafield”,
“key”: “test_1”,
“value”: “test1”,
“description”: “This is a test metafield”,
“owner_id”: 932223320130,
“owner_resource”: “draft_order”,
“type”: “single_line_text_field”
}
]
}

Delete Metafields

This action is used to delete metafields using the metafield Id and resource Id

Input

Response Payload

[
]

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top