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.

Request
Security:
path Parameters
resource
required
string

The resource type string.

Enum: "customers" "payment-instruments" "subscriptions" "transactions" "websites" "products" "plans" "bump-offers"
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
Deprecated

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

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200

A schema of Custom Fields was retrieved successfully.

401

Unauthorized access, invalid credentials was used.

403

Access forbidden.

get/custom-fields/{resource}
Request samples
$customFields = $client->customFields()->search('customers', [
    'filter' => 'type:boolean',
]);
Response samples
application/json
[
  • {
    }
]

Retrieve a Custom Field

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

Request
Security:
path Parameters
resource
required
string

The resource type string.

Enum: "customers" "payment-instruments" "subscriptions" "transactions" "websites" "products" "plans" "bump-offers"
name
required
string <= 60 characters ^[\w-]+$

The custom field's identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

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

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Responses
200

A schema of the Custom Field was retrieved successfully.

401

Unauthorized access, invalid credentials was used.

403

Access forbidden.

404

Resource was not found.

get/custom-fields/{resource}/{name}
Request samples
$customField = $client->customFields()->load('customers', 'testFieldName');
Response samples
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.

Request
Security:
path Parameters
resource
required
string

The resource type string.

Enum: "customers" "payment-instruments" "subscriptions" "transactions" "websites" "products" "plans" "bump-offers"
name
required
string <= 60 characters ^[\w-]+$

The custom field's identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Deprecated

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

It is deprecated. Use servers with /organizations/{organizationId} base path instead.

Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21
Request Body schema: application/json

Custom Fields schema of the given resource type.

type
required
string
Type value Description
array An array of strings up to 255 characters, maximum size is 1000 elements boolean
The type cannot be changed.
Enum: "array" "boolean" "datetime" "integer" "number" "string" "monetary"
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
200

The Custom Field was updated.

201

The Custom Fields was created.

401

Unauthorized access, invalid credentials was used.

409

The schema is in use: remove all the associated data in order to remove or alter the schema.

422

Invalid data was sent.

put/custom-fields/{resource}/{name}
Request samples
application/json
{
  • "type": "array",
  • "description": "string",
  • "additionalSchema": null
}
Response samples
application/json
{
  • "name": "string",
  • "type": "array",
  • "description": "string",
  • "additionalSchema": null,
  • "_links": [
    ]
}