curl --request GET \
--url https://api.orbita.melonn.com/stock/inventory \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orbita.melonn.com/stock/inventory"
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/inventory', 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/inventory",
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/inventory"
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/inventory")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/stock/inventory")
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{
"metadata": {
"total": 2,
"page": 1,
"limit": 200
},
"data": [
{
"sku": "SKU-12345",
"internalCode": "MEL0001234",
"name": "Cotton T-shirt",
"variant": "Size M / Black",
"warehouseName": "Bogotá #2 - Montevideo",
"availableQuantity": 150,
"inTransitQuantity": 4,
"pickedPackedQuantity": 2,
"reservedQuantity": 6,
"toBeReceivedAtMelonn": 100
},
{
"sku": "SKU-67890",
"internalCode": "MEL0001235",
"name": "Ceramic mug",
"variant": null,
"warehouseName": "Bogotá #2 - Montevideo",
"availableQuantity": 0,
"inTransitQuantity": 0,
"pickedPackedQuantity": 0,
"reservedQuantity": 0,
"toBeReceivedAtMelonn": 0
}
]
}Get inventory snapshot
Returns your inventory as it was recorded on a given day: one row per product and warehouse, with the units available, reserved, being prepared, in transit to buyers and pending to arrive from suppliers.
This is a daily snapshot, not live stock. Every night at 00:30, once the day has
ended, Melonn records every seller’s inventory as it stood at the close of the day that
just finished. The figures for a date never change afterwards. Use it for
reconciliation and day-by-day history; for the current quantity available for sale use
GET /stock (Get available stock).
The most recent date available is yesterday: today’s snapshot is taken tonight. If
there is no snapshot for the requested date (for example, today or a
future date), the response is 200 with data: [] and metadata.total: 0.
Rows are ordered by the Melonn internal product code.
curl --request GET \
--url https://api.orbita.melonn.com/stock/inventory \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orbita.melonn.com/stock/inventory"
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/inventory', 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/inventory",
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/inventory"
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/inventory")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/stock/inventory")
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{
"metadata": {
"total": 2,
"page": 1,
"limit": 200
},
"data": [
{
"sku": "SKU-12345",
"internalCode": "MEL0001234",
"name": "Cotton T-shirt",
"variant": "Size M / Black",
"warehouseName": "Bogotá #2 - Montevideo",
"availableQuantity": 150,
"inTransitQuantity": 4,
"pickedPackedQuantity": 2,
"reservedQuantity": 6,
"toBeReceivedAtMelonn": 100
},
{
"sku": "SKU-67890",
"internalCode": "MEL0001235",
"name": "Ceramic mug",
"variant": null,
"warehouseName": "Bogotá #2 - Montevideo",
"availableQuantity": 0,
"inTransitQuantity": 0,
"pickedPackedQuantity": 0,
"reservedQuantity": 0,
"toBeReceivedAtMelonn": 0
}
]
}Authorizations
Query Parameters
Day of the snapshot, in YYYY-MM-DD format. The most recent day available is yesterday.
^\d{4}-\d{2}-\d{2}$Page number, starting at 1.
x >= 1Number of rows per page.
1 <= x <= 1000