Recover API
Create Feedback Response
After successfully creating a new item of feedback, you will get a 200 HTTP status code and receive a UUID as a response, like the following (UUID example below is different):
{
"uuid": "FBa4Kbbk7VDqEGO427EaeUhtzvxnE8gv"
}
Modifying Feedback
To modify a feedback record, use the default URL plus the UUID of the item of the feedback you want to modify. The URL now becomes https://eu-api.rantandrave.com/api/v1/feedback/ADDUUIDHERE, where ADDUUIDHERE is the UUID generated using the POST method above to create feedback.
You need to supply the required field values in the request data, and then use the PUT method of the resource. The response body will contain the UUID of the modified feedback if the call is successful.
Modify Feedback Request
To modify an item of feedback, you need to PUT the following request:
{
"username" : "<USERNAME>", "password": "<PASSWORD>",
"feedback" : {"Comment": "Agent was very helpful", "channel": "3", "score": "5”, "<NAME>" : "<VALUE>",....}
}
The fields for the PUT are the same as for the POST.
Modify Feedback Response
After successfully modifying an item of feedback you will get a 200 HTTP status code with the same UUID as the request, like the following (UUID example below will be different):
{
"uuid": "FBa4Kbbk7VDqE7EaeCQFi_BUhtzvxnE8gv"
}
If you do not pass a valid UUID or feedback object you will receive a 400 Bad request HTTP status code.
Appendix 1: Sample CURL
Create Feedback
curl --data {"username" : "USERNAME", "password": "PASSWORD", "feedback":{"Comments": "Agent was very helpful but the process is bad you. need happier agents or I will leave you","score": "2", "staff_name": "jonathan", "team_leader" : "david", "Manager" : "ken", "Account_Number" : "01234546789", "Customer_Name" : "ian", "JourneyPoint" : "initial call", "Reason_of_Contact" : "support issue", "JourneyStage" : "stage1", "ProductType" : "feedback", "PaymentMethod" : "cash", "Region" : "cumbria", "ContactType" : "phone", "Contact_Location" : "UK", "Email_Address" : "jonathan.kershaw@rantandrave.com", "Telephone_Number" : "07981244529", "Transacton_Date" : "23/02/2017 12:34"} } --request POST --header Content-Type: application/json --header Accept: application/json --header x-api-key:APIKEY https://eu-api.rantandrave.com/api/v1/feedback/.
Note: The above example contains example fields and data.