Create or alter a Custom Field

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

SecuritySecretApiKey or JWT
Request
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.

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
The additional schema adds additional constrains for values.
Responses
200

The Custom Field was updated.

Response Schema: application/json
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"
name
string

The name of the custom field.

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
The additional schema adds additional constrains for values.
Array of objects (Self) non-empty

The links related to resource.

Array (non-empty)
href
required
string

The link URL.

rel
required
string

The link type.

Value: "self"
201

The Custom Fields was created.

Response Headers
Location
string <uri>

The location of the related resource.

Example: "https://api.rebilly.com/example"
Response Schema: application/json
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"
name
string

The name of the custom field.

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
The additional schema adds additional constrains for values.
Array of objects (Self) non-empty

The links related to resource.

Array (non-empty)
href
required
string

The link URL.

rel
required
string

The link type.

Value: "self"
401

Unauthorized access, invalid credentials were 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": [
    ]
}