Parameter [schedule.ranges.from] value is invalid

  • 1
  • Question
  • Updated 3 weeks ago
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!
Photo of Charles Zink

Charles Zink

  • 100 Points 100 badge 2x thumb

Posted 4 weeks ago

  • 1
Photo of Anton Nikitin

Anton Nikitin, Official Rep

  • 2,914 Points 2k badge 2x thumb
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.
Photo of John Wang

John Wang, Official Rep

  • 5,632 Points 5k badge 2x thumb
You can also try it with a timezone offset like:

* 2018-10-25T14:00:00Z
* 2018-10-25T14:00:00+00:00