question

charles-zink4125 avatar image
charles-zink4125 asked John Wang commented

Parameter [schedule.ranges.from] value is invalid

I am trying to create a custom answering rule and have been encountering the following error:


{      "errorCode": "CMN-101",      "message": "Parameter [schedule.ranges.from] value is invalid",      "errors": [          {              "errorCode": "CMN-101",              "message": "Parameter [schedule.ranges.from] value is invalid",              "parameterName": "schedule.ranges.from"          },          {              "errorCode": "CMN-101",              "message": "Parameter [schedule.ranges.to] value is invalid",              "parameterName": "schedule.ranges.to"          }      ],      "parameterName": "schedule.ranges.from"  }


According to the documentation, the format for ranges is "YYYY-MM-DD hh:mm". Below is the JSON I am POSTing.


{   "type": "Custom",   "name": "Calling Rule 1",   "schedule" : {    "ranges": [     {      "from": "2018-10-25 14:00",      "to": "2018-10-25 14:30"     }    ]   },   "callHandlingAction": "UnconditionalForwarding",   "unconditionalForwarding": {    "phoneNumber": "+1112223333"   }  }


Any ideas what's wrong here? Thanks!

errors
1 |1500

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

anton-nikitin avatar image
anton-nikitin answered John Wang commented
I believe the correct format should be YYYY-MM-dd'T'hh:mm:ss.

So in your case it should look like

{   "type": "Custom",   "name": "Calling Rule 1",   "schedule" : {    "ranges": [     {      "from": "2018-10-25T14:00:00",      "to": "2018-10-25T14:30:00"     }    ]   },   "callHandlingAction": "UnconditionalForwarding",   "unconditionalForwarding": {    "phoneNumber": "+1112223333"   }  
}    See https://developer.ringcentral.com/legacy-api-reference/index.html#!#DataTypes.html  
Let us know if it works. We will fix documentation.
1 comment
1 |1500

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

You can also try it with a timezone offset like:

* 2018-10-25T14:00:00Z
* 2018-10-25T14:00:00+00:00
0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys