GET
/
v1
/
custom-fields
/
{id}
Typescript (SDK)
import { Polar } from "@polar-sh/sdk";

const polar = new Polar({
  accessToken: process.env["POLAR_ACCESS_TOKEN"] ?? "",
});

async function run() {
  const result = await polar.customFields.get({
    id: "<value>",
  });

  console.log(result);
}

run();
{
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "metadata": {},
  "type": "<string>",
  "slug": "<string>",
  "name": "<string>",
  "organization_id": "1dbfc517-0bbf-4301-9ba8-555ca42b9737",
  "properties": {
    "form_label": "<string>",
    "form_help_text": "<string>",
    "form_placeholder": "<string>",
    "textarea": true,
    "min_length": 1,
    "max_length": 1
  }
}

Authorizations

Authorization
string
header
required

You can generate an Organization Access Token from your organization's settings.

Path Parameters

id
string<uuid4>
required

The custom field ID.

Response

Successful Response

Schema for a custom field of type text.

created_at
string<date-time>
required

Creation timestamp of the object.

modified_at
string<date-time> | null
required

Last modification timestamp of the object.

id
string<uuid4>
required

The ID of the object.

metadata
object
required
type
string
required
Allowed value: "text"
slug
string
required

Identifier of the custom field. It'll be used as key when storing the value.

name
string
required

Name of the custom field.

organization_id
string<uuid4>
required

The ID of the organization owning the custom field.

Examples:

"1dbfc517-0bbf-4301-9ba8-555ca42b9737"

properties
object
required