curl --request POST \
--url https://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"lines": [
{
"sourceVariantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 500000
}
],
"bundleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>"
}
'import requests
url = "https://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote"
payload = {
"lines": [
{
"sourceVariantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 500000
}
],
"bundleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<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({
lines: [{sourceVariantId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', quantity: 500000}],
bundleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
idempotencyKey: '<string>'
})
};
fetch('https://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote', 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.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote",
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([
'lines' => [
[
'sourceVariantId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 500000
]
],
'bundleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'idempotencyKey' => '<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://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote"
payload := strings.NewReader("{\n \"lines\": [\n {\n \"sourceVariantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 500000\n }\n ],\n \"bundleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\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://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"sourceVariantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 500000\n }\n ],\n \"bundleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote")
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 \"lines\": [\n {\n \"sourceVariantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 500000\n }\n ],\n \"bundleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"code": "<string>",
"data": {
"lines": [
{
"variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productName": "<string>",
"variantName": "<string>",
"quantity": 123,
"unitListPrice": 123,
"lineRetailValue": 123,
"availableStock": 123
}
],
"retailValue": 123,
"discountPercent": 123,
"total": 123,
"saving": 123,
"separatelyTotal": 123,
"currencyCode": "<string>",
"isAvailable": true,
"bundleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bundleName": "<string>",
"bundleDescription": "<string>",
"unavailableReason": "<string>"
}
}{
"success": true,
"message": "<string>",
"code": "<string>",
"data": "<unknown>"
}{
"success": true,
"message": "<string>",
"code": "<string>",
"data": "<unknown>"
}{
"success": true,
"message": "<string>",
"code": "<string>",
"data": "<unknown>"
}Quote Basket
Give it a bundle id, or lines of your own, and it comes back with the same arithmetic the
purchase will use — including what those lines would have cost bought separately, so a discount
you already have is not counted twice in what you tell yourself you saved.
Requires the stores.reselling.view permission.
curl --request POST \
--url https://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"lines": [
{
"sourceVariantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 500000
}
],
"bundleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<string>"
}
'import requests
url = "https://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote"
payload = {
"lines": [
{
"sourceVariantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 500000
}
],
"bundleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotencyKey": "<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({
lines: [{sourceVariantId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', quantity: 500000}],
bundleId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
idempotencyKey: '<string>'
})
};
fetch('https://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote', 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.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote",
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([
'lines' => [
[
'sourceVariantId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 500000
]
],
'bundleId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'idempotencyKey' => '<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://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote"
payload := strings.NewReader("{\n \"lines\": [\n {\n \"sourceVariantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 500000\n }\n ],\n \"bundleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\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://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"lines\": [\n {\n \"sourceVariantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 500000\n }\n ],\n \"bundleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.komerza.com/stores/{storeId}/reselling/suppliers/{supplierStoreId}/basket/quote")
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 \"lines\": [\n {\n \"sourceVariantId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 500000\n }\n ],\n \"bundleId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"idempotencyKey\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"code": "<string>",
"data": {
"lines": [
{
"variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"productName": "<string>",
"variantName": "<string>",
"quantity": 123,
"unitListPrice": 123,
"lineRetailValue": 123,
"availableStock": 123
}
],
"retailValue": 123,
"discountPercent": 123,
"total": 123,
"saving": 123,
"separatelyTotal": 123,
"currencyCode": "<string>",
"isAvailable": true,
"bundleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"bundleName": "<string>",
"bundleDescription": "<string>",
"unavailableReason": "<string>"
}
}{
"success": true,
"message": "<string>",
"code": "<string>",
"data": "<unknown>"
}{
"success": true,
"message": "<string>",
"code": "<string>",
"data": "<unknown>"
}{
"success": true,
"message": "<string>",
"code": "<string>",
"data": "<unknown>"
}Authorizations
Your API key goes here
Body
A reseller buying a basket: either a bundle the supplier composed, or lines of their own.
The lines to buy, when composing a basket.
Show child attributes
Show child attributes
The bundle to buy, when buying one.
A caller-supplied reference that makes a retry safe. Strongly recommended: without one, a repeated request buys the basket again.
128Response
The object was successfully returned.
Represents a default generic response for API endpoints.
Indicates whether the operation or response was successful.
A descriptive message providing additional context or information about the response.
The error code (if there was an error) to use when referencing the error
What a basket costs a particular reseller, and why.
Show child attributes
Show child attributes