Create a listing
curl --request POST \
--url https://app.d-sports.org/api/v1/marketplace/listings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-listing-pin-token: <x-listing-pin-token>' \
--data '
{
"itemId": "<string>",
"salePrice": 123,
"openToTradeOffers": true,
"startingBid": 123,
"askingPrice": 123,
"buyNowPrice": 123,
"reservePrice": 2,
"tradeCriteria": {}
}
'import requests
url = "https://app.d-sports.org/api/v1/marketplace/listings"
payload = {
"itemId": "<string>",
"salePrice": 123,
"openToTradeOffers": True,
"startingBid": 123,
"askingPrice": 123,
"buyNowPrice": 123,
"reservePrice": 2,
"tradeCriteria": {}
}
headers = {
"x-listing-pin-token": "<x-listing-pin-token>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-listing-pin-token': '<x-listing-pin-token>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
itemId: '<string>',
salePrice: 123,
openToTradeOffers: true,
startingBid: 123,
askingPrice: 123,
buyNowPrice: 123,
reservePrice: 2,
tradeCriteria: {}
})
};
fetch('https://app.d-sports.org/api/v1/marketplace/listings', 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://app.d-sports.org/api/v1/marketplace/listings",
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([
'itemId' => '<string>',
'salePrice' => 123,
'openToTradeOffers' => true,
'startingBid' => 123,
'askingPrice' => 123,
'buyNowPrice' => 123,
'reservePrice' => 2,
'tradeCriteria' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-listing-pin-token: <x-listing-pin-token>"
],
]);
$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://app.d-sports.org/api/v1/marketplace/listings"
payload := strings.NewReader("{\n \"itemId\": \"<string>\",\n \"salePrice\": 123,\n \"openToTradeOffers\": true,\n \"startingBid\": 123,\n \"askingPrice\": 123,\n \"buyNowPrice\": 123,\n \"reservePrice\": 2,\n \"tradeCriteria\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-listing-pin-token", "<x-listing-pin-token>")
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://app.d-sports.org/api/v1/marketplace/listings")
.header("x-listing-pin-token", "<x-listing-pin-token>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"itemId\": \"<string>\",\n \"salePrice\": 123,\n \"openToTradeOffers\": true,\n \"startingBid\": 123,\n \"askingPrice\": 123,\n \"buyNowPrice\": 123,\n \"reservePrice\": 2,\n \"tradeCriteria\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.d-sports.org/api/v1/marketplace/listings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-listing-pin-token"] = '<x-listing-pin-token>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"itemId\": \"<string>\",\n \"salePrice\": 123,\n \"openToTradeOffers\": true,\n \"startingBid\": 123,\n \"askingPrice\": 123,\n \"buyNowPrice\": 123,\n \"reservePrice\": 2,\n \"tradeCriteria\": {}\n}"
response = http.request(request)
puts response.read_bodyMarketplace
Create a listing
Requires a valid x-listing-pin-token for the caller. Optional reservePrice on auctions only.
POST
/
api
/
v1
/
marketplace
/
listings
Create a listing
curl --request POST \
--url https://app.d-sports.org/api/v1/marketplace/listings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-listing-pin-token: <x-listing-pin-token>' \
--data '
{
"itemId": "<string>",
"salePrice": 123,
"openToTradeOffers": true,
"startingBid": 123,
"askingPrice": 123,
"buyNowPrice": 123,
"reservePrice": 2,
"tradeCriteria": {}
}
'import requests
url = "https://app.d-sports.org/api/v1/marketplace/listings"
payload = {
"itemId": "<string>",
"salePrice": 123,
"openToTradeOffers": True,
"startingBid": 123,
"askingPrice": 123,
"buyNowPrice": 123,
"reservePrice": 2,
"tradeCriteria": {}
}
headers = {
"x-listing-pin-token": "<x-listing-pin-token>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-listing-pin-token': '<x-listing-pin-token>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
itemId: '<string>',
salePrice: 123,
openToTradeOffers: true,
startingBid: 123,
askingPrice: 123,
buyNowPrice: 123,
reservePrice: 2,
tradeCriteria: {}
})
};
fetch('https://app.d-sports.org/api/v1/marketplace/listings', 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://app.d-sports.org/api/v1/marketplace/listings",
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([
'itemId' => '<string>',
'salePrice' => 123,
'openToTradeOffers' => true,
'startingBid' => 123,
'askingPrice' => 123,
'buyNowPrice' => 123,
'reservePrice' => 2,
'tradeCriteria' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-listing-pin-token: <x-listing-pin-token>"
],
]);
$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://app.d-sports.org/api/v1/marketplace/listings"
payload := strings.NewReader("{\n \"itemId\": \"<string>\",\n \"salePrice\": 123,\n \"openToTradeOffers\": true,\n \"startingBid\": 123,\n \"askingPrice\": 123,\n \"buyNowPrice\": 123,\n \"reservePrice\": 2,\n \"tradeCriteria\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-listing-pin-token", "<x-listing-pin-token>")
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://app.d-sports.org/api/v1/marketplace/listings")
.header("x-listing-pin-token", "<x-listing-pin-token>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"itemId\": \"<string>\",\n \"salePrice\": 123,\n \"openToTradeOffers\": true,\n \"startingBid\": 123,\n \"askingPrice\": 123,\n \"buyNowPrice\": 123,\n \"reservePrice\": 2,\n \"tradeCriteria\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.d-sports.org/api/v1/marketplace/listings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-listing-pin-token"] = '<x-listing-pin-token>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"itemId\": \"<string>\",\n \"salePrice\": 123,\n \"openToTradeOffers\": true,\n \"startingBid\": 123,\n \"askingPrice\": 123,\n \"buyNowPrice\": 123,\n \"reservePrice\": 2,\n \"tradeCriteria\": {}\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Clerk session token. Use Authorization: Bearer .
Headers
PIN verification token. Missing or invalid → 401 PIN_TOKEN_INVALID.
Body
application/json
Available options:
card, pack Available options:
sale, auction, trade Available options:
1, 3, 7, 14 Required range:
x >= 1Response
{ success, data: { listing } }
Was this page helpful?
