GET
/
v1
/
custom-fields
/
{id}
package main

import(
	"context"
	"os"
	polargo "github.com/polarsource/polar-go"
	"log"
)

func main() {
    ctx := context.Background()
    
    s := polargo.New(
        polargo.WithSecurity(os.Getenv("POLAR_ACCESS_TOKEN")),
    )

    res, err := s.CustomFields.Get(ctx, "<value>")
    if err != nil {
        log.Fatal(err)
    }
    if res.CustomField != nil {
        // handle response
    }
}
{
  "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": "<string>",
  "properties": {
    "form_label": "<string>",
    "form_help_text": "<string>",
    "form_placeholder": "<string>",
    "textarea": true,
    "min_length": 1,
    "max_length": 1
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The custom field ID.

Response

200
application/json
Successful Response

Schema for a custom field of type text.

created_at
string
required

Creation timestamp of the object.

modified_at
string | null
required

Last modification timestamp of the object.

id
string
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
required

The ID of the organization owning the custom field.

properties
object
required