Pisano External API - Feedback - Create a New Feedback
Create a new Feedback
Create a new Feedback
POST
/external/v1/feedbacks
Authentication
Authentication Method
Token token=<TOKEN>
Request
Headers
| Header | Required | Description | Example |
|---|---|---|---|
Accept |
No | Specifies the expected response media type. | application/json |
Authorization |
Yes | Pisano API token used to authenticate the request. | Token token=<TOKEN> |
Content-Type |
Yes | Specifies the request content type. Must be application/json. | application/json |
Request Body
{
"node_id": "<node_id>",
"flow_id": "<flow_id>",
"language_id": "<language_id>",
"created_at": <unix_timestamp>,
"customer": {
"name": "<customer_name>",
"phone_number": "<phone_number>",
"email": "<email>",
"external_id": "<external_id>"
},
"responses": [
{
"question_key": "<question_key>",
"body": "<response_body>"
},
{
"question_key": "<question_key>",
"option_key": "<option_key>"
}
]
}
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
node_id |
string | Yes | Node ID. |
flow_id |
string | Yes | Flow ID. |
language_id |
string | No | Language ID. |
created_at |
integer (int64) | No | Unix timestamp. |
customer |
object | No | Customer information. |
customer.name |
string | Customer name. | |
customer.phone_number |
string | Customer phone number. | |
customer.email |
string | Customer email address. | |
customer.external_id |
string | External customer identifier. | |
responses |
array | Yes | Responses submitted for the feedback. |
responses[].question_key |
string | Question key. | |
responses[].body |
string | Yes* | Required for a TextResponse. |
responses[].option_key |
string | Yes* | Required for an OptionResponse. |
Required
Yes* = The body and option_key fields are not required together in the same response item. For a TextResponse, body is required. For an OptionResponse, option_key is required.
Request Example
JSON
Request Example
{
"node_id": "<node_id>",
"flow_id": "<flow_id>",
"language_id": "<language_id>",
"created_at": <unix_timestamp>,
"customer": {
"name": "<customer_name>",
"phone_number": "<phone_number>",
"email": "<email>",
"external_id": "<external_id>"
},
"responses": [
{
"question_key": "<question_key>",
"body": "<response_body>"
},
{
"question_key": "<question_key>",
"option_key": "<option_key>"
}
]
}
Responses
201
Feedback Created
Response Fields
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | Unique identifier of the created feedback. |
Response Example
JSON
Response Example
{
"id": "<feedback_id>"
}
400
error payload
- Error Code
13028- Error Message
- Invalid parameters
401
Error: Unauthorized
- Error Code
13001- Error Message
- Wrong authentication token
{"error_message":"Wrong authentication token","data":"Wrong authentication token","code":13001,"errors":null}
404
error payload
- Error Code
13002- Error Message
- Requested resource not found!
{"error_message":"Requested resource not found!","data":"Requested resource not found!","code":13002,"errors":{"question_id":null}}