Tally Platform API
member-badge
Get Member badges
1 min
code examples curl location globoff 'https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/badges' \\ \ header 'accept application/json' \\ \ header 'content type application/json'require "uri" require "json" require "net/http" url = uri("https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/badges") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body import requests import json url = "https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/badges" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) okhttpclient client = new okhttpclient() newbuilder() build(); mediatype mediatype = mediatype parse("application/json"); requestbody body = requestbody create(mediatype, ""); request request = new request builder() url("https //api b preview\ loyaltyservices io/api/v3/members/{memberidentifier}/badges") method("get", body) addheader("accept", "application/json") addheader("content type", "application/json") build(); response response = client newcall(request) execute(); responses // success \[ { "memberbadgeid" 147258369, "badgedetails" { "badgeid" 147258369, "badgetypecode" "general", "badgename" "event organizer", "badgedescription" "an organizer who brings in over $100,000 year in business", "statuscode" "active", "expirationdate" "4000 01 01", "expirationtype" "exact", "expirationdayperiod" 60, "expirationtimeperiod" 10, "logokey" "elite explorer png", "content" { "contentcode" "bonus100", "contenttypecode" "header", "name" "bonus 100 points", "shortdescription" "award 100 points", "description" "award 100 points on 100th stay", "alternatedescription" "award 100 points on 100th stay", "termsandconditions" "terms and conditions for this promotion", "title" "award 100 points", "label" "100 points awarded", "logokey" "100 points png", "displaytypekey" "100 points", "startdate" "", "enddate" "", "url" "/loyaltyprogram/bonus/100 points", "tiercode" "b", "displayforall" true, "descriptorcode" "limited time" } }, "sourcecode" "promotion", "statuscode" "activated", "startdate" "2020 01 01", "enddate" "2020 12 31", "updateusername" "", "createusername" "", "sourcedescription" "" } ]// bad request { "errors" \[ { "code" "", "fieldname" "", "message" "", "messageparameters" \[ {} ] } ] }// unauthorized // forbidden // internal error