Welcome to the Bordeaux Index Developer Hub. This documentation guides you through integrating with Bordeaux Index’s APIs — a suite of interfaces that let you access and interact with the BI marketplace and your portfolio. To support smooth integration, we provide dedicated testing environments, allowing you to explore functionality without affecting live data. The code examples below use these test servers, and we strongly recommend integrating with them first before switching to production.
The APIs are available in versions 1 and 2. While version 1 is still supported and maintained, it will be deprecated in the future. Therefore, we recommend integrating with version 2, which is more stable, consistent, and feature-rich.
Version 1:
Version 2:
All future implementations will use version 2, as it will continue to be actively maintained.
If you want to integrate your system with our APIs, please contact us at [email protected]. We'll assist you in setting up on our testing environment using mock data, allowing you to prepare your system for production before trading on live servers.
Once you're satisfied with your application's performance and functionality, you'll be asked to register and create credentials for the live servers. You can then replace your testing credentials with these live credentials in your application, and you'll be ready to trade!
We're here to help — if you have any questions or suggestions, please don’t hesitate to reach out.
const url = "https://uat-api.biwine.com/v2/user/register";
const data = {
email: "[email protected]",
password: "yourpassword123",
country: "GB",
salesLedger: "SL001",
purchaseLedger: "PL001",
forename: "John",
surname: "Doe",
companyName: "Doe Enterprises"
};
fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(data)
})
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
return response.json();
})
.then(result => {
console.log("Success:", result);
})
.catch(error => {
console.error("Error:", error);
});
import requests
# API endpoint
url = "https://uat-api.biwine.com/v2/user/login"
# Request payload
payload = {
"email": "[email protected]",
"password": "yourpassword123",
"salesLedger": "SL001",
"purchaseLedger": "PL001"
}
# Request headers
headers = {
"Content-Type": "application/json"
}
# Send POST request
response = requests.post(url, json=payload, headers=headers)
# Check response status and extract token
try:
response.raise_for_status() # Raise an error for HTTP codes >= 400
data = response.json()
token = data.get("token")
if token:
print("Login successful!")
else:
print("Token not found in the response.")
except requests.exceptions.HTTPError as err:
print("HTTP error:", err)
except ValueError:
print("Failed to parse JSON response.")
except Exception as e:
print("Unexpected error:", e)
import requests
# URL of the API endpoint
url = "https://uat-api.biwine.com/v2/user/resendVerificationEmail"
# JSON body to be sent in the request
payload = {
"email": "string",
"salesLedger": "string",
"purchaseLedger": "string"
}
# Headers, if required
headers = {
"Content-Type": "application/json"
}
# Send the POST request
response = requests.post(url, json=payload, headers=headers)
# Print the response status and body
print("Status Code:", response.status_code)
print("Response Body:", response.text)
import requests
# API endpoint URL
url = "https://uat-api.biwine.com/v2/user/requestPasswordReset"
# JSON payload
payload = {
"email": "string",
"salesLedger": "string",
"purchaseLedger": "string"
}
# Headers
headers = {
"Content-Type": "application/json"
}
# Send the POST request
try:
response = requests.post(url, json=payload, headers=headers)
# Output the response
print("Status Code:", response.status_code)
print("Response Body:", response.text)
except requests.exceptions.RequestException as e:
print("Request failed:", e)
import requests
# Your Bearer token from login
token = "YOUR_JWT_TOKEN_HERE or ENV VARIABLE"
# Endpoint
url = "https://uat-api.biwine.com/v2/user/account/storage/locations"
# Headers
headers = {
"Authorization": f"Bearer {token}",
"Accept": "application/json"
}
# Make GET request
response = requests.get(url, headers=headers)
# Handle response
if response.status_code == 200:
try:
data = response.json()
results = data.get("results", [])
if not results:
print("No results found.")
else:
for item in results:
name = item.get("name", "Unknown")
print("-", name)
except ValueError:
print("Invalid JSON in response.")
else:
print(f"Request failed. Status code: {response.status_code}")
print(response.text)
import requests
# Your Bearer token from login
token = "YOUR_JWT_TOKEN_HERE or ENV VARIABLE"
# Endpoint
url = "https://uat-api.biwine.com/v2/user/account/addresses/delivery"
# Headers
headers = {
"Authorization": f"Bearer {token}",
"Accept": "application/json"
}
# Make GET request
response = requests.get(url, headers=headers)
# Handle response
if response.status_code == 200:
try:
data = response.json()
results = data.get("results", [])
if not results:
print("No results found.")
else:
for item in results:
addressLine1 = item.get("addressLine1", "Unknown")
print("-", addressLine1)
except ValueError:
print("Invalid JSON in response.")
else:
print(f"Request failed. Status code: {response.status_code}")
print(response.text)
import requests
# Your Bearer token from login
token = "YOUR_JWT_TOKEN_HERE or ENV VARIABLE"
# Endpoint
url = "https://uat-api.biwine.com/v2/producer"
# Headers
headers = {
"Authorization": f"Bearer {token}",
"Accept": "application/json"
}
# Make GET request
response = requests.get(url, headers=headers)
# Handle response
if response.status_code == 200:
try:
data = response.json()
results = data.get("results", [])
if not results:
print("No results found.")
else:
for item in results:
name = item.get("name", "Unknown")
print("-", name)
except ValueError:
print("Invalid JSON in response.")
else:
print(f"Request failed. Status code: {response.status_code}")
print(response.text)
import requests
# Your Bearer token from login
token = "YOUR_JWT_TOKEN_HERE or ENV VARIABLE"
bipid = "YOUR_BIPID_HERE"
# Endpoint
url = f"https://uat-api.biwine.com/v2/producer/{bipid}"
# Headers
headers = {
"Authorization": f"Bearer {token}",
"Accept": "application/json"
}
# Make GET request
response = requests.get(url, headers=headers)
# Handle response
if response.status_code == 200:
try:
data = response.json()
results = data.get("results", [])
if not results:
print("No results found.")
else:
for item in results:
name = item.get("name", "Unknown")
print("-", name)
except ValueError:
print("Invalid JSON in response.")
else:
print(f"Request failed. Status code: {response.status_code}")
print(response.text)
import requests
# Your Bearer token from login
token = "YOUR_JWT_TOKEN_HERE or ENV VARIABLE"
# Endpoint
url = "https://uat-api.biwine.com/v2/market"
# Headers
headers = {
"Authorization": f"Bearer {token}",
"Accept": "application/json"
}
# Make GET request
response = requests.get(url, headers=headers)
# Handle response
if response.status_code == 200:
try:
data = response.json()
results = data.get("results", [])
if not results:
print("No results found.")
else:
print("Wine names:")
for item in results:
name = item.get("productName", "Unknown")
print("-", name)
except ValueError:
print("Invalid JSON in response.")
else:
print(f"Request failed. Status code: {response.status_code}")
print(response.text)
const token = "YOUR_JWT_TOKEN_HERE"; // Replace with your actual token
const lwin18 = "100006920071200750"; // Example lwin18 value
const url = `https://uat-api.biwine.com/v2/market/lwin18/${lwin18}`;
fetch(url, {
method: "GET",
headers: {
"Authorization": `Bearer ${token}`,
"Accept": "application/json"
}
})
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! Status: ${response.status}`);
}
return response.json();
})
.then(data => {
const productName = data.lwinProductName;
if (productName) {
console.log("Product Name:", productName);
} else {
console.log("lwinProductName not found in response.");
}
})
.catch(error => {
console.error("Error:", error);
});
import requests
# Replace with your actual token
token = "YOUR_JWT_TOKEN_HERE or ENV VARIABLE"
# ISO-formatted datetime query param
from_datetime = "2025-04-30T00:00:00.000Z" # adjust as needed
# API endpoint with query param
url = "https://uat-api.biwine.com/v2/market/delta"
params = {
"fromDateTime": from_datetime
}
# Authorization headers
headers = {
"Authorization": f"Bearer {token}",
"Accept": "application/json"
}
# Send GET request
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
data = response.json()
results = data.get("results", [])
if results:
first_result = results[0]
changes = first_result.get("changesSince", {})
bids = changes.get("bids", [])
offers = changes.get("offers", [])
# Check for time in bids or offers
if bids:
print("First bid change time:", bids[0].get("time"))
elif offers:
print("First offer change time:", offers[0].get("time"))
else:
print("No bid or offer changes found in changesSince.")
else:
print("No results in response.")
else:
print("Request failed with status:", response.status_code)
print("Response:", response.text)
import requests
# URL endpoint
url = "https://uat-api.biwine.com/v2/market/supported"
# Replace this with your actual Bearer token
auth_token = "YOUR_ACCESS_TOKEN_HERE"
# Set headers with Authorization
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
try:
# Send GET request
response = requests.get(url, headers=headers)
response.raise_for_status()
# Parse JSON response
data = response.json()
results = data.get("results", [])
# Print lwin18 for each item
for item in results:
lwin18 = item.get("lwin18")
if lwin18:
print("lwin18:", lwin18)
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
except ValueError:
print("Failed to parse JSON response")
import requests
# Your Bearer token from login
token = "YOUR_JWT_TOKEN_HERE or ENV VARIABLE"
# Endpoint
url = "https://uat-api.biwine.com/v2/market/bi-price-list"
# Headers
headers = {
"Authorization": f"Bearer {token}",
"Accept": "application/json"
}
# Make GET request
response = requests.get(url, headers=headers)
# Handle response
if response.status_code == 200:
try:
data = response.json()
results = data.get("results", [])
if not results:
print("No results found.")
else:
for item in results:
offer_price = item.get("offer_price", "Unknown")
print("-", offer_price)
except ValueError:
print("Invalid JSON in response.")
else:
print(f"Request failed. Status code: {response.status_code}")
print(response.text)
import requests
side = "bid" # or "offer"
page = 1
limit = 50
auth_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/trading/positions/{side}"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
params = {
"page": page,
"limit": limit
}
try:
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
data = response.json()
results = data.get("results", [])
for item in results:
lwin18 = item.get("lwin18")
if lwin18:
print("lwin18:", lwin18)
except requests.exceptions.RequestException as e:
print("HTTP Request failed:", e)
except ValueError:
print("Invalid JSON response")
import requests
side = "bid" # or "offer"
order_id = 94
auth_token = "YOUR_ACCESS_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/trading/{side}/{order_id}"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
data = response.json()
lwin18 = data.get("lwin18")
if lwin18:
print("lwin18:", lwin18)
else:
print("lwin18 not found in response")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
except ValueError:
print("Invalid JSON response")
import requests
# Replace with your actual LWIN18 identifier
lwin18 = "12345678901234"
# API endpoint
url = f"https://uat-api.biwine.com/v2/trading/lwin18/{lwin18}/bid"
# Request payload
payload = {
"price": 940,
"quantity": 1,
"dutyStatus": "IB",
"caseCondition": "OC",
"bottleCondition": "PR",
"availableImmediately": False,
"fillOrKill": False,
"customerRef": "string"
}
# Replace with a valid Bearer token or other auth if required
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN" # Replace with actual token
}
# Send POST request
response = requests.post(url, json=payload, headers=headers)
# Process response
if response.status_code == 200:
try:
data = response.json()
print("orderId:", data.get("orderId"))
except ValueError:
print("Failed to decode JSON response")
else:
print(f"Request failed with status code {response.status_code}: {response.text}")
import requests
lwin18 = "100006920071200750" # Replace with actual LWIN18
auth_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/trading/lwin18/{lwin18}/offer"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
data = response.json()
quantity = data.get("quantity")
if quantity is not None:
print("Quantity:", quantity)
else:
print("Quantity not found in response.")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
except ValueError:
print("Invalid JSON response")
import requests
# Replace with actual bordeauxCode and token
bordeauxCode = "12345"
auth_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/trading/bordeauxCode/{bordeauxCode}/bid"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
data = response.json()
quantity_matched = data.get("quantityMatched")
if quantity_matched is not None:
print("quantityMatched:", quantity_matched)
else:
print("quantityMatched not found in response.")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
except ValueError:
print("Invalid JSON response")
import requests
# Replace with actual bordeauxCode and token
bordeauxCode = "12345"
auth_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/trading/bordeauxCode/{bordeauxCode}/offer"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
data = response.json()
quantity_matched = data.get("quantityMatched")
if quantity_matched is not None:
print("quantityMatched:", quantity_matched)
else:
print("quantityMatched not found in response.")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
except ValueError:
print("Invalid JSON response")
import requests
orderId = "12345" # Replace with actual orderId
auth_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC..."
url = f"https://uat-api.biwine.com/v2/trading/bid/{orderId}"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
try:
response = requests.delete(url, headers=headers)
if response.status_code == 200:
print("Delete request successful.")
else:
print(f"Delete request failed with status code: {response.status_code}")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
import requests
orderId = "12345" # Replace with your actual orderId
auth_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/trading/offer/{orderId}"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
try:
response = requests.delete(url, headers=headers)
if response.status_code == 200:
print("Delete request successful.")
else:
print(f"Delete request failed with status code: {response.status_code}")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
import requests
orderId = "12345" # Replace with actual orderId
auth_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/trading/bid/{orderId}"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
data = {
"quantity": 3
}
try:
response = requests.patch(url, headers=headers, json=data)
if response.status_code == 200:
print("Patch request successful.")
else:
print(f"Patch request failed with status code: {response.status_code}")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
import requests
order_id = "12345" # Replace with actual orderId
auth_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/trading/offer/{order_id}"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
payload = {
"quantity": 6
}
try:
response = requests.patch(url, headers=headers, json=payload)
if response.status_code == 200:
print("PATCH request successful.")
else:
print(f"PATCH failed with status code: {response.status_code}")
print("Response:", response.text)
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
import requests
portfolio_ref = "ST_1234_12" # Replace with actual portfolioRef
auth_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/trading/portfolioRef/{portfolio_ref}/offer"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
payload = {
"price": 600
}
try:
response = requests.post(url, headers=headers, json=payload)
if response.status_code == 200:
print("POST request successful.")
print("Response:", response.json())
else:
print(f"POST failed with status code: {response.status_code}")
print("Response:", response.text)
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
import requests
auth_token = "YOUR_JWT_TOKEN_HERE"
page = 1 # Replace with desired page number
url = "https://uat-api.biwine.com/v2/postTrade"
headers = {
"Authorization": f"Bearer {auth_token}"
}
params = {
"page": page
}
try:
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
data = response.json()
results = data.get("results", [])
if results:
for item in results:
quantity = item.get("quantity")
print("Quantity:", quantity)
else:
print("No results found.")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
except ValueError:
print("Invalid JSON response")
import requests
auth_token = "YOUR_JWT_TOKEN_HERE"
url = "https://uat-api.biwine.com/v2/fxRate"
params = {
"from": "GBP",
"to": "EUR"
}
headers = {
"Authorization": f"Bearer {auth_token}"
}
try:
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
data = response.json()
rate = data.get("rate")
if rate is not None:
print(f"Exchange rate from GBP to EUR: {rate}")
else:
print("Rate not found in response.")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
except ValueError:
print("Invalid JSON response")
import requests
# Replace with your actual Bearer token
auth_token = "YOUR_JWT_TOKEN_HERE"
url = "https://uat-api.biwine.com/v2/portfolio"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
data = response.json()
results = data.get("results", [])
if results:
for wine in results:
print("Product Name:", wine.get("productName", "N/A"))
else:
print("No results found.")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
except ValueError:
print("Invalid JSON response")
import requests
portfolio_ref = "ST_1234_3" # Replace with actual portfolioRef
auth_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/portfolio/{portfolio_ref}"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
try:
response = requests.get(url, headers=headers)
response.raise_for_status()
data = response.json()
product_name = data.get("productName")
if product_name:
print("Product Name:", product_name)
else:
print("productName not found in response.")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
except ValueError:
print("Invalid JSON response")
import requests
auth_token = "YOUR_JWT_TOKEN_HERE"
url = f"https://uat-api.biwine.com/v2/webhooks"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
params = {}
try:
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
data = response.json()
results = data.get("results", [])
for item in results:
url = item.get("url")
if url:
print("url:", url)
except requests.exceptions.RequestException as e:
print("HTTP Request failed:", e)
except ValueError:
print("Invalid JSON response")
import requests
# API endpoint
url = "https://uat-api.biwine.com/v2/webhooks"
# Request payload
payload = {
"url": "https://example.com/callback",
"webhookEventType": "TRADE",
"keyName": "ApiKey", # Optional key to authenticate the webhook on your server
"keyValue": "ABC123"
}
# Replace with a valid Bearer token or other auth if required
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN" # Replace with actual token
}
# Send POST request
response = requests.post(url, json=payload, headers=headers)
# Process response
if response.status_code == 200:
try:
data = response.json()
print("webhookId:", data.get("webhookId"))
except ValueError:
print("Failed to decode JSON response")
else:
print(f"Request failed with status code {response.status_code}: {response.text}")
import requests
webhookId = "12345" # Replace with actual webhookId
auth_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC..."
url = f"https://uat-api.biwine.com/v2/webhooks/{webhookId}"
headers = {
"Authorization": f"Bearer {auth_token}",
"Content-Type": "application/json"
}
try:
response = requests.delete(url, headers=headers)
if response.status_code == 200:
print("Delete request successful.")
else:
print(f"Delete request failed with status code: {response.status_code}")
except requests.exceptions.RequestException as e:
print("HTTP request failed:", e)
Last updated 13 August 2025