POST Reasons

Modified on: Fri, 25 Jan, 2019 at 11:34 AM


Introduction

This function is designed to allow upload of new Self-select reasons that can be used in your survey directly to CustomerGauge. Each self-select reason has its unique reason code.


Good to know

API response format:

Our APIs return data in either JSON or XML format (depending on request by .json or .xml).


About this API

Resource Information

Response formats
JSON (default), XML
HTTP Method
POST
Response family
Reasons
Header
Authorization: api_key XXXXX


Resource URL

Europe Production Server: https://api.eu.customergauge.com/v4.1/reasons.json

US Production Server: https://api.us.customergauge.com/v4.1/reasons.json

Australia Production Server: https://api.au.customergauge.com/v4.1/reasons.json


How to call

POST Data

Post data as key value based on upload mapping.


Parameters

 Key
 Data
position

Refers to the position/order that particular self-select reason should appear at with respect to all the self-select options.

Example value: 0
good_bad
Controls if this particular reason should show for promoter or detractor. Options that can be used are pos for promoter and neg for detractor and passive.
Possible value: pos or neg
category_main

This is the category under which this level falls under. To place a Level 2 under a particular Level 1 issue you will need to use the name category_main naming.

Example value: Customer Support
level
Whether this issue is a level 1 or 2. The options that can be used are 1 for Level 1 Self-Select Issue and 2 for Level 2 Self-Select Issue. To place a Level 2 under a particular Level 1 issue you will need to use the name category main naming.

Possible values: 1 or 2

label
This is the label name shown on the survey for the self-select reasons.
Example value: Customer Support



Example Request

To call this API through cURL:

curl -H "Authorization: api_key XXXXX" -X POST https://api.eu.customergauge.com/v4.1/reasons.json -d position=0 -d good_bad=pos -d category_main=”Customer Support” -d level=1 -d label=”Customer Support”


Example Result

Data contains reason code. Message reported on successful operation:

{
  "Data": {
    "reason_code": 12010
  }
}


Message reported on failed operation:

{
  "Error": {
    "Message": "Record not inserted. Something went wrong. Please check your data.",
    "Code": 400604
  }
}


Not the API you're looking for?

Related APIs:


Or view:



Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.