getInventory
Get inventory
Get the current inventory for a given SKU at a given location.
/inventories
Usage and SDK Samples
curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/inventories?skuId=&locationId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InventoryManagementApi;
import java.io.File;
import java.util.*;
public class InventoryManagementApiExample {
public static void main(String[] args) {
InventoryManagementApi apiInstance = new InventoryManagementApi();
String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
String skuId = skuId_example; // String | The id of the SKU whose inventory details are being fetched.
String locationId = locationId_example; // String | The id of the location whose inventory details are being fetched.
try {
InventoryDetails result = apiInstance.getInventory(xAmzAccessToken, skuId, locationId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InventoryManagementApi#getInventory");
e.printStackTrace();
}
}
}
import io.swagger.client.api.InventoryManagementApi;
public class InventoryManagementApiExample {
public static void main(String[] args) {
InventoryManagementApi apiInstance = new InventoryManagementApi();
String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
String skuId = skuId_example; // String | The id of the SKU whose inventory details are being fetched.
String locationId = locationId_example; // String | The id of the location whose inventory details are being fetched.
try {
InventoryDetails result = apiInstance.getInventory(xAmzAccessToken, skuId, locationId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling InventoryManagementApi#getInventory");
e.printStackTrace();
}
}
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *skuId = skuId_example; // The id of the SKU whose inventory details are being fetched.
String *locationId = locationId_example; // The id of the location whose inventory details are being fetched.
InventoryManagementApi *apiInstance = [[InventoryManagementApi alloc] init];
// Get inventory
[apiInstance getInventoryWith:xAmzAccessToken
skuId:skuId
locationId:locationId
completionHandler: ^(InventoryDetails output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var AmazonYojakaApiInventoriesModel = require('amazon_yojaka_api_inventories_model');
var api = new AmazonYojakaApiInventoriesModel.InventoryManagementApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var skuId = skuId_example; // {{String}} The id of the SKU whose inventory details are being fetched.
var locationId = locationId_example; // {{String}} The id of the location whose inventory details are being fetched.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getInventory(xAmzAccessToken, skuId, locationId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class getInventoryExample
{
public void main()
{
var apiInstance = new InventoryManagementApi();
var xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
var skuId = skuId_example; // String | The id of the SKU whose inventory details are being fetched.
var locationId = locationId_example; // String | The id of the location whose inventory details are being fetched.
try
{
// Get inventory
InventoryDetails result = apiInstance.getInventory(xAmzAccessToken, skuId, locationId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling InventoryManagementApi.getInventory: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiInventoryManagementApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$skuId = skuId_example; // String | The id of the SKU whose inventory details are being fetched.
$locationId = locationId_example; // String | The id of the location whose inventory details are being fetched.
try {
$result = $api_instance->getInventory($xAmzAccessToken, $skuId, $locationId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling InventoryManagementApi->getInventory: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InventoryManagementApi;
my $api_instance = WWW::SwaggerClient::InventoryManagementApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $skuId = skuId_example; # String | The id of the SKU whose inventory details are being fetched.
my $locationId = locationId_example; # String | The id of the location whose inventory details are being fetched.
eval {
my $result = $api_instance->getInventory(xAmzAccessToken => $xAmzAccessToken, skuId => $skuId, locationId => $locationId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling InventoryManagementApi->getInventory: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.InventoryManagementApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
skuId = skuId_example # String | The id of the SKU whose inventory details are being fetched.
locationId = locationId_example # String | The id of the location whose inventory details are being fetched.
try:
# Get inventory
api_response = api_instance.get_inventory(xAmzAccessToken, skuId, locationId)
pprint(api_response)
except ApiException as e:
print("Exception when calling InventoryManagementApi->getInventory: %s\n" % e)
Parameters
Name | Description |
---|---|
X-Amz-Access-Token* |
String
The LWA access token for authorizing the request
Required
|
Name | Description |
---|---|
skuId* |
String
The id of the SKU whose inventory details are being fetched.
Required
|
locationId* |
String
The id of the location whose inventory details are being fetched.
Required
|