Skip to main content
Vindicia Knowledge Center

Fetch a specific Rate Plan

Fetch a specific Rate Plan

  • cURL
  • Java
Example Request
curl -X GET \
-u acaff38d462f9430d5cbcbaf:a575771fc679b9de \
"https://api.prodtest.vindicia.com/rate_plans/rateplan_1234"
    
The above command returns JSON structured like this:
{
    "object": "RatePlan",
    "id": "rateplan_1234",
    "vid": "90f519aca94d5ea79dbc6512fade7a7f09a8e214",
    "description": "Combo:  Each, Usage, Flat1",
    "multiply_rated_units_by": "EachRespectiveTier",
    "rated_unit": {
        "object": "RatedUnit",
        "name_singular": "License",
        "name_plural": "Licenses"
    },
    "tier": [
        {
            "object": "RatePlanTier",
            "name": "Tier 1",
            "rate_price": [
                {
                    "object": "RatePlanPrice",
                    "amount": 11,
                    "currency": "USD"
                }
            ],
            "charge_customer": "FlatFee",
            "begins_at_level": 1
        },
        {
            "object": "RatePlanTier",
            "name": "Tier 2",
            "rate_price": [
                {
                    "object": "RatePlanPrice",
                    "amount": 5,
                    "currency": "USD"
                }
            ],
            "charge_customer": "FlatFee",
            "begins_at_level": 11
        }
    ],
    "rounding_decimals": 0,
    "included_units": 0,
    "minimum_fee": [
        {
            "object": "RatePlanPrice",
            "amount": 0,
            "currency": "USD"
        }
    ],
    "maximum_fee": [],
    "rate_plan_model": "UsageBased",
    "status": "Active",
    "has_event_recorded": true
}```

Retrieves a specific RatePlan.

### HTTP Request

`GET https://api.vindicia.com/rateplans/:rateplan`

### Route (URL) Parameters

Parameter | Default | Description| Required
--------- | ----------- | -----|----
rateplan | n/a | The id **or** the vid of the rateplan to retrieve | Yes

### Query Parameters
None.

### Accepts
None.

### Returns
`JSON` A full RatePlan object.



## Update an existing Rate Plan


Update an existing RatePlan.

* Note:  Once a Rate Plan is in use (assigned to at least one SubscriptionItem with at least one usage Event recorded) most parameters may not be redefined.  Pricing and descriptions can always be updated, and will take affect on the next billing of Items using this plan, with the exception of pre-notification guarantees which will be honored for the next billing before changing the price.

### HTTP Request

`POST https://api.vindicia.com/rateplans/:rateplan`

### Route (URL) Parameters

Parameter | Default | Description| Required
--------- | ----------- | -----|----
rateplan | n/a | The id **or** the vid of the RatePlan to retrieve | Yes

### Query Parameters
None.

### Accepts
`JSON` This request supports the same arguments as 'create' (a full RatePlan object) excepting the behavior of the ids;  providing an id or vid in the URL indicates to CashBox that this is an update, not a create -- as such, id and vid cannot be updated.

* Note:  Once a Rate Plan is in use (assigned to at least one SubscriptionItem with at least one usage Event recorded) most parameters may not be redefined.  Pricing and descriptions can always be updated, and will take affect on the next billing of Items using this plan, with the exception of pre-notification guarantees which will be honored for the next billing before changing the price.

### Returns
`JSON` A full RatePlan object.

## List all Rate Plans


Retrieves all RatePlans.

### HTTP Request

`GET https://api.vindicia.com/rateplans`

### Route (URL) Parameters
None.

### Query Parameters

Parameter | Default | Description| Required
--------- | ----------- | -----|----
limit | 20 | A limit on the number of objects to be returned, between 1 and 100. | No
starting_after | none |A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.| No
ending_before | none | A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.| No

### Accepts
None.

### Returns
`JSON` A *list* array with a data property that contains an array of up to `limit` RatePlans, starting after the specified starting_after RatePlan (or ending before the specified ending_before RatePlan). Each entry in the array is a full RatePlan object. If no more objects are available, the resulting array will be empty. This request should never throw an error.

A **list** of objects matching the query.  Also:

* "total_count": Integer count of the number of objects in the returned list.

* "url": The query string provided in the request

* "next": The route (partial URL) to the next RatePlan object (string to select the "next");  included id should match that of the last object returned here

