curl --request GET \
--url https://api.orbita.melonn.com/stock \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orbita.melonn.com/stock"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.orbita.melonn.com/stock', 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.orbita.melonn.com/stock",
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: <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://api.orbita.melonn.com/stock"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://api.orbita.melonn.com/stock")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/stock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"sku": "SKU-12345",
"qty_available": 150
},
{
"sku": "SKU-67890",
"qty_available": 0
}
],
"meta_data": {
"page": 1,
"per_page": 10
}
}Get available stock
Returns the quantity available for sale of your products in one warehouse, in real time.
The list is built from your catalog: it pages through your active, non-kit products
(ordered by creation) and, for each one, returns the units currently available in the
requested warehouse. Products with no stock in that warehouse are returned with
qty_available: 0. Kits (composite products) and inactive products are not included.
Use sku to ask only for specific products. SKUs that do not exist in your catalog, are
inactive or are kits are silently left out of the response.
When the requested page has no products, the response is data: [] with
meta_data: { page: 0, per_page: 0 }.
curl --request GET \
--url https://api.orbita.melonn.com/stock \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orbita.melonn.com/stock"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.orbita.melonn.com/stock', 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.orbita.melonn.com/stock",
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: <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://api.orbita.melonn.com/stock"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://api.orbita.melonn.com/stock")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/stock")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"sku": "SKU-12345",
"qty_available": 150
},
{
"sku": "SKU-67890",
"qty_available": 0
}
],
"meta_data": {
"page": 1,
"per_page": 10
}
}Authorizations
Query Parameters
Code of the warehouse to read stock from, e.g. BOG-2. See warehouse codes.
SKUs to include. Send several SKUs as a JSON array in a single parameter, URL-encoded: sku=["SKU-001","SKU-002"]. A single SKU can be sent as plain text (sku=SKU-001). Repeating the parameter (sku=A&sku=B) does not work: only the last value is used. When you send SKUs, the page size is capped at the number of SKUs sent.
1 - 100Page number, starting at 1.
x >= 1Number of products per page.
1 <= x <= 100