PATCH
/
features
/
{feature_id}
curl --request PATCH \
  --url https://api.togai.com/features/{feature_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "DiscountCredits",
  "schemaAssociations": [
    "event_schema1",
    "event_schema3"
  ]
}'
{
  "id": "feature.1zYnCiM9Bpg.lv25y",
  "name": "DiscountCredits",
  "displayName": "DiscountCredits",
  "schemaAssociations": [
    {
      "schemaName": "event_schema1",
      "attributeName": "distance"
    },
    {
      "schemaName": "event_schema2",
      "attributeName": "time"
    }
  ],
  "createdAt": "2020-01-01T00:00:00Z",
  "updatedAt": "2020-01-01T00:00:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

feature_id
string
required

feature_id corresponding to a feature

Maximum length: 50
Example:

"feat.fdjskl.sdkjl"

Body

application/json
Payload to update a Feature along the associations with event_schemas

Update a Feature properties

name
string

Name of the feature

Maximum length: 255
billableName
string

Billable name of addon. Billable name takes precedence over name to display in invoice.

Maximum length: 255
schemaAssociations
object[]

Association of a feature with event_schemas

event_schema details that are in association with feature

Response

200
application/json
Response for Create and Get Feature requests

Represents a Feature

id
string
required
name
string
required
displayName
string
required

Display name of feature. This is an auto-generated field which contains billableName of feature. If billableName is not provided, name will be used as display name.

Maximum length: 255
schemaAssociations
object[]
required

Association of a feature with event_schemas

event_schema details that are in association with feature

createdAt
string
required
billableName
string
Maximum length: 255
updatedAt
string