JSON API » plans » plans/products/list

Gets the fields of products in a given rate plan.

Input parameters

Requires authentication and the commerce role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
planIntegerID of rate plan to get products for.Yes

Responses

CodeDescription
200Success.
401The authentication details provided are invalid.
402Your role does not allow this.
404The rate plan does not exist, or you do not have permission to view it.

Data returned

An array of fields, corresponding to the rows of the plan_products table in the database.

Example: With normal parameters

http://enswitch.example.com/api/json/plans/products/list/?auth_username=user;auth_password=password;plan=123

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "product":1, "plan":123, ... }, { "product":2, "plan":123, ... } ] }

Change history

VersionChanges
3.13Function added.