Adjust accrual after refund, void, or correction
curl --request POST \
--url https://loyalty.example.com/lip/v1/orders/adjust \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"context": {
"protocol_version": "<string>",
"profile": "<string>",
"request_id": "<string>",
"idempotency_key": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"source": {
"system": "<string>",
"instance": "<string>"
}
},
"member_id": "<string>",
"program_id": "<string>",
"adjustment": {
"adjustment_id": "<string>",
"original_order_id": "<string>",
"type": "<string>",
"reason": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"order_total_delta": {
"amount": 0,
"currency": "<string>"
},
"eligible_spend_delta": {
"amount": 0,
"currency": "<string>"
},
"lines": [
{
"line_id": "<string>",
"quantity_delta": 123,
"subtotal_delta": {
"amount": 0,
"currency": "<string>"
}
}
]
}
}
'import requests
url = "https://loyalty.example.com/lip/v1/orders/adjust"
payload = {
"context": {
"protocol_version": "<string>",
"profile": "<string>",
"request_id": "<string>",
"idempotency_key": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"source": {
"system": "<string>",
"instance": "<string>"
}
},
"member_id": "<string>",
"program_id": "<string>",
"adjustment": {
"adjustment_id": "<string>",
"original_order_id": "<string>",
"type": "<string>",
"reason": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"order_total_delta": {
"amount": 0,
"currency": "<string>"
},
"eligible_spend_delta": {
"amount": 0,
"currency": "<string>"
},
"lines": [
{
"line_id": "<string>",
"quantity_delta": 123,
"subtotal_delta": {
"amount": 0,
"currency": "<string>"
}
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
context: {
protocol_version: '<string>',
profile: '<string>',
request_id: '<string>',
idempotency_key: '<string>',
occurred_at: '2023-11-07T05:31:56Z',
source: {system: '<string>', instance: '<string>'}
},
member_id: '<string>',
program_id: '<string>',
adjustment: {
adjustment_id: '<string>',
original_order_id: '<string>',
type: '<string>',
reason: '<string>',
occurred_at: '2023-11-07T05:31:56Z',
order_total_delta: {amount: 0, currency: '<string>'},
eligible_spend_delta: {amount: 0, currency: '<string>'},
lines: [
{
line_id: '<string>',
quantity_delta: 123,
subtotal_delta: {amount: 0, currency: '<string>'}
}
]
}
})
};
fetch('https://loyalty.example.com/lip/v1/orders/adjust', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalty.example.com/lip/v1/orders/adjust",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'context' => [
'protocol_version' => '<string>',
'profile' => '<string>',
'request_id' => '<string>',
'idempotency_key' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z',
'source' => [
'system' => '<string>',
'instance' => '<string>'
]
],
'member_id' => '<string>',
'program_id' => '<string>',
'adjustment' => [
'adjustment_id' => '<string>',
'original_order_id' => '<string>',
'type' => '<string>',
'reason' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z',
'order_total_delta' => [
'amount' => 0,
'currency' => '<string>'
],
'eligible_spend_delta' => [
'amount' => 0,
'currency' => '<string>'
],
'lines' => [
[
'line_id' => '<string>',
'quantity_delta' => 123,
'subtotal_delta' => [
'amount' => 0,
'currency' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://loyalty.example.com/lip/v1/orders/adjust"
payload := strings.NewReader("{\n \"context\": {\n \"protocol_version\": \"<string>\",\n \"profile\": \"<string>\",\n \"request_id\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"source\": {\n \"system\": \"<string>\",\n \"instance\": \"<string>\"\n }\n },\n \"member_id\": \"<string>\",\n \"program_id\": \"<string>\",\n \"adjustment\": {\n \"adjustment_id\": \"<string>\",\n \"original_order_id\": \"<string>\",\n \"type\": \"<string>\",\n \"reason\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"order_total_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"eligible_spend_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"lines\": [\n {\n \"line_id\": \"<string>\",\n \"quantity_delta\": 123,\n \"subtotal_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://loyalty.example.com/lip/v1/orders/adjust")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"context\": {\n \"protocol_version\": \"<string>\",\n \"profile\": \"<string>\",\n \"request_id\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"source\": {\n \"system\": \"<string>\",\n \"instance\": \"<string>\"\n }\n },\n \"member_id\": \"<string>\",\n \"program_id\": \"<string>\",\n \"adjustment\": {\n \"adjustment_id\": \"<string>\",\n \"original_order_id\": \"<string>\",\n \"type\": \"<string>\",\n \"reason\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"order_total_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"eligible_spend_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"lines\": [\n {\n \"line_id\": \"<string>\",\n \"quantity_delta\": 123,\n \"subtotal_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://loyalty.example.com/lip/v1/orders/adjust")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": {\n \"protocol_version\": \"<string>\",\n \"profile\": \"<string>\",\n \"request_id\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"source\": {\n \"system\": \"<string>\",\n \"instance\": \"<string>\"\n }\n },\n \"member_id\": \"<string>\",\n \"program_id\": \"<string>\",\n \"adjustment\": {\n \"adjustment_id\": \"<string>\",\n \"original_order_id\": \"<string>\",\n \"type\": \"<string>\",\n \"reason\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"order_total_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"eligible_spend_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"lines\": [\n {\n \"line_id\": \"<string>\",\n \"quantity_delta\": 123,\n \"subtotal_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"context": {
"protocol_version": "<string>",
"profile": "<string>",
"request_id": "<string>",
"processed_at": "2023-11-07T05:31:56Z"
},
"entry": {
"entry_id": "<string>",
"member_id": "<string>",
"program_id": "<string>",
"account_id": "<string>",
"operation": "<string>",
"unit": "<string>",
"amount": 123,
"occurred_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"related_entry_id": "<string>",
"order_id": "<string>",
"location_id": "<string>",
"adjustment_id": "<string>",
"reservation_id": "<string>",
"classification": "<string>",
"reason": "<string>",
"qualifies_for_tier": true
},
"balances": [
{
"account_id": "<string>",
"member_id": "<string>",
"program_id": "<string>",
"unit": "<string>",
"amount": 123,
"reserved": 1,
"available": 123,
"as_of": "2023-11-07T05:31:56Z",
"unit_label": "<string>"
}
],
"entries": [
{
"entry_id": "<string>",
"member_id": "<string>",
"program_id": "<string>",
"account_id": "<string>",
"operation": "<string>",
"unit": "<string>",
"amount": 123,
"occurred_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"related_entry_id": "<string>",
"order_id": "<string>",
"location_id": "<string>",
"adjustment_id": "<string>",
"reservation_id": "<string>",
"classification": "<string>",
"reason": "<string>",
"qualifies_for_tier": true
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}Orders
Adjust accrual after refund, void, or correction
POST
/
orders
/
adjust
Adjust accrual after refund, void, or correction
curl --request POST \
--url https://loyalty.example.com/lip/v1/orders/adjust \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"context": {
"protocol_version": "<string>",
"profile": "<string>",
"request_id": "<string>",
"idempotency_key": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"source": {
"system": "<string>",
"instance": "<string>"
}
},
"member_id": "<string>",
"program_id": "<string>",
"adjustment": {
"adjustment_id": "<string>",
"original_order_id": "<string>",
"type": "<string>",
"reason": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"order_total_delta": {
"amount": 0,
"currency": "<string>"
},
"eligible_spend_delta": {
"amount": 0,
"currency": "<string>"
},
"lines": [
{
"line_id": "<string>",
"quantity_delta": 123,
"subtotal_delta": {
"amount": 0,
"currency": "<string>"
}
}
]
}
}
'import requests
url = "https://loyalty.example.com/lip/v1/orders/adjust"
payload = {
"context": {
"protocol_version": "<string>",
"profile": "<string>",
"request_id": "<string>",
"idempotency_key": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"source": {
"system": "<string>",
"instance": "<string>"
}
},
"member_id": "<string>",
"program_id": "<string>",
"adjustment": {
"adjustment_id": "<string>",
"original_order_id": "<string>",
"type": "<string>",
"reason": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"order_total_delta": {
"amount": 0,
"currency": "<string>"
},
"eligible_spend_delta": {
"amount": 0,
"currency": "<string>"
},
"lines": [
{
"line_id": "<string>",
"quantity_delta": 123,
"subtotal_delta": {
"amount": 0,
"currency": "<string>"
}
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
context: {
protocol_version: '<string>',
profile: '<string>',
request_id: '<string>',
idempotency_key: '<string>',
occurred_at: '2023-11-07T05:31:56Z',
source: {system: '<string>', instance: '<string>'}
},
member_id: '<string>',
program_id: '<string>',
adjustment: {
adjustment_id: '<string>',
original_order_id: '<string>',
type: '<string>',
reason: '<string>',
occurred_at: '2023-11-07T05:31:56Z',
order_total_delta: {amount: 0, currency: '<string>'},
eligible_spend_delta: {amount: 0, currency: '<string>'},
lines: [
{
line_id: '<string>',
quantity_delta: 123,
subtotal_delta: {amount: 0, currency: '<string>'}
}
]
}
})
};
fetch('https://loyalty.example.com/lip/v1/orders/adjust', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://loyalty.example.com/lip/v1/orders/adjust",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'context' => [
'protocol_version' => '<string>',
'profile' => '<string>',
'request_id' => '<string>',
'idempotency_key' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z',
'source' => [
'system' => '<string>',
'instance' => '<string>'
]
],
'member_id' => '<string>',
'program_id' => '<string>',
'adjustment' => [
'adjustment_id' => '<string>',
'original_order_id' => '<string>',
'type' => '<string>',
'reason' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z',
'order_total_delta' => [
'amount' => 0,
'currency' => '<string>'
],
'eligible_spend_delta' => [
'amount' => 0,
'currency' => '<string>'
],
'lines' => [
[
'line_id' => '<string>',
'quantity_delta' => 123,
'subtotal_delta' => [
'amount' => 0,
'currency' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://loyalty.example.com/lip/v1/orders/adjust"
payload := strings.NewReader("{\n \"context\": {\n \"protocol_version\": \"<string>\",\n \"profile\": \"<string>\",\n \"request_id\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"source\": {\n \"system\": \"<string>\",\n \"instance\": \"<string>\"\n }\n },\n \"member_id\": \"<string>\",\n \"program_id\": \"<string>\",\n \"adjustment\": {\n \"adjustment_id\": \"<string>\",\n \"original_order_id\": \"<string>\",\n \"type\": \"<string>\",\n \"reason\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"order_total_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"eligible_spend_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"lines\": [\n {\n \"line_id\": \"<string>\",\n \"quantity_delta\": 123,\n \"subtotal_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://loyalty.example.com/lip/v1/orders/adjust")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"context\": {\n \"protocol_version\": \"<string>\",\n \"profile\": \"<string>\",\n \"request_id\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"source\": {\n \"system\": \"<string>\",\n \"instance\": \"<string>\"\n }\n },\n \"member_id\": \"<string>\",\n \"program_id\": \"<string>\",\n \"adjustment\": {\n \"adjustment_id\": \"<string>\",\n \"original_order_id\": \"<string>\",\n \"type\": \"<string>\",\n \"reason\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"order_total_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"eligible_spend_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"lines\": [\n {\n \"line_id\": \"<string>\",\n \"quantity_delta\": 123,\n \"subtotal_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://loyalty.example.com/lip/v1/orders/adjust")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"context\": {\n \"protocol_version\": \"<string>\",\n \"profile\": \"<string>\",\n \"request_id\": \"<string>\",\n \"idempotency_key\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"source\": {\n \"system\": \"<string>\",\n \"instance\": \"<string>\"\n }\n },\n \"member_id\": \"<string>\",\n \"program_id\": \"<string>\",\n \"adjustment\": {\n \"adjustment_id\": \"<string>\",\n \"original_order_id\": \"<string>\",\n \"type\": \"<string>\",\n \"reason\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"order_total_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"eligible_spend_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n },\n \"lines\": [\n {\n \"line_id\": \"<string>\",\n \"quantity_delta\": 123,\n \"subtotal_delta\": {\n \"amount\": 0,\n \"currency\": \"<string>\"\n }\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"context": {
"protocol_version": "<string>",
"profile": "<string>",
"request_id": "<string>",
"processed_at": "2023-11-07T05:31:56Z"
},
"entry": {
"entry_id": "<string>",
"member_id": "<string>",
"program_id": "<string>",
"account_id": "<string>",
"operation": "<string>",
"unit": "<string>",
"amount": 123,
"occurred_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"related_entry_id": "<string>",
"order_id": "<string>",
"location_id": "<string>",
"adjustment_id": "<string>",
"reservation_id": "<string>",
"classification": "<string>",
"reason": "<string>",
"qualifies_for_tier": true
},
"balances": [
{
"account_id": "<string>",
"member_id": "<string>",
"program_id": "<string>",
"unit": "<string>",
"amount": 123,
"reserved": 1,
"available": 123,
"as_of": "2023-11-07T05:31:56Z",
"unit_label": "<string>"
}
],
"entries": [
{
"entry_id": "<string>",
"member_id": "<string>",
"program_id": "<string>",
"account_id": "<string>",
"operation": "<string>",
"unit": "<string>",
"amount": 123,
"occurred_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"related_entry_id": "<string>",
"order_id": "<string>",
"location_id": "<string>",
"adjustment_id": "<string>",
"reservation_id": "<string>",
"classification": "<string>",
"reason": "<string>",
"qualifies_for_tier": true
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 499,
"detail": "<string>",
"instance": "<string>",
"code": "<string>",
"errors": [
{
"path": "<string>",
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
Opaque, stable identifier within the owning system.
Required string length:
1 - 128Pattern:
^[A-Za-z0-9][A-Za-z0-9._:-]*$Opaque, stable identifier within the owning system.
Required string length:
1 - 128Pattern:
^[A-Za-z0-9][A-Za-z0-9._:-]*$Show child attributes
Show child attributes
⌘I