Metafield definitions
List metafield definitions
Returns the company’s metafield definitions, oldest first, with how many standalone metafield records use each one (metafields_count). Filter by owner resource, by pinned, or by a search on name, namespace, key and description.
Requires a company admin credential with the Developer view permission.
GET
/
api
/
v2
/
metafield_definitions
List metafield definitions
curl --request GET \
--url https://api.fluid.app/api/v2/metafield_definitions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/v2/metafield_definitions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/v2/metafield_definitions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/v2/metafield_definitions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/v2/metafield_definitions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fluid.app/api/v2/metafield_definitions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v2/metafield_definitions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"metafield_definitions": [
{
"id": 4812,
"company_id": 1023,
"namespace": "custom",
"key": "tagline",
"name": "Tagline",
"description": "A short line shown under the product title.",
"value_type": "single_line_text_field",
"validation_rules": null,
"owner_resource": "Product",
"pinned": false,
"position": 1,
"locked": false,
"searchable": false,
"translatable": true,
"list_type": false,
"reference_type": false,
"supported_validations": [
"min",
"max",
"choices",
"regex"
],
"validation_description": "Single line text up to 5000 characters",
"category_ids": [],
"metafields_count": 12,
"created_at": "2026-11-16T16:40:58Z",
"updated_at": "2026-11-16T16:40:58Z"
}
],
"meta": {
"request_id": "0ddc4019-1af6-4130-b286-3155bea586b7",
"timestamp": "2026-11-16T16:41:02Z",
"pagination": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"per_page": 20
}
}
}{
"message": "Invalid credentials."
}{
"error": "Not authorized."
}{
"error_message": "Invalid parameters",
"errors": {
"per_page": [
"must be an integer"
]
},
"meta": {
"request_id": "c1c4917b-d565-4b47-b18b-ae34e9bb8cd4",
"timestamp": "2026-11-16T16:41:02Z"
}
}Query Parameters
⌘I
List metafield definitions
curl --request GET \
--url https://api.fluid.app/api/v2/metafield_definitions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fluid.app/api/v2/metafield_definitions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fluid.app/api/v2/metafield_definitions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/v2/metafield_definitions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/v2/metafield_definitions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.fluid.app/api/v2/metafield_definitions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/v2/metafield_definitions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"metafield_definitions": [
{
"id": 4812,
"company_id": 1023,
"namespace": "custom",
"key": "tagline",
"name": "Tagline",
"description": "A short line shown under the product title.",
"value_type": "single_line_text_field",
"validation_rules": null,
"owner_resource": "Product",
"pinned": false,
"position": 1,
"locked": false,
"searchable": false,
"translatable": true,
"list_type": false,
"reference_type": false,
"supported_validations": [
"min",
"max",
"choices",
"regex"
],
"validation_description": "Single line text up to 5000 characters",
"category_ids": [],
"metafields_count": 12,
"created_at": "2026-11-16T16:40:58Z",
"updated_at": "2026-11-16T16:40:58Z"
}
],
"meta": {
"request_id": "0ddc4019-1af6-4130-b286-3155bea586b7",
"timestamp": "2026-11-16T16:41:02Z",
"pagination": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"per_page": 20
}
}
}{
"message": "Invalid credentials."
}{
"error": "Not authorized."
}{
"error_message": "Invalid parameters",
"errors": {
"per_page": [
"must be an integer"
]
},
"meta": {
"request_id": "c1c4917b-d565-4b47-b18b-ae34e9bb8cd4",
"timestamp": "2026-11-16T16:41:02Z"
}
}