Retrieve a list of plans

Request

Retrieves a list of plans.

Security
CustomerJWT
Query
filterstring

Criteria for filtering collection items. This field requires a special format. Use , to specify multiple allowed values. Use ; to specify multiple fields.

For more information, see Search filters.

sortArray of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -. Multiple fields can be sorted by separating each with ,.

limitinteger, [ 0 .. 1000 ]

Limits the number of collection items to be returned.

offsetinteger, [ 0 .. 1000 ]

Specifies the starting point within the collection of items to be returned.

qstring

Use this field to perform a partial search of text fields.

expandstring

Expands a request to include embedded objects within the _embedded property of the response. This field accepts a comma-separated list of objects.

For more information, see Embedded resources.

curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/storefront/plans?filter=string&sort=string&limit=1000&offset=1000&q=string&expand=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

List of plans retrieved.

Headers
Pagination-Totalinteger

Total number of items.

Example:332
Pagination-Limitinteger

Maximum number of items per page.

Example:100
Pagination-Offsetinteger

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example:2
Bodyapplication/json
Array [
idstring, <= 50 characters

ID of the plan.

Example:"plan_0YV7DENSVGDBW9S71XZNNYYQ0X"
namestring, <= 255 charactersrequired

Name of the plan. This name is displayed on invoices and receipts.

descriptionstring

Plain-text description of the plan. This field accepts plain-text only.

richDescriptionstring

Rich-text description of the plan. This field accepts rich text formatting, such as: bold, underline, italic, and hyperlinks.

productIdstring, <= 50 charactersrequired

ID of the related product.

Example:"prod_0YV7DES3WPC5J8JD8QTVNZBZNZ"
productOptionsobject or null

Name-value pairs that specify the product options.

Example:
{ "color": "red", "size": "xxl" }
currencystring, = 3 characters(CurrencyCode)required

Currency code in ISO 4217 format.

Example:"USD"
currencySignstringread-only

Currency sign.

pricingobject(PlanPriceFormula)required
setupobject or null(PlanSetup)

Setup fee information for the plan.

customFieldsobject(ResourceCustomFields)

Use custom fields to extend a resource scheme to include custom data that is not provided as a common field. For more information, see Custom fields.

Default:{}
Example:
{ "foo": "bar" }
isActiveboolean

Specifies if the plan is active.

Default:true
revisionintegerread-only

Number of times the plan is modified. Compare this value with materialized subscription item revision values.

trialobject or null

Trial configuration setting. If you do not want to offer a trial, set this value to null.

meteredBillingobject or null

Use metered billing when an exact quantity is unknown. Report usage during a service period and charge customers afterwards. Metered billing plans must be postpaid.

createdTimestring, (date-time)(CreatedTime)read-only

Date and time when the resource is created. This value is set automatically when the resource is created.

updatedTimestring, (date-time)(UpdatedTime)read-only

Date and time when the resource is updated. This value is set automatically when the resource is updated.

_embeddedobjectread-only

Embedded objects that are requested by the expand query parameter.

]
Response
[ { "id": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X", "name": "string", "description": "string", "richDescription": "string", "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ", "productOptions": {}, "currency": "USD", "currencySign": "string", "pricing": {}, "setup": {}, "customFields": {}, "isActive": true, "revision": 0, "trial": {}, "meteredBilling": {}, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_embedded": {}, "_links": [] } ]