Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/recurly:recurly-custom-field-definition-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Recurly Custom Field Definition API
version: v2021-02-25
description: 'Operations tagged Custom Field Definition across 2 of this provider''s published API definitions: recurly-v3-v2021-02-25-api.yaml, recurly-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://v3.recurly.com
- url: https://v3.eu.recurly.com
security:
- api_key: []
tags:
- name: Custom Field Definition
description: Describes the fields that can be used as custom fields on accounts, items, line-items (one time charges), plans, or subscriptions.
paths:
/custom_field_definitions:
get:
tags:
- Custom Field Definition
operationId: list_custom_field_definitions
summary: List a site's custom field definitions
description: See the Pagination Guide to learn how to use pagination in the API and Client Libraries.
parameters:
- $ref: '#/components/parameters/accept_header'
- $ref: '#/components/parameters/ids'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/order'
- $ref: '#/components/parameters/sort_dates'
- $ref: '#/components/parameters/filter_begin_time'
- $ref: '#/components/parameters/filter_end_time'
- name: related_type
in: query
description: Filter by related type.
schema:
$ref: '#/components/schemas/RelatedTypeEnum'
responses:
'200':
description: A list of the site's custom field definitions.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomFieldDefinitionList'
'400':
description: Invalid or unpermitted parameter.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Incorrect site ID.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-code-samples:
- lang: Node.js
source: "const definitions = client.listCustomFieldDefinitions({ params: { limit: 200 } })\n\nfor await (const definition of definitions.each()) {\n console.log(definition.displayName)\n}\n"
- lang: Python
source: "params = {\"limit\": 200}\ncustom_fields = client.list_custom_field_definitions(params=params).items()\nfor custom_field in custom_fields:\n print(custom_field.name)\n"
- lang: .NET
source: "var optionalParams = new ListCustomFieldDefinitionsParams()\n{\n Limit = 200\n};\nvar fields = client.ListCustomFieldDefinitions(optionalParams);\nforeach(CustomFieldDefinition def in fields)\n{\n Console.WriteLine(def.DisplayName);\n}\n"
- lang: Ruby
source: "params = {\n limit: 200\n}\ncustom_fields = @client.list_custom_field_definitions(params: params)\ncustom_fields.each do |field|\n puts \"CustomFieldDefinition: #{field.name}\"\nend\n"
- lang: Java
source: "ListCustomFieldDefinitionsParams params = new ListCustomFieldDefinitionsParams();\nparams.setLimit(200); // Pull 200 records at a time\nfinal Pager<CustomFieldDefinition> fields = client.listCustomFieldDefinitions(params);\n\nfor (CustomFieldDefinition field : fields) {\n System.out.println(field.getDisplayName());\n}\n"
- lang: PHP
source: "$options = [\n 'params' => [\n 'limit' => 200\n ]\n];\n$custom_field_definitions = $client->listCustomFieldDefinitions($options);\n\nforeach($custom_field_definitions as $definition) {\n echo 'Custom Field Definition: ' . $definition->getName() . PHP_EOL;\n}\n"
- lang: Go
source: "listParams := &recurly.ListCustomFieldDefinitionsParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\ncustomFieldDefinitions, err := client.ListCustomFieldDefinitions(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor customFieldDefinitions.HasMore() {\n\terr := customFieldDefinitions.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, definition := range customFieldDefinitions.Data() {\n\t\tfmt.Printf(\"Custom Field Definition %3d: %s\\n\",\n\t\t\ti,\n\t\t\tdefinition.Id,\n\t\t)\n\t}\n}"
x-readme:
code-samples:
- language: node
code: "const definitions = client.listCustomFieldDefinitions({ params: { limit: 200 } })\n\nfor await (const definition of definitions.each()) {\n console.log(definition.displayName)\n}\n"
name: Node.js
- language: python
code: "params = {\"limit\": 200}\ncustom_fields = client.list_custom_field_definitions(params=params).items()\nfor custom_field in custom_fields:\n print(custom_field.name)\n"
name: Python
- language: csharp
code: "var optionalParams = new ListCustomFieldDefinitionsParams()\n{\n Limit = 200\n};\nvar fields = client.ListCustomFieldDefinitions(optionalParams);\nforeach(CustomFieldDefinition def in fields)\n{\n Console.WriteLine(def.DisplayName);\n}\n"
name: .NET
- language: ruby
code: "params = {\n limit: 200\n}\ncustom_fields = @client.list_custom_field_definitions(params: params)\ncustom_fields.each do |field|\n puts \"CustomFieldDefinition: #{field.name}\"\nend\n"
name: Ruby
- language: java
code: "ListCustomFieldDefinitionsParams params = new ListCustomFieldDefinitionsParams();\nparams.setLimit(200); // Pull 200 records at a time\nfinal Pager<CustomFieldDefinition> fields = client.listCustomFieldDefinitions(params);\n\nfor (CustomFieldDefinition field : fields) {\n System.out.println(field.getDisplayName());\n}\n"
name: Java
- language: php
code: "$options = [\n 'params' => [\n 'limit' => 200\n ]\n];\n$custom_field_definitions = $client->listCustomFieldDefinitions($options);\n\nforeach($custom_field_definitions as $definition) {\n echo 'Custom Field Definition: ' . $definition->getName() . PHP_EOL;\n}\n"
name: PHP
- language: go
code: "listParams := &recurly.ListCustomFieldDefinitionsParams{\n\tSort: recurly.String(\"created_at\"),\n\tOrder: recurly.String(\"desc\"),\n\tLimit: recurly.Int(200),\n}\ncustomFieldDefinitions, err := client.ListCustomFieldDefinitions(listParams)\nif err != nil {\n\tfmt.Println(\"Unexpected error: %v\", err)\n\treturn\n}\n\nfor customFieldDefinitions.HasMore() {\n\terr := customFieldDefinitions.Fetch()\n\tif e, ok := err.(*recurly.Error); ok {\n\t\tfmt.Printf(\"Failed to retrieve next page: %v\", e)\n\t\tbreak\n\t}\n\tfor i, definition := range customFieldDefinitions.Data() {\n\t\tfmt.Printf(\"Custom Field Definition %3d: %s\\n\",\n\t\t\ti,\n\t\t\tdefinition.Id,\n\t\t)\n\t}\n}"
name: Go
servers:
- url: https://v3.recurly.com
- url: https://v3.eu.recurly.com
/custom_field_definitions/{custom_field_definition_id}:
get:
tags:
- Custom Field Definition
operationId: get_custom_field_definition
summary: Fetch an custom field definition
parameters:
- $ref: '#/components/parameters/accept_header'
- $ref: '#/components/parameters/custom_field_definition_id'
responses:
'200':
description: A custom field definition.
content:
application/json:
schema:
$ref: '#/components/schemas/CustomFieldDefinition'
'404':
description: Incorrect site or custom field definition ID.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
x-code-samples:
- lang: Node.js
source: "try {\n const definition = await client.getCustomFieldDefinition(definitionId)\n console.log('Fetched custom field definition: ', definition.displayName)\n} catch (err) {\n if (err instanceof recurly.errors.NotFoundError) {\n // If the request was not found, you may want to alert the user or\n // just return null\n console.log('Resource Not Found')\n } else {\n // If we don't know what to do with the err, we should\n // probably re-raise and let our web framework and logger handle it\n console.log('Unknown Error: ', err)\n }\n}\n"
- lang: Python
source: "try:\n custom_field_definition = client.get_custom_field_definition(custom_field_definition_id)\n print(\"Custom Field Definition %s\" % custom_field_definition)\nexcept recurly.errors.NotFoundError as e:\n print(\"Invoice not found\")\n"
- lang: .NET
source: "try\n{\n CustomFieldDefinition definition = client.GetCustomFieldDefinition(definitionId);\n Console.WriteLine($\"Fetched custom field definition {definition.DisplayName}\");\n}\ncatch (Recurly.Errors.NotFound ex)\n{\n // If the resource was not found\n // we may want to alert the user or just return null\n Console.WriteLine($\"Resource Not Found: {ex.Error.Message}\");\n}\ncatch (Recurly.Errors.ApiError ex)\n{\n // Use ApiError to catch a generic error from the API\n Console.WriteLine($\"Unexpected Recurly Error: {ex.Error.Message}\");\n}\n"
- lang: Ruby
source: "begin\n custom_field_definition = @client.get_custom_field_definition(\n custom_field_definition_id: custom_field_definition_id\n )\n puts \"Got Custom Field Definition #{custom_field_definition}\"\nrescue Recurly::Errors::NotFoundError\n # If the resource was not found, you may want to alert the user or\n # just return nil\n puts \"Resource Not Found\"\nend\n"
- lang: Java
source: "try {\n final CustomFieldDefinition definition = client.getCustomFieldDefinition(definitionId);\n System.out.println(\"Fetched custom field definition \" + definition.getDisplayName());\n} catch (NotFoundException e) {\n // If the resource was not found\n // we may want to alert the user or just return null\n System.out.println(\"Resource Not Found: \" + e.getError().getMessage());\n} catch (ApiException e) {\n // Use ApiException to catch a generic error from the API\n System.out.println(\"Unexpected Recurly Error: \" + e.getError().getMessage());\n}\n"
- lang: PHP
source: "try {\n $custom_field_def = $client->getCustomFieldDefinition($definition_id);\n\n echo 'Got CustomFieldDefinition:' . PHP_EOL;\n var_dump($custom_field_def);\n} catch (\\Recurly\\Errors\\NotFound $e) {\n // Could not find the resource, you may want to inform the user\n // or just return a NULL\n echo 'Could not find resource.' . PHP_EOL;\n var_dump($e);\n} catch (\\Recurly\\RecurlyError $e) {\n // Something bad happened... tell the user so that they can fix it?\n echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL;\n}\n"
- lang: Go
source: "definition, err := client.GetCustomFieldDefinition(customFieldDefinitionID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Custom Field Definition: %s\", definition.Id)"
x-readme:
code-samples:
- language: node
code: "try {\n const definition = await client.getCustomFieldDefinition(definitionId)\n console.log('Fetched custom field definition: ', definition.displayName)\n} catch (err) {\n if (err instanceof recurly.errors.NotFoundError) {\n // If the request was not found, you may want to alert the user or\n // just return null\n console.log('Resource Not Found')\n } else {\n // If we don't know what to do with the err, we should\n // probably re-raise and let our web framework and logger handle it\n console.log('Unknown Error: ', err)\n }\n}\n"
name: Node.js
- language: python
code: "try:\n custom_field_definition = client.get_custom_field_definition(custom_field_definition_id)\n print(\"Custom Field Definition %s\" % custom_field_definition)\nexcept recurly.errors.NotFoundError as e:\n print(\"Invoice not found\")\n"
name: Python
- language: csharp
code: "try\n{\n CustomFieldDefinition definition = client.GetCustomFieldDefinition(definitionId);\n Console.WriteLine($\"Fetched custom field definition {definition.DisplayName}\");\n}\ncatch (Recurly.Errors.NotFound ex)\n{\n // If the resource was not found\n // we may want to alert the user or just return null\n Console.WriteLine($\"Resource Not Found: {ex.Error.Message}\");\n}\ncatch (Recurly.Errors.ApiError ex)\n{\n // Use ApiError to catch a generic error from the API\n Console.WriteLine($\"Unexpected Recurly Error: {ex.Error.Message}\");\n}\n"
name: .NET
- language: ruby
code: "begin\n custom_field_definition = @client.get_custom_field_definition(\n custom_field_definition_id: custom_field_definition_id\n )\n puts \"Got Custom Field Definition #{custom_field_definition}\"\nrescue Recurly::Errors::NotFoundError\n # If the resource was not found, you may want to alert the user or\n # just return nil\n puts \"Resource Not Found\"\nend\n"
name: Ruby
- language: java
code: "try {\n final CustomFieldDefinition definition = client.getCustomFieldDefinition(definitionId);\n System.out.println(\"Fetched custom field definition \" + definition.getDisplayName());\n} catch (NotFoundException e) {\n // If the resource was not found\n // we may want to alert the user or just return null\n System.out.println(\"Resource Not Found: \" + e.getError().getMessage());\n} catch (ApiException e) {\n // Use ApiException to catch a generic error from the API\n System.out.println(\"Unexpected Recurly Error: \" + e.getError().getMessage());\n}\n"
name: Java
- language: php
code: "try {\n $custom_field_def = $client->getCustomFieldDefinition($definition_id);\n\n echo 'Got CustomFieldDefinition:' . PHP_EOL;\n var_dump($custom_field_def);\n} catch (\\Recurly\\Errors\\NotFound $e) {\n // Could not find the resource, you may want to inform the user\n // or just return a NULL\n echo 'Could not find resource.' . PHP_EOL;\n var_dump($e);\n} catch (\\Recurly\\RecurlyError $e) {\n // Something bad happened... tell the user so that they can fix it?\n echo 'Some unexpected Recurly error happened. Try again later.' . PHP_EOL;\n}\n"
name: PHP
- language: go
code: "definition, err := client.GetCustomFieldDefinition(customFieldDefinitionID)\nif e, ok := err.(*recurly.Error); ok {\n\tif e.Type == recurly.ErrorTypeNotFound {\n\t\tfmt.Printf(\"Resource not found: %v\", e)\n\t\treturn nil, err\n\t}\n\tfmt.Printf(\"Unexpected Recurly error: %v\", e)\n\treturn nil, err\n}\nfmt.Printf(\"Fetched Custom Field Definition: %s\", definition.Id)"
name: Go
servers:
- url: https://v3.recurly.com
- url: https://v3.eu.recurly.com
components:
parameters:
filter_begin_time:
name: begin_time
in: query
description: 'Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`.
**Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
'
schema:
type: string
format: date-time
custom_field_definition_id:
name: custom_field_definition_id
in: path
description: Custom Field Definition ID
required: true
schema:
type: string
ids:
name: ids
in: query
description: "Filter results by their IDs. Up to 200 IDs can be passed at once using\ncommas as separators, e.g. `ids=h1at4d57xlmy,gyqgg0d3v9n1,jrsm5b4yefg6`.\n\n**Important notes:**\n\n* The `ids` parameter cannot be used with any other ordering or filtering\n parameters (`limit`, `order`, `sort`, `begin_time`, `end_time`, etc)\n* Invalid or unknown IDs will be ignored, so you should check that the\n results correspond to your request.\n* Records are returned in an arbitrary order. Since results are all\n returned at once you can sort the records yourself.\n"
style: form
explode: false
schema:
type: array
items:
type: string
accept_header:
name: Accept
in: header
description: The API version to use for this request, e.g. `application/vnd.recurly.v2021-02-25`. Requests without a versioned `Accept` header return a 406 response.
required: true
schema:
default: application/vnd.recurly.v2021-02-25
$ref: '#/components/schemas/AcceptHeaderEnum'
order:
name: order
in: query
description: Sort order.
schema:
default: desc
$ref: '#/components/schemas/AlphanumericSortEnum'
sort_dates:
name: sort
in: query
description: 'Sort field. You *really* only want to sort by `updated_at` in ascending
order. In descending order updated records will move behind the cursor and could
prevent some records from being returned.
'
schema:
default: created_at
$ref: '#/components/schemas/TimestampSortEnum'
filter_end_time:
name: end_time
in: query
description: 'Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
**Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
'
schema:
type: string
format: date-time
limit:
name: limit
in: query
description: Limit number of records 1-200.
schema:
type: integer
minimum: 1
maximum: 200
default: 20
schemas:
AcceptHeaderEnum:
type: string
enum:
- application/vnd.recurly.v2021-02-25
- application/vnd.recurly.v2021-02-25+json
CustomFieldDefinitionList:
type: object
properties:
object:
type: string
title: Object type
description: Will always be List.
has_more:
type: boolean
description: Indicates there are more results on subsequent pages.
next:
type: string
description: Path to subsequent page of results.
data:
type: array
items:
$ref: '#/components/schemas/CustomFieldDefinition'
RelatedTypeEnum:
type: string
enum:
- account
- item
- plan
- subscription
- charge
UserAccessEnum:
type: string
enum:
- api_only
- read_only
- write
- set_only
Error:
type: object
properties:
type:
title: Type
$ref: '#/components/schemas/ErrorTypeEnum'
message:
type: string
title: Message
params:
type: array
title: Parameter specific errors
items:
type: object
properties:
param:
type: string
TimestampSortEnum:
type: string
enum:
- created_at
- updated_at
AlphanumericSortEnum:
type: string
enum:
- asc
- desc
CustomFieldDefinition:
type: object
title: Custom field definition
properties:
id:
type: string
title: Custom field definition ID
readOnly: true
object:
type: string
title: Object type
readOnly: true
related_type:
title: Related Recurly object type
$ref: '#/components/schemas/RelatedTypeEnum'
name:
type: string
title: Name
description: Used by the API to identify the field or reading and writing. The name can only be used once per Recurly object type.
pattern: /^[a-z0-9_-]+$/i
maxLength: 50
user_access:
title: User access
description: "The access control applied inside Recurly's admin UI:\n- `api_only` - No one will be able to view or edit this field's data via the admin UI.\n- `read_only` - Users with the Customers role will be able to view this field's data via the admin UI, but\n editing will only be available via the API.\n- `write` - Users with the Customers role will be able to view and edit this field's data via the admin UI.\n- `set_only` - Users with the Customers role will be able to set this field's data via the admin console.\n"
$ref: '#/components/schemas/UserAccessEnum'
display_name:
type: string
title: Display name
description: Used to label the field when viewing and editing the field in Recurly's admin UI.
maxLength: 50
tooltip:
type: string
title: Tooltip description
description: Displayed as a tooltip when editing the field in the Recurly admin UI.
pattern: /^[a-z0-9_-]+$/i
maxLength: 255
created_at:
type: string
format: date-time
title: Created at
readOnly: true
updated_at:
type: string
format: date-time
title: Last updated at
readOnly: true
deleted_at:
type: string
format: date-time
title: Deleted at
description: Definitions are initially soft deleted, and once all the values are removed from the accouts or subscriptions, will be hard deleted an no longer visible.
readOnly: true
ErrorTypeEnum:
type: string
enum:
- bad_request
- immutable_subscription
- internal_server_error
- invalid_api_key
- invalid_api_version
- invalid_content_type
- invalid_permissions
- invalid_token
- missing_feature
- not_found
- rate_limited
- service_not_available
- simultaneous_request
- tax_service_error
- transaction
- unauthorized
- unavailable_in_api_version
- unknown_api_version
- validation
securitySchemes:
api_key:
type: http
description: Enter the API key as the username and set the password to an empty string. You can locate and manage your API keys from the [API Credentials](https://app.recurly.com/go/developer/api_keys) page.
scheme: basic
x-refined-from:
- recurly-v3-v2021-02-25-api.yaml
- recurly-openapi.yml
x-readme:
explorer-enabled: false