Skip to main content
POST
/
lbms-ingress
/
transaction-lm
/
API
/
Transaction
/
InsertTransactionData
Insert Transaction
curl --request POST \
  --url https://loyalife-api.xoxoday.in/lbms-ingress/transaction-lm/API/Transaction/InsertTransactionData \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "transaction_id": "TXN-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"
}
'
{
  "results": {
    "IsSucessful": true,
    "ErrorCode": "000",
    "ExceptionMessage": "Success",
    "ReturnObject": true
  }
}
Submits a single loyalty transaction and returns the result synchronously after the Loyalife Rule Engine has evaluated it. The Rule Engine automatically calculates how many points to award based on your program’s configured rules — you do not specify a points amount in the request. Rules can evaluate multiple attributes including transaction amount, product_code, transaction_type, member tier, and any custom attributes defined in your program. If no rule matches the transaction, the transaction succeeds but zero points are awarded — IsSucessful will still be true. Use this for real-time integrations where you need the outcome before responding to the customer. For bulk or end-of-day uploads, use Insert Transaction V2 instead.
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.

Responses

PathTypeDescription
results.IsSucessfulbooleantrue
results.ErrorCodestring000
results.ExceptionMessagestringSuccess
results.ReturnObjectbooleantrue on successful submission
PathTypeDescription
results.IsSucessfulbooleanfalse
results.ErrorCodestringError code from the platform
results.ExceptionMessagestringHuman-readable reason, e.g. Invalid product code — always check this field

Error Codes

CodeExceptionMessageCause
000SuccessTransaction accepted and queued for Rule Engine processing
006Insert failedTransaction could not be inserted
103Member does not existmember_relation_reference not found in the program
201Failed to award pointsPoints calculation or award step failed
209Transaction reference missingtransaction_id not provided
210Request DateTime invalid / missingtransaction_date is missing or in the wrong format
997Exception occurredUnexpected server-side error
999Bad requestMalformed payload or missing required fields

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
transaction_id
string
required

Your unique transaction reference

Example:

"TXN-2026-001"

amount
number
required
Example:

1500

transaction_date
string<date>
required
Example:

"2026-05-11"

product_code
string
required

Product or merchant code as configured in your program

Example:

"RETAIL001"

member_relation_reference
string
required
Example:

"jane.doe@example.com"

transaction_type
string
required

DR for debit (purchase/earn), CR for credit (reversal)

Example:

"DR"

sub_product_code
string
Example:

"ELECTRONICS"

Response

Transaction accepted