Note: This API is part of SimpleLoyalty Third Party V2. For more details, refer to V2 APIs
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 |
Tip: The OAuth 2.0 token can be obtained via Get OAuth Token
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"}
]
}
}
}