Get order's metafields
GET
/orders/{id}/metafields
const url = 'https://acme.mykreezalid.com/api/v1/orders/1/metafields';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://acme.mykreezalid.com/api/v1/orders/1/metafields \ --header 'Authorization: Basic <credentials>'Lists the metafields attached to an order.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
ID of your order
Responses
Section titled “Responses”The order’s metafields
Media typeapplication/json
object
metafields
Array<object>
A custom value you attach to a resource, identified by its namespace and title.
object
namespace
required
Group the metafield belongs to
string
title
required
Name of the metafield, unique within its namespace
string
value
required
Value of the metafield. Usually a string; it can be returned as a number or a JSON value depending on how the metafield was defined.
string
Example
{ "metafields": [ { "namespace": "erp", "title": "warehouse_code", "value": "WH-42" } ]}No order has this identifier.