One purchase with its on-chain timeline
curl --request GET \
--url https://api.simpuru.xyz/purchases/{id}import requests
url = "https://api.simpuru.xyz/purchases/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.simpuru.xyz/purchases/{id}', 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://api.simpuru.xyz/purchases/{id}",
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://api.simpuru.xyz/purchases/{id}"
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://api.simpuru.xyz/purchases/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simpuru.xyz/purchases/{id}")
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{
"id": "<string>",
"listingId": "<string>",
"mode": "instant",
"buyerAddress": "<string>",
"txHash": "<string>",
"status": "<string>",
"events": [
{
"status": "<string>",
"txHash": "<string>",
"at": "<string>"
}
],
"escrow": {
"address": "<string>",
"inputHash": "<string>",
"resultHash": "<string>",
"identifierFromPurchaser": "<string>",
"deadlines": {
"payBy": "<string>",
"submitResult": "<string>",
"unlock": "<string>",
"externalDisputeUnlock": "<string>"
}
},
"verification": "ok"
}{
"error": "<string>"
}Purchases
One purchase with its on-chain timeline
Events are derived from chain by the seller agent (lock, result, refund request, dispute, final spend).
GET
/
purchases
/
{id}
One purchase with its on-chain timeline
curl --request GET \
--url https://api.simpuru.xyz/purchases/{id}import requests
url = "https://api.simpuru.xyz/purchases/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.simpuru.xyz/purchases/{id}', 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://api.simpuru.xyz/purchases/{id}",
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://api.simpuru.xyz/purchases/{id}"
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://api.simpuru.xyz/purchases/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.simpuru.xyz/purchases/{id}")
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{
"id": "<string>",
"listingId": "<string>",
"mode": "instant",
"buyerAddress": "<string>",
"txHash": "<string>",
"status": "<string>",
"events": [
{
"status": "<string>",
"txHash": "<string>",
"at": "<string>"
}
],
"escrow": {
"address": "<string>",
"inputHash": "<string>",
"resultHash": "<string>",
"identifierFromPurchaser": "<string>",
"deadlines": {
"payBy": "<string>",
"submitResult": "<string>",
"unlock": "<string>",
"externalDisputeUnlock": "<string>"
}
},
"verification": "ok"
}{
"error": "<string>"
}Path Parameters
Payment tx (instant) or lock tx (protected)
Response
Purchase
Payment tx (instant) or lock tx (protected).
Pattern:
^[0-9a-f]{64}$Available options:
instant, protected Cardano transaction hash.
Pattern:
^[0-9a-f]{64}$Escrow state (FundsLocked, ResultSubmitted, RefundRequested, Disputed, WithdrawAuthorized, RefundAuthorized) or a final state (settled, withdrawn, refunded, closed). withdrawing while the seller agent collects.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
ok, mismatch, no_result_yet