* "previous": The route (partial URL) to the previous RatePlan object (string to select the "previous");  included id should match that of the first object returned here

    
import com.vindicia.client.CashBox;
CashBox.apiKey = "acaff38d462f9430d5cbcbafa575771fc679b9de";
RatePlan.fetch("rate_1234");
  
The above command returns JSON structured like this:
{
    "object": "RatePlan",
    "id": "rateplan_1234",
    "vid": "90f519aca94d5ea79dbc6512fade7a7f09a8e214",
    "description": "Combo:  Each, Usage, Flat1",
    "multiply_rated_units_by": "EachRespectiveTier",
    "rated_unit": {
        "object": "RatedUnit",
        "name_singular": "License",
        "name_plural": "Licenses"
    },
    "tier": [
        {
            "object": "RatePlanTier",
            "name": "Tier 1",
            "rate_price": [
                {
                    "object": "RatePlanPrice",
                    "amount": 11,
                    "currency": "USD"
                }
            ],
            "charge_customer": "FlatFee",
            "begins_at_level": 1
        },
        {
            "object": "RatePlanTier",
            "name": "Tier 2",
            "rate_price": [
                {
                    "object": "RatePlanPrice",
                    "amount": 5,
                    "currency": "USD"
                }
            ],
            "charge_customer": "FlatFee",
            "begins_at_level": 11
        }
    ],
    "rounding_decimals": 0,
    "included_units": 0,
    "minimum_fee": [
        {
            "object": "RatePlanPrice",
            "amount": 0,
            "currency": "USD"
        }
    ],
    "maximum_fee": [],
    "rate_plan_model": "UsageBased",
    "status": "Active",
    "has_event_recorded": true
}```

Retrieves a specific RatePlan.

### HTTP Request

`GET https://api.vindicia.com/rateplans/:rateplan`

### Route (URL) Parameters

Parameter | Default | Description| Required
--------- | ----------- | -----|----
rateplan | n/a | The id **or** the vid of the rateplan to retrieve | Yes

### Query Parameters
None.

### Accepts
None.

### Returns
`JSON` A full RatePlan object.



## Update an existing Rate Plan


Update an existing RatePlan.

* Note:  Once a Rate Plan is in use (assigned to at least one SubscriptionItem with at least one usage Event recorded) most parameters may not be redefined.  Pricing and descriptions can always be updated, and will take affect on the next billing of Items using this plan, with the exception of pre-notification guarantees which will be honored for the next billing before changing the price.

### HTTP Request

`POST https://api.vindicia.com/rateplans/:rateplan`

### Route (URL) Parameters

Parameter | Default | Description| Required
--------- | ----------- | -----|----
rateplan | n/a | The id **or** the vid of the RatePlan to retrieve | Yes

### Query Parameters
None.

### Accepts
`JSON` This request supports the same arguments as 'create' (a full RatePlan object) excepting the behavior of the ids;  providing an id or vid in the URL indicates to CashBox that this is an update, not a create -- as such, id and vid cannot be updated.

* Note:  Once a Rate Plan is in use (assigned to at least one SubscriptionItem with at least one usage Event recorded) most parameters may not be redefined.  Pricing and descriptions can always be updated, and will take affect on the next billing of Items using this plan, with the exception of pre-notification guarantees which will be honored for the next billing before changing the price.

### Returns
`JSON` A full RatePlan object.

## List all Rate Plans


Retrieves all RatePlans.

### HTTP Request

`GET https://api.vindicia.com/rateplans`

### Route (URL) Parameters
None.

### Query Parameters

Parameter | Default | Description| Required
--------- | ----------- | -----|----
limit | 20 | A limit on the number of objects to be returned, between 1 and 100. | No
starting_after | none |A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.| No
ending_before | none | A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.| No

### Accepts
None.

### Returns
`JSON` A *list* array with a data property that contains an array of up to `limit` RatePlans, starting after the specified starting_after RatePlan (or ending before the specified ending_before RatePlan). Each entry in the array is a full RatePlan object. If no more objects are available, the resulting array will be empty. This request should never throw an error.

A **list** of objects matching the query.  Also:

* "total_count": Integer count of the number of objects in the returned list.

* "url": The query string provided in the request

* "next": The route (partial URL) to the next RatePlan object (string to select the "next");  included id should match that of the last object returned here

* "previous": The route (partial URL) to the previous RatePlan object (string to select the "previous");  included id should match that of the first object returned here
  

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top