Skip to main content
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"
  }
]
'
{
  "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

PathTypeDescription
results.IsSucessfulbooleantrue
results.ErrorCodestring001 — note: this endpoint returns 001 (not 000) on success
results.ExceptionMessagestringSuccess
results.ReturnObject.batch_idstringIdentifies this batch — e.g. abc_1759321530_123. Pass to Poll Batch Status.
results.ReturnObject.messagestringTransactions queued successfully
results.ReturnObject.total_transactionsintegerNumber of transactions accepted into the batch
results.ReturnObject.transactionsarrayOne entry per transaction submitted in the batch
results.ReturnObject.transactions[].member_relation_referencestringThe member identifier from the request
results.ReturnObject.transactions[].transaction_idstringThe transaction_id from the request
results.ReturnObject.transactions[].transaction_typestringdr (debit / earn) or cr (credit / reversal)
results.ReturnObject.transactions[].request_idstringServer-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

Authorization
string
header
required

JWT obtained from Generate Auth Token. Pass as Authorization: bearer {token}.

Query Parameters

pintProgramId
integer
required

Your loyalty program ID

Example:

19

Body

application/json
amount
number
required
Example:

1500

transaction_date
string<date>
required
Example:

"2026-05-11"

product_code
string
required
Example:

"RETAIL001"

member_relation_reference
string
required
Example:

"jane.doe@example.com"

transaction_type
string
required

DR for purchase/earn, CR for reversal

Example:

"dr"

transaction_id
string
Example:

"TXN-2026-001"

_xoxo_api_client_idempotency
string

Idempotency key for safe retries. Reuse on retry; new value for genuinely new submissions.

Example:

"order-inv-2026-001"

sub_product_code
string
Example:

"ELECTRONICS"

Response

202 - application/json

Transactions queued

results
object