Create a subscription type
The brand URL of the request. This is used to identify the brand.
YOUR_BRAND_URL
This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.
YOUR_AUTH_KEY
This class is used to define the data transfer object for the SubscriptionType which is used to create or update a subscription type.
The name of the subscription type.
The quantity of the subscription type.
The tags of the subscription type.
The z-order of the subscription type. If the value not provide, we will set the new z-order base on the current item's brand.
Flag to indicate if the subscription type is default. By default, it is false.
The description of the subscription type.
The request was successful.
The user is not authorized to access the requested resource. The request is missing the required Auth-Key header.
The user's access was denied.
The user has exceeded the rate limit.
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: 133
{
"name": "text",
"unit": "0 - Hour",
"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": "Day",
"quantity": 1,
"tags": "Example Tags",
"zOrder": 1,
"status": "Active",
"isDefault": true,
"description": "Example Description"
},
"errors": []
}
Last updated
Was this helpful?