Get Surveys - POST /attributes - http://api.spectrumsurveys.com/buyers/v1/attributes
...
Call this API to view the respondent's question text, condition codes, and condition code texts for unfamiliar qualification codes/condition codes. Survey_localization is a required Query String parameter.
...
Code Block |
---|
POST /buyers/v1/attributes/ { "Buyerbuyer_Attributeattribute_IDid" : "ABC123", "Descdesc" : "Pet Food Preferences", "Categorycategory" : "Pets", "Typetype":1, //singlepunch "localizations":[ { "localization" : "en_usUS", "Q_text": "Do you purchase dry or wet Dog Food?" "answers":[ { "buyer_Answeranswer_IDid" : "DEF456-1", "Answer_Texttext" : "Dry Food" }, { "buyer_answer_id" : "DEF456-2", "text" : "Wet Food" }, { "buyer_Answer_IDanswer_id" : "DEF456-99", "text" : "Not Sure/Doesn't Apply" } ] }, { "localization" : "DEF457en_CA", "text": "Do you purchase dry or wet Dog Food?" "Answer_Text "answers":[ { "buyer_answer_id" : "DEF456-1", "text" : "WetFoodDry Food" }, ] { "buyer_answer_id" : "DEF456-2", "text" : "Wet Food" }, { "buyer_answer_id" : "DEF456-99", "text" : "Not Sure/Doesn't Apply" } ] } } |
Example 2 : The attribute API Response
Code Block |
---|
GET /buyers/v1/attributes/ { "Qps_qualification_IDcode" : 1110 "Buyerbuyer_Attributeattribute_IDid" : "ABC123", "Descdesc" : "Pet Food Preferences", "Category" : "Pets", "Typetype":1, "localizations":[ { "localization" : "en_usUS", "Q_text": "Do you purchase dry or wet Dog Food?" "answers":[ { "buyer_answer_id" : "DEF456-1", "ps_cond_code":"111" "text" : "buyer_Answer_IDDry Food" }, { "buyer_answer_id" : "DEF456-2", "ps_cond_code":"112" "Answer_Text "text" : "Dry Food" Wet Food" }, { "buyer_answer_id" : "DEF456-99", "PSps_C_IDcond_code":"113" "text" : 111 "Not Sure/Doesn't Apply" } ] }, { "localization" : { "en_CA", "text": "Do you purchase dry or wet Dog Food?" "answers":[ { "buyer_Answeranswer_IDid" : "DEF456-1", "ps_cond_code":"111" "Answer_Texttext" : "WetFood"Dry Food" }, "PS_C_ID" : 112 { "buyer_answer_id" : "DEF456-2", "ps_cond_code":"112" "text" : "Wet Food" }, { "buyer_answer_id" : "DEF456-99", "ps_cond_code":"113" ] "text" : "Not Sure/Doesn't Apply" } ] } } ] } |
HTTP Response Codes
Response | Status | Description |
---|---|---|
200 | OK | |
400 | Bad Request | See Error Messages |
404 | Not Found | Qualification code doesn't exist in database |
5xx | Internal Server Error | Please Report to support@purespectrum.com |
...