Update a subscription type

Updates a subscription type by the given Id.

put
Path parameters
idstringRequired

The id of the subscription type.

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 is used to define the data transfer object for the SubscriptionType which is used to create or update a subscription type.

namestring · min: 1Required

The name of the subscription type.

unitstring · min: 1Required

The unit of the subscription type.

quantityinteger · int32Optional

The quantity of the subscription type.

tagsstring | nullableOptional

The tags of the subscription type.

zOrderinteger · int64Optional

The z-order of the subscription type. Default is 1

statusstring · enumOptionalPossible values:
isDefaultbooleanOptional

Flag to indicate if the subscription type is default. By default, it is false.

descriptionstring | nullableOptional

The description of the subscription type.

Responses
200
The request was successful.
application/json
put
PUT /api/v1/subscription-types/{id} HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 129

{
  "name": "text",
  "unit": "text",
  "quantity": 1,
  "tags": "text",
  "zOrder": 1,
  "status": "0 - Inactive",
  "isDefault": true,
  "description": "text"
}
{
  "success": true,
  "statusCode": 200,
  "message": "The request was successful.",
  "data": {
    "id": "sApKpllz4sAplsmzha",
    "name": "Example Subscription Type",
    "unit": "Item",
    "quantity": 1,
    "tags": "Example Tags",
    "zOrder": 1,
    "status": "Active",
    "isDefault": true,
    "description": "Example Description"
  },
  "errors": []
}

Last updated

Was this helpful?