Update a Wellness Plan
1 min
PUT
https://developer.digitail.io/api/v1/plans/{id}
Body Parameters
- bodyobject
- namestringExample
- descriptionstringExample
- pricenumberExample
- taxnumberDescription
- tax_rate_idsinteger[]Example
[ 57 ]
Description - upfront_feenumber
- periodicityintegerExample
- periodicity_typestring<month | quarter | year>Allowedmonthquarteryear
- statusstring<active | inactive>ExampleAllowedactiveinactive
- is_publicbooleanDescription
- plan_durationstring<indefinite | 1-year>DescriptionAllowedindefinite1-year
- benefits_exclusionsobject
- product_categoriesobject[]
- product_category_idintegerExample
- benefitsobject
- servicesobject[]
- idintegerExample
- service_package_idintegerExample
- limitintegerExample
- discountnumber
- service_aaha_codesobject[]
- idintegerExample
- aaha_codestringExample
- discountnumber
- limitintegerExample
- productsobject[]
- idintegerExample
- product_idintegerExample
- limitintegerExample
- limit_unit_type_idinteger
- limit_unit_typestringExample
- discountnumber
- product_categoriesobject[]
- idintegerExample
- product_category_idintegerExample
- discountnumber
- product_aaha_codesobject[]
- idintegerExample
- aaha_codestringExample
- discountnumber
- limitintegerExample
- limit_unit_type_idinteger
Responses
200
- object
- dataobject
- idintegerExample
- clinic_idintegerExample
- namestringExample
- descriptionstringExample
- pricenumberExample
- price_without_taxnumberExample
- taxnumberDescription
- tax_rates0[]Description
- upfront_feenumber
- upfront_fee_without_taxnumber
- periodicityintegerExample
- periodicity_typestring<day | week | month | quarter | year>Alloweddayweekmonthquarteryear
- statusstring<active | inactive>ExampleAllowedactiveinactive
- is_publicboolean
- plan_durationstring<indefinite | 1-year>DefaultindefiniteAllowedindefinite1-year
- benefitsbenefits
- benefits_exclusionsobject
- product_categoriesobject[]Description
- idintegerExample
- product_category_idintegerExample
curl
curl --request PUT \
--url https://developer.digitail.io/api/v1/plans/{id} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'PUT',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://developer.digitail.io/api/v1/plans/{id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://developer.digitail.io/api/v1/plans/{id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://developer.digitail.io/api/v1/plans/{id}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
200
// successful operation
{
"data": {
"id": 1,
"clinic_id": 1,
"name": "Basic",
"description": "Basic subscription plan",
"price": 10,
"price_without_tax": 10,
"tax": 0,
"tax_rates": [
""
],
"upfront_fee": 0,
"upfront_fee_without_tax": 0,
"periodicity": 1,
"periodicity_type": "",
"status": "active",
"is_public": false,
"plan_duration": "",
"benefits": {},
"benefits_exclusions": {
"product_categories": [
{
"id": 101,
"product_category_id": 12
}
]
}
}
}