The additional cascade verification performed when edna Pulse receives a message sending request to the cascade/schedule
method.
If the request doesn’t match the cascade parameters, edna Pulse returns the cascade-scheduling-request-not-valid
error with code 400 and additional informatio in the detail
field. Read the detailed description to detect and fix the problem, or contact edna support.
Response format
{ "title": "cascade-scheduling-request-not-valid", "status": 400, "detail": "<description>" }
Examples
Example 1. The content
object contains parameters of a channel that’s missing in the cascade.
In the following request, the smscontent
parameter causes an error because the cascade with cascadeId
= 31634 includes only Viber and WhatsApp channels.
curl --location 'http://app.edna.io/api/cascade/schedule' \ --header 'Content-Type: application/json' \ --header 'x-api-key: ************' \ --data '{ "requestId": "e62b4736-1278-4119-8816-3f2257eec47c", "cascadeId": 31634, "subscriberFilter": { "address": "+10000000000", "type": "PHONE" }, "content": { "viberContent": { "contentType": "TEXT", "text": "cascade viber --> whatsapp " }, "whatsappContent": { "contentType": "TEXT", "text": "cascade viber --> whatsapp" }, "smsContent": { "contentType": "TEXT", "text": "cascade viber --> whatsapp" } } }'
Response:
{ "title": "cascade-scheduling-request-not-valid", "status": 400, "detail": "Cascade scheduling request is not valid. Violations: the cascade template stage was not found for the content [cascadeTemplateId:31,634;contentChannelType:SMS]" }
Example 2. The content
object is missing parameters required by the cascade.
The following request contains only the viberContent
parameter, but the cascade with cascadeId
= 31634 includes Viber and WhatsApp channels.
curl --location 'http://app.edna.io/api/cascade/schedule' \ --header 'Content-Type: application/json' \ --header 'x-api-key: ****************' \ --data '{ "requestId": "7c42344c-aeea-41c9-834b-eb627136f400", "cascadeId": 31634, "subscriberFilter": { "address": "+10000000999", "type": "PHONE" }, "content": { "viberContent": { "contentType": "TEXT", "text": "cascade viber --> whatsapp. No whatsapp content" } } }'
Response:
{ "title": "cascade-scheduling-request-not-valid", "status": 400, "detail": "Cascade scheduling request is not valid. Violations: the content was not found for the cascade template stage [cascadeTemplateId:31,634;stageUuid:6467a97d-c0b5-486b-9f94-733297b668de;channelType:WHATSAPP]" }
Example 3. The content
object has parameters of a channel that’s missing in the cascade, and is missing parameters that are required for the cascade.
The following request has viberContent
and smsContent
parameters, but the cascade with cascadeId
= 31634 includes Viber and WhatsApp channels.
curl --location 'http://app.edna.io/api/cascade/schedule' \ --header 'Content-Type: application/json' \ --header 'x-api-key: **********' \ --data '{ "requestId": "8bcb602f-ce61-4bce-a021-5dc52125a194", "cascadeId": 31634, "subscriberFilter": { "address": "+10000008000", "type": "PHONE" }, "content": { "viberContent": { "contentType": "TEXT", "text": "cascade viber --> whatsapp. No whatsapp content" }, "smsContent": { "contentType": "TEXT", "text": "cascade viber --> whatsapp. No whatsapp content" } } }'
Response:
{ "title": "cascade-scheduling-request-not-valid", "status": 400, "detail": "Cascade scheduling request is not valid. Violations: the content was not found for the cascade template stage [cascadeTemplateId:31,634;stageUuid:6467a97d-c0b5-486b-9f94-733297b668de;channelType:WHATSAPP]; the cascade template stage was not found for the content [cascadeTemplateId:31,634;contentChannelType:SMS]" }