Tally Platform API
async-task
Retry Async Task
1 min
code examples curl location globoff request post 'https //api b preview\ loyaltyservices io/api/v3/async tasks/{asynctaskid}/retry' \\ \ 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/async tasks/{asynctaskid}/retry") https = net http new(url host, url port) https use ssl = true request = net http post 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/async tasks/{asynctaskid}/retry" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", 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/async tasks/{asynctaskid}/retry") method("post", body) addheader("accept", "application/json") addheader("content type", "application/json") build(); response response = client newcall(request) execute(); responses // accepted new async task created and queued for processing { "asynctaskid" "", "tasktypecode" "platformapi", "taskcode" "enrollmember", "requestdate" "", "requestdata" {}, "statuscode" "", "responsedate" "", "responsedata" {}, "filename" "", "linenumber" 0, "filedata" "" }// bad request task has invalid status (must be error or queued) { "errors" \[ { "code" "", "fieldname" "", "message" "", "messageparameters" \[ {} ] } ] }// unauthorized // forbidden missing api\ async task\ create scope // task not found { "errors" \[ { "code" "", "fieldname" "", "message" "", "messageparameters" \[ {} ] } ] }// internal error