Get suggested order
curl --request GET \
--url https://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order \
--header 'x-api-key: <x-api-key>'import requests
url = "https://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order', 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://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$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://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"item_id": "itm_chicken_01...",
"item_name": "Chicken breast",
"current_qty_base": 3000,
"par_qty_base": 10000,
"gap_qty_base": 7000,
"base_unit_id": "unit_g_01...",
"base_unit_symbol": "g"
}
]
}
Suggested Order
Get suggested order
Returns a recommended purchase order: items whose current stock is below their par level, with the gap quantity expressed in base units.
GET
/
api
/
v1
/
public
/
vendors
/
{vendorId}
/
procurement
/
suggested-order
Get suggested order
curl --request GET \
--url https://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order \
--header 'x-api-key: <x-api-key>'import requests
url = "https://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order', 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://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$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://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://boh.api.fire.rest/api/v1/public/vendors/{vendorId}/procurement/suggested-order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"items": [
{
"item_id": "itm_chicken_01...",
"item_name": "Chicken breast",
"current_qty_base": 3000,
"par_qty_base": 10000,
"gap_qty_base": 7000,
"base_unit_id": "unit_g_01...",
"base_unit_symbol": "g"
}
]
}
string
required
API key with
catalog:read scope.string
required
Vendor UUID.
string
required
UUID of the store to compute suggestions for.
string
Filter suggestions to items supplied by this supplier UUID.
object[]
Suggested reorder lines. Each entry includes
item_id, item_name, current balance, par level, gap quantity, and the suggested unit details.{
"items": [
{
"item_id": "itm_chicken_01...",
"item_name": "Chicken breast",
"current_qty_base": 3000,
"par_qty_base": 10000,
"gap_qty_base": 7000,
"base_unit_id": "unit_g_01...",
"base_unit_symbol": "g"
}
]
}
⌘I

