List listing metafields
GET
/listings/{id}/metafields
const url = 'https://acme.mykreezalid.com/api/v1/listings/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/listings/1/metafields \ --header 'Authorization: Basic <credentials>'Returns the metafields attached to a listing.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
ID of your listing
Responses
Section titled “Responses”The metafields of the listing
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" } ]}Missing or wrong API credentials
No listing has this identifier