Create a subscription type
Header parameters
Brand-URLstringRequiredExample:
The brand URL of the request. This is used to identify the brand.
YOUR_BRAND_URL
Auth-KeystringRequiredExample:
This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.
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
201
The request was successful.
application/json
401
The user is not authorized to access the requested resource. The request is missing the required Auth-Key header.
application/json
403
The user's access was denied.
application/json
429
The user has exceeded the rate limit.
application/json
post
POST /api/v1/subscription-types 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": 201,
"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?