Get information about a package
curl --request GET \
--url https://api.example.com/{supplierapi}/package/{productPricesDetail}/optionsimport requests
url = "https://api.example.com/{supplierapi}/package/{productPricesDetail}/options"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/{supplierapi}/package/{productPricesDetail}/options', 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.example.com/{supplierapi}/package/{productPricesDetail}/options",
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.example.com/{supplierapi}/package/{productPricesDetail}/options"
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.example.com/{supplierapi}/package/{productPricesDetail}/options")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{supplierapi}/package/{productPricesDetail}/options")
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_bodyVersion 1
Get information about a package
Get information about a package
Retrieves information about the given package.
Response
Top Level Result Object
| Field name | Nullable | Type | Description |
|---|---|---|---|
| optionId | n | Integer | ID of the Package Option. |
| label | n | String | Label for the Package Option. |
| ordering | n | Integer | Sort order for the Package Option (affects order shown in UI). |
| packageProducts | n | Array | Array of Package Product objects. |
PackageProduct Object
| Field name | Nullable | Type | Description |
|---|---|---|---|
| packageProductId | n | Integer | ID of the Package Product. |
| productPricesDetailId | n | Integer | ID of the ProductPricesDetail. |
| ordering | n | Integer | Sort order for the Package Product (affects order shown in UI). |
| quantity | n | Integer | Quantity of the ProductPricesDetail to be included in the package. |
| rrpDifference | y | Float | Amount to add onto package’s base RRP if this Package Product is selected. If null, the difference between the RRP for this product and the RRP for the cheapest product in the option will be used. Must be null for the cheapest product in this package option. |
GET
/
{supplierapi}
/
package
/
{productPricesDetail}
/
options
Get information about a package
curl --request GET \
--url https://api.example.com/{supplierapi}/package/{productPricesDetail}/optionsimport requests
url = "https://api.example.com/{supplierapi}/package/{productPricesDetail}/options"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/{supplierapi}/package/{productPricesDetail}/options', 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.example.com/{supplierapi}/package/{productPricesDetail}/options",
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.example.com/{supplierapi}/package/{productPricesDetail}/options"
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.example.com/{supplierapi}/package/{productPricesDetail}/options")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{supplierapi}/package/{productPricesDetail}/options")
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