---
title: "Create specific metafield definition"
method: POST
path: "/metafield_definitions/orders"
tags: ["Metafield Definitions"]
---

# Create specific metafield definition

`POST /metafield_definitions/orders`

## Request

- Base URL: `https://open.shopline.io/v1`
- URL: `https://open.shopline.io/v1/metafield_definitions/orders`
- Auth: HTTP bearer

To create metafield definition attached to orders

## Request body

- object
  - `namespace` Namespace (unresolved $ref)
  - `key` Key (unresolved $ref)
  - `name` Name (unresolved $ref)
  - `description` Description (unresolved $ref)
  - `field_type` FieldType (unresolved $ref)

## Response `200`

OK

- MetafieldDefinition
  - `id` string: Metafield definition ID
  - `namespace` Namespace (unresolved $ref)
  - `key` Key (unresolved $ref)
  - `name` string: Name
  - `description` string: description
  - `field_type` FieldType (unresolved $ref)
  - `merchant_id` string: Merchant ID
  - `resource_type` 'product' | 'merchant' | 'customer' | 'order' | 'order_item' | 'cart_item': Resource type of the metafield definition
  - `metafield_type` 'merchant' | 'app': Type of metafield definition
  - `created_at` string
  - `updated_at` string

## Changes

- **2026-11-03** `d2518391b149`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/shoplineapp/apis/shopline-open-api/changes/metafield_definitions/orders/post.md)

---

[API](https://skmtc.dev/shoplineapp/apis/shopline-open-api.md) - [All operations](https://skmtc.dev/shoplineapp/apis/shopline-open-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shoplineapp/apis/shopline-open-api/revisions/d2518391b149?raw)
