Description

Void a transaction in the SimpleLoyalty database.

Parameters

Parameter Type Value Required
operation_name String voidCollection true
variables JSON $JSON_OBJECT true

$JSON_OBJECT Structure

Key Type Description Required
outletId String SimpleLoyalty Outlet ID true
transactionNumber String Transaction number from source system true

Example

Sample Request

curl \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OAUTH_TOKEN" \
-d '{
        "operation_name": "voidCollection",
        "variables": {
            "outletId": $OUTLET_ID,
            "transactionNumber": "TRANSACTION123"
        }
    }' \
https://simpleloyalty.com/third_party/v2

Sample Success Response

{
  "data": {
    "voidCollection": {
      "result": "OK",
      "errors": []
    }
  }
}

Sample Error Response

{
  "data": {
    "voidCollection": {
      "result": "ERROR",
      "errors": [
        {"message": "Invalid transaction number"}
      ]
    }
  }
}