Edit Member Transaction
1 min
PATCH
https://api.b.preview.loyaltyservices.io/api/v3/members/{memberIdentifier}/transactions/{transactionId}
Path Parameters
- memberIdentifierstringrequiredDescriptionMin Length1Max Length200
- transactionIdstringrequiredDescription
Query Parameters
- validateOnlybooleanDescriptionDefaultfalse
Body Parameters
- bodyMemberTransactionUpdateRequestrequired
- referenceIdstringExampleDescription
- transactionDateTimestringExampleDescription
- hotelTransactionHotelTransaction
- checkInDatestring<date>DescriptionFormatdate
- checkOutDatestring<date>DescriptionFormatdate
- eligibleStaysinteger<int32>DescriptionFormatint32
- eligibleCappedNightsinteger<int32>DescriptionFormatint32
- eligibleNightsinteger<int32>DescriptionFormatint32
- roomNumberstringDescription
- roomTypestringDescription
- roomRatenumberDescription
- roomRateIntlnumberDescription
- totalRevenueAmountnumberDescription
- totalRevenueAmountIntlnumberDescription
- loyaltyEligibleAmountnumberDescription
- loyaltyEligibleAmountIntlnumberDescription
- loyaltyIneligibleAmountnumberDescription
- loyaltyIneligibleAmountIntlnumberDescription
- isoCurrencyCodestringDescription
- bookingSourcestringDescription
- paymentCodestringDescription
- purposeOfVisitstringDescription
- travelAgentNamestringDescription
- groupNamestringDescription
- companyNamestringDescription
- reservationConfirmationNumberstringDescription
- noShowbooleanDescription
- pmsConfirmationNumberstringDescription
- overlappingStayPoolIdstringDescription
- nonStayIndicatorbooleanDescription
- nonStayLocationIdstringDescription
- nonStayEligibleRevenuenumberDescription
- nonStayEligibleRevenueIntlnumberDescription
- nonStayIneligibleRevenuenumberDescription
- nonStayIneligibleRevenueIntlnumberDescription
- checkNumberstringDescription
- transactionAdjustmentobjectrequiredDescription
- reasonCodestringrequiredExampleDescription
- commentsstringrequiredExampleDescription
Responses
200
- EditMemberTransactionResponse
- totalRevenueAmountnumberExampleDescription
- totalRevenueAmountIntlnumberExampleDescription
- loyaltyEligibleAmountnumberExampleDescription
- loyaltyEligibleAmountIntlnumberExampleDescription
- loyaltyIneligibleAmountnumberExampleDescription
- loyaltyIneligibleAmountIntlnumberExampleDescription
- basePointsnumberExampleDescription
400
- ErrorResponse
- errorsValidationError[]Description
- codestringDescription
- fieldNamestringDescription
- messagestringDescription
- messageParametersobject[]Description
401
403
500
curl
curl --request PATCH \
--url 'https://api.b.preview.loyaltyservices.io/api/v3/members/{memberIdentifier}/transactions/{transactionId}?validateOnly=boolean' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"transactionAdjustment": {
"reasonCode": "RETRO_CREDIT",
"comments": "Retroactive points credit for qualifying stay"
}
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"transactionAdjustment": {
"reasonCode": "RETRO_CREDIT",
"comments": "Retroactive points credit for qualifying stay"
}
});
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.b.preview.loyaltyservices.io/api/v3/members/{memberIdentifier}/transactions/{transactionId}?validateOnly=boolean", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.b.preview.loyaltyservices.io/api/v3/members/{memberIdentifier}/transactions/{transactionId}?validateOnly=boolean")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"transactionAdjustment": {
"reasonCode": "RETRO_CREDIT",
"comments": "Retroactive points credit for qualifying stay"
}
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.b.preview.loyaltyservices.io/api/v3/members/{memberIdentifier}/transactions/{transactionId}?validateOnly=boolean"
payload = json.dumps({
"transactionAdjustment": {
"reasonCode": "RETRO_CREDIT",
"comments": "Retroactive points credit for qualifying stay"
}
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
200
// Success
{
"totalRevenueAmount": 375,
"totalRevenueAmountIntl": 8500,
"loyaltyEligibleAmount": 275,
"loyaltyEligibleAmountIntl": 5250,
"loyaltyIneligibleAmount": 100,
"loyaltyIneligibleAmountIntl": 3250,
"basePoints": 950
}400
// Bad request
{
"errors": [
{
"code": "",
"fieldName": "",
"message": "",
"messageParameters": [
{}
]
}
]
}401
// Unauthorized
403
// Forbidden
500
// Internal error