Insert Transaction V2 (Batch)
curl --request POST \
--url https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"transaction_id": "TXN-2026-001",
"_xoxo_api_client_idempotency": "order-inv-2026-001",
"amount": 1500,
"transaction_date": "2026-05-11",
"product_code": "RETAIL001",
"sub_product_code": "ELECTRONICS",
"member_relation_reference": "jane.doe@example.com",
"transaction_type": "dr"
},
{
"transaction_id": "TXN-2026-002",
"_xoxo_api_client_idempotency": "order-inv-2026-002",
"amount": 800,
"transaction_date": "2026-05-11",
"product_code": "RETAIL001",
"member_relation_reference": "john.smith@example.com",
"transaction_type": "dr"
}
]
'import requests
url = "https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2"
payload = [
{
"transaction_id": "TXN-2026-001",
"_xoxo_api_client_idempotency": "order-inv-2026-001",
"amount": 1500,
"transaction_date": "2026-05-11",
"product_code": "RETAIL001",
"sub_product_code": "ELECTRONICS",
"member_relation_reference": "jane.doe@example.com",
"transaction_type": "dr"
},
{
"transaction_id": "TXN-2026-002",
"_xoxo_api_client_idempotency": "order-inv-2026-002",
"amount": 800,
"transaction_date": "2026-05-11",
"product_code": "RETAIL001",
"member_relation_reference": "john.smith@example.com",
"transaction_type": "dr"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
transaction_id: 'TXN-2026-001',
_xoxo_api_client_idempotency: 'order-inv-2026-001',
amount: 1500,
transaction_date: '2026-05-11',
product_code: 'RETAIL001',
sub_product_code: 'ELECTRONICS',
member_relation_reference: 'jane.doe@example.com',
transaction_type: 'dr'
},
{
transaction_id: 'TXN-2026-002',
_xoxo_api_client_idempotency: 'order-inv-2026-002',
amount: 800,
transaction_date: '2026-05-11',
product_code: 'RETAIL001',
member_relation_reference: 'john.smith@example.com',
transaction_type: 'dr'
}
])
};
fetch('https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'transaction_id' => 'TXN-2026-001',
'_xoxo_api_client_idempotency' => 'order-inv-2026-001',
'amount' => 1500,
'transaction_date' => '2026-05-11',
'product_code' => 'RETAIL001',
'sub_product_code' => 'ELECTRONICS',
'member_relation_reference' => 'jane.doe@example.com',
'transaction_type' => 'dr'
],
[
'transaction_id' => 'TXN-2026-002',
'_xoxo_api_client_idempotency' => 'order-inv-2026-002',
'amount' => 800,
'transaction_date' => '2026-05-11',
'product_code' => 'RETAIL001',
'member_relation_reference' => 'john.smith@example.com',
'transaction_type' => 'dr'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2"
payload := strings.NewReader("[\n {\n \"transaction_id\": \"TXN-2026-001\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-001\",\n \"amount\": 1500,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"sub_product_code\": \"ELECTRONICS\",\n \"member_relation_reference\": \"jane.doe@example.com\",\n \"transaction_type\": \"dr\"\n },\n {\n \"transaction_id\": \"TXN-2026-002\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-002\",\n \"amount\": 800,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"member_relation_reference\": \"john.smith@example.com\",\n \"transaction_type\": \"dr\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"transaction_id\": \"TXN-2026-001\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-001\",\n \"amount\": 1500,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"sub_product_code\": \"ELECTRONICS\",\n \"member_relation_reference\": \"jane.doe@example.com\",\n \"transaction_type\": \"dr\"\n },\n {\n \"transaction_id\": \"TXN-2026-002\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-002\",\n \"amount\": 800,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"member_relation_reference\": \"john.smith@example.com\",\n \"transaction_type\": \"dr\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"transaction_id\": \"TXN-2026-001\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-001\",\n \"amount\": 1500,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"sub_product_code\": \"ELECTRONICS\",\n \"member_relation_reference\": \"jane.doe@example.com\",\n \"transaction_type\": \"dr\"\n },\n {\n \"transaction_id\": \"TXN-2026-002\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-002\",\n \"amount\": 800,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"member_relation_reference\": \"john.smith@example.com\",\n \"transaction_type\": \"dr\"\n }\n]"
response = http.request(request)
puts response.read_body{
"results": {
"IsSucessful": true,
"ErrorCode": "001",
"ExceptionMessage": "Success",
"ReturnObject": {
"batch_id": "abc_1759321530_123",
"message": "Transactions queued successfully",
"total_transactions": 3,
"transactions": [
{
"member_relation_reference": "M00001",
"transaction_id": "TXN-1001",
"transaction_type": "dr",
"request_id": "req_a1b2c3d4..."
},
{
"member_relation_reference": "M00001",
"transaction_id": "TXN-1001",
"transaction_type": "cr",
"request_id": "req_e5f6g7h8..."
},
{
"member_relation_reference": "M00002",
"transaction_id": "TXN-1002",
"transaction_type": "dr",
"request_id": "req_i9j0k1l2..."
}
]
},
"Count": 0
}
}Transactions
Insert Transaction V2 (Batch)
Submit one or more Loyalife transactions asynchronously for bulk, high-volume processing.
POST
/
lbms-ingress
/
transaction-lm
/
API
/
Transaction
/
InsertTransactionDataV2
Insert Transaction V2 (Batch)
curl --request POST \
--url https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"transaction_id": "TXN-2026-001",
"_xoxo_api_client_idempotency": "order-inv-2026-001",
"amount": 1500,
"transaction_date": "2026-05-11",
"product_code": "RETAIL001",
"sub_product_code": "ELECTRONICS",
"member_relation_reference": "jane.doe@example.com",
"transaction_type": "dr"
},
{
"transaction_id": "TXN-2026-002",
"_xoxo_api_client_idempotency": "order-inv-2026-002",
"amount": 800,
"transaction_date": "2026-05-11",
"product_code": "RETAIL001",
"member_relation_reference": "john.smith@example.com",
"transaction_type": "dr"
}
]
'import requests
url = "https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2"
payload = [
{
"transaction_id": "TXN-2026-001",
"_xoxo_api_client_idempotency": "order-inv-2026-001",
"amount": 1500,
"transaction_date": "2026-05-11",
"product_code": "RETAIL001",
"sub_product_code": "ELECTRONICS",
"member_relation_reference": "jane.doe@example.com",
"transaction_type": "dr"
},
{
"transaction_id": "TXN-2026-002",
"_xoxo_api_client_idempotency": "order-inv-2026-002",
"amount": 800,
"transaction_date": "2026-05-11",
"product_code": "RETAIL001",
"member_relation_reference": "john.smith@example.com",
"transaction_type": "dr"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
transaction_id: 'TXN-2026-001',
_xoxo_api_client_idempotency: 'order-inv-2026-001',
amount: 1500,
transaction_date: '2026-05-11',
product_code: 'RETAIL001',
sub_product_code: 'ELECTRONICS',
member_relation_reference: 'jane.doe@example.com',
transaction_type: 'dr'
},
{
transaction_id: 'TXN-2026-002',
_xoxo_api_client_idempotency: 'order-inv-2026-002',
amount: 800,
transaction_date: '2026-05-11',
product_code: 'RETAIL001',
member_relation_reference: 'john.smith@example.com',
transaction_type: 'dr'
}
])
};
fetch('https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'transaction_id' => 'TXN-2026-001',
'_xoxo_api_client_idempotency' => 'order-inv-2026-001',
'amount' => 1500,
'transaction_date' => '2026-05-11',
'product_code' => 'RETAIL001',
'sub_product_code' => 'ELECTRONICS',
'member_relation_reference' => 'jane.doe@example.com',
'transaction_type' => 'dr'
],
[
'transaction_id' => 'TXN-2026-002',
'_xoxo_api_client_idempotency' => 'order-inv-2026-002',
'amount' => 800,
'transaction_date' => '2026-05-11',
'product_code' => 'RETAIL001',
'member_relation_reference' => 'john.smith@example.com',
'transaction_type' => 'dr'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2"
payload := strings.NewReader("[\n {\n \"transaction_id\": \"TXN-2026-001\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-001\",\n \"amount\": 1500,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"sub_product_code\": \"ELECTRONICS\",\n \"member_relation_reference\": \"jane.doe@example.com\",\n \"transaction_type\": \"dr\"\n },\n {\n \"transaction_id\": \"TXN-2026-002\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-002\",\n \"amount\": 800,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"member_relation_reference\": \"john.smith@example.com\",\n \"transaction_type\": \"dr\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"transaction_id\": \"TXN-2026-001\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-001\",\n \"amount\": 1500,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"sub_product_code\": \"ELECTRONICS\",\n \"member_relation_reference\": \"jane.doe@example.com\",\n \"transaction_type\": \"dr\"\n },\n {\n \"transaction_id\": \"TXN-2026-002\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-002\",\n \"amount\": 800,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"member_relation_reference\": \"john.smith@example.com\",\n \"transaction_type\": \"dr\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionDataV2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"transaction_id\": \"TXN-2026-001\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-001\",\n \"amount\": 1500,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"sub_product_code\": \"ELECTRONICS\",\n \"member_relation_reference\": \"jane.doe@example.com\",\n \"transaction_type\": \"dr\"\n },\n {\n \"transaction_id\": \"TXN-2026-002\",\n \"_xoxo_api_client_idempotency\": \"order-inv-2026-002\",\n \"amount\": 800,\n \"transaction_date\": \"2026-05-11\",\n \"product_code\": \"RETAIL001\",\n \"member_relation_reference\": \"john.smith@example.com\",\n \"transaction_type\": \"dr\"\n }\n]"
response = http.request(request)
puts response.read_body{
"results": {
"IsSucessful": true,
"ErrorCode": "001",
"ExceptionMessage": "Success",
"ReturnObject": {
"batch_id": "abc_1759321530_123",
"message": "Transactions queued successfully",
"total_transactions": 3,
"transactions": [
{
"member_relation_reference": "M00001",
"transaction_id": "TXN-1001",
"transaction_type": "dr",
"request_id": "req_a1b2c3d4..."
},
{
"member_relation_reference": "M00001",
"transaction_id": "TXN-1001",
"transaction_type": "cr",
"request_id": "req_e5f6g7h8..."
},
{
"member_relation_reference": "M00002",
"transaction_id": "TXN-1002",
"transaction_type": "dr",
"request_id": "req_i9j0k1l2..."
}
]
},
"Count": 0
}
}Accepts an array of loyalty transactions and queues them for asynchronous processing by the Rule Engine. The Rule Engine automatically calculates points for each transaction based on your program rules — you do not specify points amounts. The API returns immediately with a
batch_id; processing happens in the background.
There is currently no enforced batch size limit, but keeping batches under 100 transactions is strongly recommended for performance. A batch size limit of 100 may be enforced in a future release.
Timestamps are in the timezone of your deployment environment. For cloud deployments confirm the timezone with your Xoxoday implementation contact. For on-premise deployments, the server timezone applies.
transaction_id is not deduplicated server-side by default. Use _xoxo_api_client_idempotency for safe retries — reuse the same value when retrying, generate a new one only for a genuinely new submission. See Idempotency.Responses
202 — Accepted
202 — Accepted
| Path | Type | Description |
|---|---|---|
results.IsSucessful | boolean | true |
results.ErrorCode | string | 001 — note: this endpoint returns 001 (not 000) on success |
results.ExceptionMessage | string | Success |
results.ReturnObject.batch_id | string | Identifies this batch — e.g. abc_1759321530_123. Pass to Poll Batch Status. |
results.ReturnObject.message | string | Transactions queued successfully |
results.ReturnObject.total_transactions | integer | Number of transactions accepted into the batch |
results.ReturnObject.transactions | array | One entry per transaction submitted in the batch |
results.ReturnObject.transactions[].member_relation_reference | string | The member identifier from the request |
results.ReturnObject.transactions[].transaction_id | string | The transaction_id from the request |
results.ReturnObject.transactions[].transaction_type | string | dr (debit / earn) or cr (credit / reversal) |
results.ReturnObject.transactions[].request_id | string | Server-assigned unique ID for this queued item — use for support or tracing |
{
"results": {
"IsSucessful": true,
"ErrorCode": "001",
"ExceptionMessage": "Success",
"ReturnObject": {
"batch_id": "abc_1759321530_123",
"message": "Transactions queued successfully",
"total_transactions": 3,
"transactions": [
{
"member_relation_reference": "M00001",
"transaction_id": "TXN-1001",
"transaction_type": "dr",
"request_id": "req_a1b2c3d4..."
},
{
"member_relation_reference": "M00001",
"transaction_id": "TXN-1001",
"transaction_type": "cr",
"request_id": "req_e5f6g7h8..."
},
{
"member_relation_reference": "M00002",
"transaction_id": "TXN-1002",
"transaction_type": "dr",
"request_id": "req_i9j0k1l2..."
}
]
}
}
}
Authorizations
JWT obtained from Generate Auth Token. Pass as Authorization: bearer {token}.
Query Parameters
Your loyalty program ID
Example:
19
Body
application/json
Example:
1500
Example:
"2026-05-11"
Example:
"RETAIL001"
Example:
"jane.doe@example.com"
DR for purchase/earn, CR for reversal
Example:
"dr"
Example:
"TXN-2026-001"
Idempotency key for safe retries. Reuse on retry; new value for genuinely new submissions.
Example:
"order-inv-2026-001"
Example:
"ELECTRONICS"
Response
202 - application/json
Transactions queued
Show child attributes
Show child attributes
⌘I