The Retrieve All Plans request enables you to retrieve details about all existing plans in your account. You can filter by status.
Request Content
Enter any of the query parameters below into the request URL. For example:
services/2/recurring/plans?pagesize=20&after=2185254&gettotal=true
Query Parameters
Parameter Name | Description | Example |
---|---|---|
after | Plan ID. The response will get the page of results after the specified ID (exclusive). Keep in mind, the results are also dependent on sort order. If the sort order is descending, "after" 1000 would include 999. | after=1000 |
before | Plan ID. The response will get the page of results before the specified ID (exclusive). Keep in mind, the results are also dependent on sort order. If the sort order is descending, "before" 5000 would include 5001. | before=5000 |
fulldescription | true (default) = Return complete details for each plan in the response false = Return each plan's name and ID only | fulldescription=true |
gettotal | true = Include the number of total results in the response | gettotal=true |
pagesize | Positive integer. Sets the maximum number of results to return (i.e. page size). Default is 10 if not set. | pagesize=20 |
status | Enter ACTIVE or INACTIVE to filter for plans with that status. | status=ACTIVE |
Response Details
If successful, the response HTTP status code is 200 OK.
The response body contains the plans resource.
Examples
Request Examples
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/plans?pagesize=5&after=2185254&gettotal=true&fulldescription=false \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
curl -v -X GET https://sandbox.bluesnap.com/services/2/recurring/plans?pagesize=2&after=2185254&fulldescription=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
Response Examples
<plans xmlns="http://ws.plimus.com">
<total-results>47</total-results>
<last-page>false</last-page>
<plan>
<plan-id>2185253</plan-id>
<name>Gold Plan</name>
</plan>
<plan>
<plan-id>2185252</plan-id>
<name>Silver Plan</name>
</plan>
<plan>
<plan-id>2185251</plan-id>
<name>Platinum Plan</name>
</plan>
<plan>
<plan-id>2185250</plan-id>
<name>Bronze Plan</name>
</plan>
<plan>
<plan-id>2185249</plan-id>
<name>Value Plan</name>
</plan>
</plans>
<plans xmlns="http://ws.plimus.com">
<last-page>false</last-page>
<plan>
<plan-id>2185253</plan-id>
<name>Gold Plan</name>
<recurring-charge-amount>29.99</recurring-charge-amount>
<currency>USD</currency>
<charge-frequency>MONTHLY</charge-frequency>
<trial-period-days>14</trial-period-days>
<initial-charge-amount>30.00</initial-charge-amount>
<charge-on-plan-switch>true</charge-on-plan-switch>
<max-number-of-charges>12</max-number-of-charges>
<grace-period-days>10</grace-period-days>
<status>ACTIVE</status>
</plan>
<plan>
<plan-id>2185252</plan-id>
<name>Silver Plan</name>
<recurring-charge-amount>17.99</recurring-charge-amount>
<currency>USD</currency>
<charge-frequency>MONTHLY</charge-frequency>
<trial-period-days>14</trial-period-days>
<initial-charge-amount>25.00</initial-charge-amount>
<charge-on-plan-switch>true</charge-on-plan-switch>
<max-number-of-charges>12</max-number-of-charges>
<grace-period-days>10</grace-period-days>
<status>ACTIVE</status>
</plan>
</plans>