Methods to fetch Service Plan data


All applications below support trusted mode, i_customer should be supplied in that mode.


listServicePlans()


Available since version Softswitch 2025 and FreightSwitch 2025.

Allows retrieving service plans that belong to the authenticated customer, or to the customer specified by i_customer in trusted mode.


Parameters:

  • i_billing_plan - Filter by service plan identifier. Integer. Optional.
  • name_pattern - Case-insensitive SQL pattern applied to the service plan name. String. Optional.
  • name_pattern_not - Case-insensitive SQL pattern used to exclude service plan names. String. Optional.
  • limit - Maximum number of rows to return. Integer. Optional.
  • offset - Number of matching rows to skip before returning results. Integer. Optional.

Returns:

  • result - OK. String.
  • list - list of service plan structures ordered by name:
    • i_billing_plan - service plan identifier. Integer.
    • i_customer - customer identifier. Integer.
    • name - service plan name. String.
    • description - service plan description. String.
    • i_tariff - tariff identifier. Integer.
    • iso_4217 - currency code. String.
    • total_price - sum of all prices from related service_charges and service_plans rows. Numeric.



getServicePlanInfo()


Allows retrieving attributes of a single service plan. The service plan must belong to the authenticated customer, unless trusted mode is used.


Parameters:

  • i_billing_plan - Service plan identifier. Integer. Required.

Returns:

  • result - OK means that the service plan has been found. String.
  • service_plan- service plan structure:
    • i_billing_plan - service plan identifier. Integer.
    • i_customer - customer identifier. Integer.
    • name - service plan name. String.
    • description - service plan description. String.
    • i_tariff - tariff identifier. Integer.
    • iso_4217 - currency code. String.
    • total_price - sum of all prices from related service_charges and service_plans rows. Numeric.