Create or alter a custom field

Request

Creates or alters a specified custom field schema for a specified resource.

Security
SecretApiKey or JWT
Path
resourcestringrequired

Type of resource schema.

Enum:"customers""payment-instruments""orders""subscriptions""transactions""websites""products""plans""gateway-accounts""deposit-requests"
namestring, <= 60 characters^[\w-]+$required

ID of the custom field.

Bodyapplication/jsonrequired

Custom fields schema of the specified resource.

typestringrequired

Describes the data type. The custom field type value cannot be changed.

Array of strings with up to 255 characters. The maximum size is 1000 elements.

Value:"array"
Discriminator
descriptionstring or null

Description of the custom field.

isEnabledboolean

Specifies if the custom field is enabled.

Default:true
additionalSchemaobject or null

Additional schema which adds additional values constrains.

curl -i -X PUT \
  'https://www.rebilly.com/_mock/catalog/all/custom-fields/{resource}/{name}' \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "type": "array",
    "description": "string",
    "isEnabled": true,
    "additionalSchema": {
      "allowedValues": [
        "string"
      ],
      "required": true,
      "default": [
        "string"
      ]
    }
  }'

Responses

Custom field updated.

Headers
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
namestringread-only

Name of the custom field.

typestringrequired

Describes the data type. The custom field type value cannot be changed.

Array of strings with up to 255 characters. The maximum size is 1000 elements.

Value:"array"
Discriminator
descriptionstring or null

Description of the custom field.

isEnabledboolean

Specifies if the custom field is enabled.

Default:true
additionalSchemaobject or null

Additional schema which adds additional values constrains.

Response
{ "name": "string", "type": "array", "description": "string", "isEnabled": true, "additionalSchema": { "allowedValues": [], "required": true, "default": [] }, "_links": [ {} ] }