Update a feature

Updates a feature by the given id.

put
Path parameters
idstringRequired

The id of the feature to update.

Header parameters
Brand-URLstringRequired

The brand URL of the request. This is used to identify the brand.

Example: YOUR_BRAND_URL
Auth-KeystringRequired

This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.

Example: YOUR_AUTH_KEY
Body

This class represents the feature data transfer object for the command request.

eventIdstring | nullableOptional

The event id. This value represents the event that the feature belongs to.

typestring · enumOptionalPossible values:
codestring · min: 1Required

The code of the feature.

namestring · min: 1Required

The name of the feature.

imagestring · uri | nullableOptional

The image of the feature. This value must be a valid URL.

stylesstring | nullableOptional

The style of the feature. It is a JSON string. You can use this property to store the CSS styles of the feature.

descriptionstring | nullableOptional

The description of the feature. The description can be a long text.

tagsstring | nullableOptional

The tags of the feature. You can use this property to store the tags of the feature.

zOrderinteger · int64Optional

The zOrder number in the list. This property is used to sort the features in the list when displaying them. By default, the value is 1.

statusstring · enumOptionalPossible values:
Responses
200
The request was successful.
application/json
put
PUT /api/v1/features/{id} HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 337

{
  "eventId": "EVT12345",
  "type": "Function",
  "code": "FEATURE_LOGIN",
  "name": "Login Feature",
  "image": "https://cdn.jframework.io/features/login-icon.png",
  "styles": "{\"iconColor\":\"#4CAF50\",\"background\":\"#F9F9F9\"}",
  "description": "Allows users to log into the system using secure authentication.",
  "tags": "#auth",
  "zOrder": 1,
  "status": "Active"
}
{
  "success": true,
  "statusCode": 200,
  "message": "The request was successful.",
  "data": {
    "id": "sApKpllz4sAplsmzha",
    "parentBrandId": "ParentBrandId",
    "eventId": "TrackingEventId",
    "type": "Function",
    "code": "Code",
    "name": "Name",
    "image": "https://www.example.com/image.jpg",
    "styles": "{\"color\": \"red\"}",
    "description": "Description",
    "tags": "Tag1, Tag2",
    "zOrder": 1,
    "status": "Active"
  },
  "errors": []
}

Last updated

Was this helpful?