Submit multiple async operations
1 min
POST
https://api.b.preview.loyaltyservices.io/api/v3/async-task-batches
Query Parameters
- typeCodestringrequiredExampleDescription
Form Parameters
- filestring<binary>Formatbinary
Responses
200
- AsyncTaskBatch
- asyncTaskBatchIdinteger
- taskTypeCodestringExampleDescription
- taskCodestringExampleDescription
- schemastringExampleDescription
- fileNamestringDescription
- lineCountintegerDescription
400
- ErrorResponse
- errorsValidationError[]Description
- codestringDescription
- fieldNamestringDescription
- messagestringDescription
- messageParametersobject[]Description
401
403
500
curl
curl --request POST \
--url 'https://api.b.preview.loyaltyservices.io/api/v3/async-task-batches?typeCode=postBonusTransactionDefaultSchema' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "multipart/form-data");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.b.preview.loyaltyservices.io/api/v3/async-task-batches?typeCode=postBonusTransactionDefaultSchema", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "net/http"
url = URI("https://api.b.preview.loyaltyservices.io/api/v3/async-task-batches?typeCode=postBonusTransactionDefaultSchema")
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"] = "multipart/form-data"
response = https.request(request)
puts response.read_body
python
import requests
url = "https://api.b.preview.loyaltyservices.io/api/v3/async-task-batches?typeCode=postBonusTransactionDefaultSchema"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'multipart/form-data'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Success
{
"asyncTaskBatchId": 0,
"taskTypeCode": "PlatformAPI",
"taskCode": "enrollMember",
"schema": "DefaultSchema",
"fileName": "",
"lineCount": 0
}400
// Bad request
{
"errors": [
{
"code": "",
"fieldName": "",
"message": "",
"messageParameters": [
{}
]
}
]
}401
// Unauthorized
403
// Forbidden
500
// Internal error