Create Order Metafield
API operation: Open the endpoint in Scalar
Use POST /orders/{order_id}/metafields to create an order metafield. The operation is OrderMetafield.register. This POST creates a record. See Extra attributes for metafield values.
OpenAPI reference
Operation: POST /orders/{order_id}/metafields
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
order_id | integer | Yes | — |
Request body fields
| Name | Type | Required |
|---|---|---|
model | any | Yes |
object_id | integer | Yes |
value | any | Yes |
value_type | string | Yes |
Responses
| Code | Description |
|---|---|
| 200 | OK (Envelope) |
| 400 | Bad Request (ErrorResponse) |
| 401 | Unauthorized |
| 404 | Not Found |
| 429 | Too Many Requests (ErrorResponse) |
| 500 | Internal Server Error (ErrorResponse) |
| 503 | Service Unavailable (ErrorResponse) |