Patch Member Transaction
1 min
PATCH
https://api.b.preview.loyaltyservices.io/api/v4/members/{memberIdentifier}/transactions/{transactionId}
Path Parameters
- memberIdentifierstringrequiredDescriptionMin Length1Max Length200
- transactionIdstringrequiredDescription
Query Parameters
- validateOnlybooleanDescriptionDefaultfalse
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/v4/members/{memberIdentifier}/transactions/{transactionId}?validateOnly=boolean' \
--header 'accept: application/json'ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.b.preview.loyaltyservices.io/api/v4/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/merge-patch+json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.b.preview.loyaltyservices.io/api/v4/members/{memberIdentifier}/transactions/{transactionId}?validateOnly=boolean"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/merge-patch+json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
java
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/merge-patch+json");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.b.preview.loyaltyservices.io/api/v4/members/{memberIdentifier}/transactions/{transactionId}?validateOnly=boolean")
.method("PATCH", body)
.addHeader("accept", "application/json")
.addHeader("content-type", "application/merge-patch+json")
.build();
Response response = client.newCall(request).execute();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