Retry Async Task
1 min
POST
https://api.b.preview.loyaltyservices.io/api/v3/async-tasks/{asyncTaskId}/retry
Path Parameters
- asyncTaskIdinteger<int64>requiredDescriptionFormatint64
Responses
202
- AsyncTask
- asyncTaskIdinteger<int64>Formatint64
- taskTypeCodestringExampleDescription
- taskCodestringExampleDescription
- requestDatestring<date-time>DescriptionFormatdate-time
- requestDataobjectDescription
- statusCodestringDescription
- responseDatestring<date-time>DescriptionFormatdate-time
- responseDataobjectDescription
- fileNamestringDescription
- lineNumberintegerDescription
- fileDatastringDescription
400
- ErrorResponse
- errorsValidationError[]Description
- codestringDescription
- fieldNamestringDescription
- messagestringDescription
- messageParametersobject[]Description
401
403
404
- ErrorResponse
- errorsValidationError[]Description
- codestringDescription
- fieldNamestringDescription
- messagestringDescription
- messageParametersobject[]Description
500
curl
curl --request POST \
--url https://api.b.preview.loyaltyservices.io/api/v3/async-tasks/{asyncTaskId}/retry \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.b.preview.loyaltyservices.io/api/v3/async-tasks/{asyncTaskId}/retry", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
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
python
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)
202
// Accepted - New async task created and queued for processing
{
"asyncTaskId": "",
"taskTypeCode": "PlatformAPI",
"taskCode": "enrollMember",
"requestDate": "",
"requestData": {},
"statusCode": "",
"responseDate": "",
"responseData": {},
"fileName": "",
"lineNumber": 0,
"fileData": ""
}400
// Bad request - Task has invalid status (must be ERROR or QUEUED)
{
"errors": [
{
"code": "",
"fieldName": "",
"message": "",
"messageParameters": [
{}
]
}
]
}401
// Unauthorized
403
// Forbidden - Missing api:async-task scope
404
// Task not found
{
"errors": [
{
"code": "",
"fieldName": "",
"message": "",
"messageParameters": [
{}
]
}
]
}500
// Internal error