Skip to main content
POST
Create Benefit

Authorizations

Authorization
string
header
required

Authentication: You can generate a Personal Access Token from your settings.

Body

application/json

Schema used to create a benefit of type custom.

type
string
required
Allowed value: "custom"
description
string
required

Description attached to the benefit. Will be displayed on products having this benefit.

Required string length: 3 - 42
properties
BenefitCustomCreateProperties · object
required

Properties for creating a benefit of type custom.

metadata
Metadata · object

Metadata map for information your integration needs to retain.

The key must be a string with a maximum length of 40 characters. The value must be either:

  • A string with a maximum length of 500 characters
  • An integer
  • A floating-point number
  • A boolean

You can store up to 50 key-value pairs.

organization_id
string<uuid4> | null

Identifier of the organization.

Example:

"1dbfc517-0bbf-4301-9ba8-555ca42b9737"

visibility
enum<string> | null

Visibility: Controls whether customers can see this benefit in their portal.

Available options:
draft,
private,
public

Response

Response: Benefit created.

A benefit of type custom.

Use it to grant any kind of benefit that doesn't fit in the other types.

id
string<uuid4>
required

Unique identifier for the benefit.

created_at
string<date-time>
required

The time Ruba created this record.

modified_at
string<date-time> | null
required

The time this record last changed.

type
string
required
Allowed value: "custom"
description
string
required

Description attached to the benefit.

selectable
boolean
required

Indicates whether the benefit is selectable when creating a product.

deletable
boolean
required

Indicates whether the benefit is deletable.

is_deleted
boolean
required

Indicates whether the benefit is deleted.

organization_id
string<uuid4>
required

Unique identifier for the organization owning the benefit.

metadata
object
required
visibility
enum<string>
required

Visibility: Controls whether customers can see this benefit in their portal.

Available options:
draft,
private,
public
properties
BenefitCustomProperties · object
required

Properties for a benefit of type custom.

visibility_configurable
boolean
required
read-only