Custom Fields

Create additional custom fields for particular resources. You may name, describe, and determine the type of the schema.

Retrieve Custom Fields

Retrieve a schema of Custom Fields for the given resource type.

Authorizations:
path Parameters
resource
required
string
Enum: "customers" "payment-instruments" "subscriptions" "transactions" "websites" "products" "plans" "bump-offers"

The resource type string.

query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

Response Schema: application/json
Array ()
name
string

The name of the custom field.

type
required
string
Enum: "array" "boolean" "datetime" "integer" "number" "string" "monetary"
Type value Description
array An array of strings up to 255 characters, maximum size is 1000 elements boolean
The type cannot be changed.
description
string

The custom field description.

additionalSchema
any

Additional parameters which can be added according to type: Parameter Name | Types | Description -------------- | ------------- | ------------- allowedValues | string, array | List of allowed values maxLength | string | Maximum allowed length for the string, 255 by default, up to 4000 The additional schema adds additional constrains for values.

Array of objects (SelfLink) non-empty

The links related to resource.

Request samples

$customFields = $client->customFields()->search('customers', [
    'filter' => 'type:boolean',
]);

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a Custom Field

Retrieve a schema of the given Custom Field for the given resource type.

Authorizations:
path Parameters
resource
required
string
Enum: "customers" "payment-instruments" "subscriptions" "transactions" "websites" "products" "plans" "bump-offers"

The resource type string.

name
required
string <= 60 characters ^[\w-]+$

The custom field's identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

Response Schema: application/json
name
string

The name of the custom field.

type
required
string
Enum: "array" "boolean" "datetime" "integer" "number" "string" "monetary"
Type value Description
array An array of strings up to 255 characters, maximum size is 1000 elements boolean
The type cannot be changed.
description
string

The custom field description.

additionalSchema
any

Additional parameters which can be added according to type: Parameter Name | Types | Description -------------- | ------------- | ------------- allowedValues | string, array | List of allowed values maxLength | string | Maximum allowed length for the string, 255 by default, up to 4000 The additional schema adds additional constrains for values.

Array of objects (SelfLink) non-empty

The links related to resource.

Request samples

$customField = $client->customFields()->load('customers', 'testFieldName');

Response samples

Content type
application/json
{
  • "name": "string",
  • "type": "array",
  • "description": "string",
  • "additionalSchema": null,
  • "_links": [
    ]
}

Create or alter a Custom Field

Create or alter a schema of the given Custom Field for the given resource. type.

Authorizations:
path Parameters
resource
required
string
Enum: "customers" "payment-instruments" "subscriptions" "transactions" "websites" "products" "plans" "bump-offers"

The resource type string.

name
required
string <= 60 characters ^[\w-]+$

The custom field's identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Request Body schema: application/json

Custom Fields schema of the given resource type.

type
required
string
Enum: "array" "boolean" "datetime" "integer" "number" "string" "monetary"
Type value Description
array An array of strings up to 255 characters, maximum size is 1000 elements boolean
The type cannot be changed.
description
string

The custom field description.

additionalSchema
any

Additional parameters which can be added according to type: Parameter Name | Types | Description -------------- | ------------- | ------------- allowedValues | string, array | List of allowed values maxLength | string | Maximum allowed length for the string, 255 by default, up to 4000 The additional schema adds additional constrains for values.

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

Response Schema: application/json
name
string

The name of the custom field.

type
required
string
Enum: "array" "boolean" "datetime" "integer" "number" "string" "monetary"
Type value Description
array An array of strings up to 255 characters, maximum size is 1000 elements boolean
The type cannot be changed.
description
string

The custom field description.

additionalSchema
any

Additional parameters which can be added according to type: Parameter Name | Types | Description -------------- | ------------- | ------------- allowedValues | string, array | List of allowed values maxLength | string | Maximum allowed length for the string, 255 by default, up to 4000 The additional schema adds additional constrains for values.

Array of objects (SelfLink) non-empty

The links related to resource.

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

Response Schema: application/json
name
string

The name of the custom field.

type
required
string
Enum: "array" "boolean" "datetime" "integer" "number" "string" "monetary"
Type value Description
array An array of strings up to 255 characters, maximum size is 1000 elements boolean
The type cannot be changed.
description
string

The custom field description.

additionalSchema
any

Additional parameters which can be added according to type: Parameter Name | Types | Description -------------- | ------------- | ------------- allowedValues | string, array | List of allowed values maxLength | string | Maximum allowed length for the string, 255 by default, up to 4000 The additional schema adds additional constrains for values.

Array of objects (SelfLink) non-empty

The links related to resource.

Request samples

Content type
application/json
{
  • "type": "array",
  • "description": "string",
  • "additionalSchema": null
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "type": "array",
  • "description": "string",
  • "additionalSchema": null,
  • "_links": [
    ]
}