curl --request GET \
--url https://api.orbita.melonn.com/stock/adjustments \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orbita.melonn.com/stock/adjustments"
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/adjustments', 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/adjustments",
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/adjustments"
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/adjustments")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/stock/adjustments")
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": [
{
"internal_adjustment_identifier": "SCA00012",
"adjustment_date": "2024-01-20T14:45:00.000Z",
"adjustment_details": [
{
"sku": "SKU-12345",
"quantity_adjusted": -5,
"adjustment_justification": {
"name": "Damage",
"description": "Products damaged during storage"
}
},
{
"sku": "SKU-67890",
"quantity_adjusted": -2,
"adjustment_justification": {
"name": "Loss",
"description": null
}
}
]
},
{
"internal_adjustment_identifier": "SCA00011",
"adjustment_date": "2024-01-15T10:30:00.000Z",
"adjustment_details": [
{
"sku": "SKU-11111",
"quantity_adjusted": 10,
"adjustment_justification": {
"name": "Inventory Count",
"description": "Adjustment from physical inventory reconciliation"
}
}
]
}
],
"meta_data": {
"page": 0,
"per_page": 10
}
}Get stock adjustments
Returns the stock adjustments Melonn has executed on your products: adjustments from physical inventory counts and from stock control points (cycle counts). Each adjustment lists, per SKU, the quantity added (positive) or removed (negative) and the reason.
Results are ordered from the most recent adjustment to the oldest, and pagination counts
adjustments (not SKU lines): one adjustment can contain several adjustment_details.
Only the last year can be queried:
start_datedefaults to one year ago; an olderstart_dateis moved forward to one year ago.end_datedefaults to now; anend_dateolder than one year is rejected.
curl --request GET \
--url https://api.orbita.melonn.com/stock/adjustments \
--header 'x-api-key: <api-key>'import requests
url = "https://api.orbita.melonn.com/stock/adjustments"
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/adjustments', 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/adjustments",
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/adjustments"
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/adjustments")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbita.melonn.com/stock/adjustments")
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": [
{
"internal_adjustment_identifier": "SCA00012",
"adjustment_date": "2024-01-20T14:45:00.000Z",
"adjustment_details": [
{
"sku": "SKU-12345",
"quantity_adjusted": -5,
"adjustment_justification": {
"name": "Damage",
"description": "Products damaged during storage"
}
},
{
"sku": "SKU-67890",
"quantity_adjusted": -2,
"adjustment_justification": {
"name": "Loss",
"description": null
}
}
]
},
{
"internal_adjustment_identifier": "SCA00011",
"adjustment_date": "2024-01-15T10:30:00.000Z",
"adjustment_details": [
{
"sku": "SKU-11111",
"quantity_adjusted": 10,
"adjustment_justification": {
"name": "Inventory Count",
"description": "Adjustment from physical inventory reconciliation"
}
}
]
}
],
"meta_data": {
"page": 0,
"per_page": 10
}
}Authorizations
Query Parameters
Return adjustments executed at or after this instant (ISO 8601 date-time with time zone, e.g. 2024-01-01T00:00:00.000Z). Defaults to one year ago; earlier values are moved to one year ago.
Return adjustments executed at or before this instant (ISO 8601 date-time with time zone, e.g. 2024-12-31T23:59:59.000Z). Defaults to now. Must not be more than one year in the past, and must not be before start_date.
SKU to filter by. Currently not applied: the parameter is accepted and validated, but the response includes adjustments for all your SKUs.
1 - 100Page number, starting at 0.
x >= 0Number of adjustments per page.
1 <= x <= 100