function telecoms.routeplan.list

Lists the route plans already on an account.

Arguments:

argrequired?syntaxinfo
custIDNposintcustID of account whose route plans you want to list (defaults to your own account)
routeplanIDNlist:posintoptional filter to fetch only the details of specific route plans. Supply IDs in an array or comma separated string.
alsogetNlist:items|in_use|deleted|edit_timeadditional items to fetch with the results
edit_time.minNisotimeoptional filter to limit results to route plans last modified on or after this time
edit_time.maxNisotimeoptional filter to limit results to route plans last modified on or before this time

Further argument information

alsoget

A comma separated list of additional information/items to fetch:

Example 1

JSON example request:

POST https://live.apicontrol.co.uk/1/json
{
    "auth" : {
        "username" : "YOURUSERNAME",
        "password" : "YOURPASSWORD",
    },
    "func" : "telecoms.routeplan.list",
    "args" : { }
}

The returned routeplan records will be within results / data. Each record will include a routeplanID; you will need the routeplanID if you want to route a number to that route plan.

JSON example response:

{
   "success" : "1",
   "results" : {
      "data" : [
         {
            "last_updated" : "2009-06-23 12:37:10",
            "routeplanID" : "116",
            "custID" : "16526",
            "desc" : "Fred and Bob alternating",
            "created" : "2007-02-26 18:11:50"
         },
         {
            "desc" : "Fred then voicemail",
            "created" : "2007-02-27 11:41:33",
            "last_updated" : "2009-06-23 12:38:20",
            "custID" : "16526",
            "routeplanID" : "118"
         },
         {
            "custID" : "16526",
            "routeplanID" : "1339",
            "last_updated" : "2009-06-23 12:36:30",
            "desc" : "Santa's Grotto",
            "created" : "2008-09-11 15:54:57"
         }
      ],
      "totmatches" : "3"
   }
}

Example 2

In this example, we specify that we also want to fetch the routeplan items, showing the details of the route plan. Also, we've specified two routeplanIDs so that we only get the results for these route plans.

JSON example request:

POST https://live.apicontrol.co.uk/1/json
{                                                                                                                                                               
    "auth" : {                                                                                                                                                  
        "username" : "YOURUSERNAME",                                                                                                                            
        "password" : "YOURPASSWORD",                                                                                                                            
    },                                                                                                                                                          
    "func" : "telecoms.routeplan.list",                                                                                                                         
    "args" : {                                                                                                                                                  
       "alsoget" : "items",                                                                                                                                     
       "routeplanID" : "116,118"                                                                                                                                
    }                                                                                                                                                           
}

The returned routeplan records will be within results / data. Each record will include a routeplanID; you will need the routeplanID if you want to route a number to that route plan.

JSON example response:

{                                                                                                                                                               
   "results" : {                                                                                                                                                
      "totmatches" : "2",                                                                                                                                       
      "data" : [
         {
            "created" : "2007-02-26 18:11:50",
            "last_updated" : "2009-06-23 12:37:10",
            "desc" : "Fred and Bob alternating",
            "custID" : "16526",
            "routeplanID" : "116",
            "items" : [
               {
                  "dur" : "10",
                  "type" : "number",
                  "arg" : "01123456789"
               },
               {
                  "type" : "number",
                  "arg" : "01987654321",
                  "dur" : "10"
               }
            ]
         },
         {
            "routeplanID" : "118",
            "items" : [
               {
                  "dur" : "10",
                  "type" : "number",
                  "arg" : "011234567890"
               },
               {
                  "type" : "voicemail",
                  "arg" : "3",
                  "dur" : "10"
               }
            ],
            "last_updated" : "2009-06-23 12:38:20",
            "created" : "2007-02-27 11:41:33",
            "custID" : "16526",
            "desc" : "Fred then voicemail"
         }
      ]
   },
   "success" : "1"
}