@@ -112,13 +112,14 @@ Represents a tier block. It has the following fields:
112112
113113Represents a product. It has the following attributes:
114114
115- | Name | Type | Generated by | Description |
116- | ----------------| --------------| --------------| -------------------------------------------------------------------------------------------------------|
117- | ** name** | string | user | Product name |
118- | ** prettyName** | string | user | Pretty name for the product |
119- | ** category** | string | user | Product category (` BASE/ADD_ON/STANDALONE ` ) |
120- | ** availableForBps** | string array | user | An array of base product names for which this addon is available (Applicable only for addon products) |
121- | ** availableAddons** | string array | user | An array of addon product names available on this base product (Applicable only for base products) |
115+ | Name | Type | Generated by | Description |
116+ | ---------------------| --------------| --------------| -------------------------------------------------------------------------------------------------------|
117+ | ** name** | string | user | Product name |
118+ | ** prettyName** | string | user | Pretty name for the product |
119+ | ** category** | string | user | Product category (` BASE/ADD_ON/STANDALONE ` ) |
120+ | ** availableForBps** | string array | user | An array of base product names for which this addon is available (Applicable only for addon products) |
121+ | ** availableAddons** | string array | user | An array of addon product names available on this base product (Applicable only for base products) |
122+ | ** retired_date** | string| system| If product is retired, date on which the product is retired, otherwise null |
122123
123124### CatalogInputData
124125
@@ -145,8 +146,210 @@ Represents information on whether a tenant uses an XML or Aviate catalog. It has
145146* CATALOG_STATE_XML - XML catalog
146147* CATALOG_STATE_AVIATE - Aviate catalog
147148
149+ ## Product APIs
150+
151+ ### Get All Products
152+
153+ Returns all the products corresponding to a tenant/account.
154+
155+ ** HTTP Request**
156+
157+ ` GET /plugins/aviate-plugin/v1/catalog/product/all `
158+
159+ > Example Request:
160+
161+ ``` shell
162+ curl -X GET \
163+ -H" Authorization: Bearer ${ID_TOKEN} " \
164+ -H ' Content-Type: application/json' \
165+ -H ' X-killbill-apiKey: alphaF' \
166+ -H ' X-killbill-apisecret: alphaF' \
167+ ' http://127.0.0.1:8080/plugins/aviate-plugin/v1/catalog/product/all'
168+ ```
169+
170+ ``` java
171+ ```
172+
173+ ``` ruby
174+ ```
175+
176+ ``` python
177+ ```
178+
179+ ```` php
180+ ````
181+
182+ ```` javacript
183+ ````
184+
185+ > Example Response:
186+
187+ ``` json
188+ [
189+ {
190+ "name" : " Premium" ,
191+ "prettyName" : " " ,
192+ "category" : " BASE" ,
193+ "availableForBps" : [],
194+ "availableAddons" : [],
195+ "retiredDate" : " "
196+ },
197+ {
198+ "name" : " standard" ,
199+ "prettyName" : " " ,
200+ "category" : " BASE" ,
201+ "availableForBps" : [],
202+ "availableAddons" : [],
203+ "retiredDate" : " "
204+ }
205+ ]
206+ ```
207+
208+ ** Query Parameters**
209+
210+ | Name | Type | Required | Default | Description |
211+ |-------------------------------------------|--------|----------| ---- |--------------------------------------------------------------------------------------
212+ | ** accountId** | UUID | false | none | Account Id. If specified, returns plans for the specified ` tenantId ` and ` accountId ` |
213+
214+
215+ ** Response**
216+
217+ If successful, returns a status code of 200 and a ` ProductData ` list.
148218
149- ## Catalog APIs
219+
220+ ### Get Plans Per Product
221+
222+ Returns the plans corresponding to a product. Includes retired plans.
223+
224+ ** HTTP Request**
225+
226+ ` GET /plugins/aviate-plugin/v1/catalog/{productName}/plansPerProduct `
227+
228+ > Example Request:
229+
230+ ``` shell
231+ curl -X GET \
232+ -H" Authorization: Bearer ${ID_TOKEN} " \
233+ -H ' Content-Type: application/json' \
234+ -H ' X-killbill-apiKey: alphaF' \
235+ -H ' X-killbill-apisecret: alphaF' \
236+ ' http://127.0.0.1:8080/plugins/aviate-plugin/v1/catalog/standard/plansPerProduct'
237+ ```
238+
239+ ``` java
240+ ```
241+
242+ ``` ruby
243+ ```
244+
245+ ``` python
246+ ```
247+
248+ ```` php
249+ ````
250+
251+ ```` javacript
252+ ````
253+
254+ > Example Response:
255+
256+ ``` json
257+ [
258+ {
259+ "name" : " standard-monthly" ,
260+ "prettyName" : " standard-monthly" ,
261+ "recurringBillingMode" : " IN_ADVANCE" ,
262+ "effectiveDate" : " 2025-04-15T06:46:02.000Z" ,
263+ "effectiveDateForExistingSubscriptions" : " " ,
264+ "productName" : " standard" ,
265+ "pricelistName" : " DEFAULT" ,
266+ "retired" : false ,
267+ "phases" : [
268+ {
269+ "prettyName" : " " ,
270+ "type" : " EVERGREEN" ,
271+ "durationUnit" : " UNLIMITED" ,
272+ "durationLength" : -1 ,
273+ "fixedPrices" : [],
274+ "recurringPrices" : {
275+ "billingPeriod" : " DAILY" ,
276+ "prices" : [
277+ {
278+ "currency" : " USD" ,
279+ "value" : " 30.000000000"
280+ }
281+ ]
282+ },
283+ "usages" : []
284+ }
285+ ]
286+ }
287+ ]
288+ ```
289+
290+ ** Query Parameters**
291+
292+ | Name | Type | Required | Default | Description |
293+ |-------------------------------------------|--------|----------| ---- |--------------------------------------------------------------------------------------
294+ | ** accountId** | UUID | false | none | Account Id. If specified, returns plans for the specified ` tenantId ` and ` accountId ` |
295+
296+
297+ ** Response**
298+
299+ If successful, returns a status code of 200 and a ` PlanData ` list.
300+
301+ ### Delete Product
302+
303+ Deletes the specified product. If ` deleteAllPlans ` is specified, deletes all the plans corresponding to the product.
304+
305+ ** Note:** Since this is an irreversible operation, the query parameter ` force=true ` must be specified to proceed with the deletion.
306+
307+ ** HTTP Request**
308+
309+ ` DELETE /plugins/aviate-plugin/v1/catalog/product/{productName}/deleteProduct `
310+
311+ > Example Request:
312+
313+ ``` shell
314+ curl -X DELETE \
315+ -H' Content-Type: application/json' \
316+ -H" Authorization: Bearer ${ID_TOKEN} " \
317+ -H' X-killbill-apiKey: alphaF' \
318+ -H' X-killbill-apisecret: alphaF' \
319+ ' http://127.0.0.1:8080/plugins/aviate-plugin/v1/catalog/product/premium/deleteProduct?force=true'
320+ ```
321+
322+ ``` java
323+ ```
324+
325+ ``` ruby
326+ ```
327+
328+ ``` python
329+ ```
330+
331+ ```` php
332+ ````
333+
334+ ```` javacript
335+ ````
336+
337+ > Example Response:
338+
339+ ** Query Parameters**
340+
341+ | Name | Type | Required | Default | Description |
342+ |--------------------|---------|----------|---------|-------------------------------------------------------------
343+ | ** force** | boolean | true | none | Whether to force plan deletion |
344+ | ** deleteAllPlans** | boolean | false | false | If true, deletes all the plans corresponding to the product |
345+ | ** accountId** | UUID | false | none | Account Id for which to create the plan |
346+
347+
348+ ** Response**
349+
350+ If successful, returns a status code of 200 and an empty body.
351+
352+ ## Plan APIs
150353
151354### Create Plan, Product, Pricelist
152355
@@ -859,6 +1062,58 @@ curl -X DELETE \
8591062
8601063If successful, returns a status code of 200 and an empty body.
8611064
1065+ ### Delete Plan
1066+
1067+ Deletes the latest version of the plan. If ` allVersions=true ` is specified, deletes all the versions of the plan.
1068+
1069+ ** Note:** Since this is an irreversible operation, the query parameter ` force=true ` must be specified to proceed with the deletion.
1070+
1071+ ** HTTP Request**
1072+
1073+ ` DELETE /plugins/aviate-plugin/v1/catalog/{planName}/deletePlan `
1074+
1075+ > Example Request:
1076+
1077+ ``` shell
1078+ curl -X DELETE \
1079+ -H' Content-Type: application/json' \
1080+ -H" Authorization: Bearer ${ID_TOKEN} " \
1081+ -H' X-killbill-apiKey: alphaF' \
1082+ -H' X-killbill-apisecret: alphaF' \
1083+ ' http://127.0.0.1:8080/plugins/aviate-plugin/v1/catalog/premium-monthly/deletePlan?force=true'
1084+ ```
1085+
1086+ ``` java
1087+ ```
1088+
1089+ ``` ruby
1090+ ```
1091+
1092+ ``` python
1093+ ```
1094+
1095+ ```` php
1096+ ````
1097+
1098+ ```` javacript
1099+ ````
1100+
1101+ > Example Response:
1102+
1103+ ** Query Parameters**
1104+
1105+ | Name | Type | Required | Default | Description |
1106+ |-----------------|---------|----------|---------|-----------------------------------------------
1107+ | ** force** | boolean | true | none | Whether to force plan deletion |
1108+ | ** allVersions** | boolean | false | false | If true, deletes all the versions of the plan |
1109+ | ** accountId** | UUID | false | none | Account Id for which to create the plan |
1110+
1111+
1112+ ** Response**
1113+
1114+ If successful, returns a status code of 200 and an empty body.
1115+
1116+ ## Catalog APIs
8621117
8631118### Get Catalog Info
8641119
0 commit comments