curl --request GET \
--url https://{host}/purchase/v1/purchases/{receiptId}import requests
url = "https://{host}/purchase/v1/purchases/{receiptId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{host}/purchase/v1/purchases/{receiptId}', 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://{host}/purchase/v1/purchases/{receiptId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/purchase/v1/purchases/{receiptId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/purchase/v1/purchases/{receiptId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/purchase/v1/purchases/{receiptId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"receiptId": "<string>",
"storeId": "<string>",
"currencyCode": "<string>",
"totalAmount": 123,
"totalTaxAmount": 123,
"purchaseDateTimeUtc": "2023-11-07T05:31:56Z",
"purchaseBusinessDateTime": "2023-11-07T05:31:56Z",
"products": [
{
"id": "<string>",
"sequenceNumber": 123,
"name": "<string>",
"categoryId": "<string>",
"originalReceiptId": "<string>",
"disposalItem": {
"name": "<string>",
"unitPrice": 123,
"quantity": {
"unitOfMeasure": "<string>",
"value": 123
},
"totalAmount": 123
},
"unitPrice": 123,
"quantity": {
"unitOfMeasure": "<string>",
"value": 123
},
"originalPrice": 123,
"price": 123,
"isReturned": true,
"isCancelled": true,
"taxIncludedInPrice": true,
"taxes": [
{
"type": "<string>",
"taxableAmount": 123,
"amount": 123,
"percentage": 123
}
],
"metadata": {},
"discountAllocations": [
{
"discountSequenceNumber": 123,
"discountAmount": 123
}
]
}
],
"memberId": "<string>",
"externalDiscountCardId": "<string>",
"loyaltyCardId": "<string>",
"amountForBonusCalculation": 123,
"paymentMethods": [
{
"amount": 123,
"currencyCode": "<string>",
"conversionRate": 123,
"paymentType": "Card",
"cardPan": "<string>",
"rounding": 123,
"displayName": "<string>",
"metadata": {}
}
],
"discounts": [
{
"sequenceNumber": 123,
"name": "<string>",
"totalDiscountAmount": 123,
"couponId": "<string>",
"couponIds": [
"<string>"
],
"appliedProducts": [
123
],
"metadata": {}
}
],
"taxes": [
{
"type": "<string>",
"taxableAmount": 123,
"amount": 123,
"percentage": 123
}
],
"shipping": {
"refundAsBonus": true,
"totalAmount": 123
},
"paymentLocation": "<string>",
"checkoutType": "Pos",
"metadata": {},
"posId": "<string>",
"phone": "<string>",
"withFailedValidation": true
}{
"name": "<string>",
"message": "<string>",
"details": null
}{
"name": "<string>",
"message": "<string>",
"details": null
}Get purchase by receiptId.
Returns the purchase data if available.
curl --request GET \
--url https://{host}/purchase/v1/purchases/{receiptId}import requests
url = "https://{host}/purchase/v1/purchases/{receiptId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{host}/purchase/v1/purchases/{receiptId}', 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://{host}/purchase/v1/purchases/{receiptId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/purchase/v1/purchases/{receiptId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{host}/purchase/v1/purchases/{receiptId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/purchase/v1/purchases/{receiptId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"receiptId": "<string>",
"storeId": "<string>",
"currencyCode": "<string>",
"totalAmount": 123,
"totalTaxAmount": 123,
"purchaseDateTimeUtc": "2023-11-07T05:31:56Z",
"purchaseBusinessDateTime": "2023-11-07T05:31:56Z",
"products": [
{
"id": "<string>",
"sequenceNumber": 123,
"name": "<string>",
"categoryId": "<string>",
"originalReceiptId": "<string>",
"disposalItem": {
"name": "<string>",
"unitPrice": 123,
"quantity": {
"unitOfMeasure": "<string>",
"value": 123
},
"totalAmount": 123
},
"unitPrice": 123,
"quantity": {
"unitOfMeasure": "<string>",
"value": 123
},
"originalPrice": 123,
"price": 123,
"isReturned": true,
"isCancelled": true,
"taxIncludedInPrice": true,
"taxes": [
{
"type": "<string>",
"taxableAmount": 123,
"amount": 123,
"percentage": 123
}
],
"metadata": {},
"discountAllocations": [
{
"discountSequenceNumber": 123,
"discountAmount": 123
}
]
}
],
"memberId": "<string>",
"externalDiscountCardId": "<string>",
"loyaltyCardId": "<string>",
"amountForBonusCalculation": 123,
"paymentMethods": [
{
"amount": 123,
"currencyCode": "<string>",
"conversionRate": 123,
"paymentType": "Card",
"cardPan": "<string>",
"rounding": 123,
"displayName": "<string>",
"metadata": {}
}
],
"discounts": [
{
"sequenceNumber": 123,
"name": "<string>",
"totalDiscountAmount": 123,
"couponId": "<string>",
"couponIds": [
"<string>"
],
"appliedProducts": [
123
],
"metadata": {}
}
],
"taxes": [
{
"type": "<string>",
"taxableAmount": 123,
"amount": 123,
"percentage": 123
}
],
"shipping": {
"refundAsBonus": true,
"totalAmount": 123
},
"paymentLocation": "<string>",
"checkoutType": "Pos",
"metadata": {},
"posId": "<string>",
"phone": "<string>",
"withFailedValidation": true
}{
"name": "<string>",
"message": "<string>",
"details": null
}{
"name": "<string>",
"message": "<string>",
"details": null
}Path Parameters
Globally unique purchase ID.
Response
OK
Globally unique purchase ID.
1Id of store where payment is done.
1Local store currency code. ISO-4217 currency code - 3 characters, for example, DKK, ISK, EUR etc.
3Total price of purchased products with discounts and taxes applied. Can be negative in case when total price of returned items is greater than total price of purchased items. Decimal amount with '.' as float separator. Example: 105.55
Total amount of taxes (VAT) included in price. This amount should be included in PurchaseLoad.Api.CQRS.Query.GetPurchase.Response.TotalAmount. Decimal amount with '.' as float separator.
Date and time of the purchase in UTC. Example:'2020-04-14T11:00:00Z'.
Date and time of the purchase in store local timezone. Example:'2020-04-14T13:00:00'.
The list of purchased products.
Show child attributes
Show child attributes
Id of member who performed payment.
External discount card identifier, which is not linked to the loyalty app. Used by customer to apply some fixed discount on the purchase.
Loyalty card identifier. Used for member identification in case if memberId is not specified.
Total amount used for calculating bonus. Doesn't include lottery, bus tickets, tax-free etc. Decimal amount with '.' as float separator. Example: 10.25
All payment methods which user used to cover the purchase.
Show child attributes
Show child attributes
List of discounts applied to purchase/products. Optional. If no discounts were applied it should be missed.
Show child attributes
Show child attributes
List of summarized tax details.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The place where the purchase was made.
Pos, SelfCheckout, ScanAndPay, Online Customer specific fields
Show child attributes
Show child attributes
Id of POS where payment was done
Member's phone number
Indicates the purchase was not stored due to failed validation, but was saved for receipt display.