Amazon Yojaka API Inventories Model

InventoryManagement

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

Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Query parameters
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

Responses

Status: 200 - Success. The response contains the inventory details.

Status: 400 - Bad request. The response contains the error details.

Status: 401 - Unauthorized. You are not authorized to invoke this API for the given parameters.

Status: 500 - Internal server error. Contact Amazon support for assistance.

Status: 503 - Service unavailable. Retry the request after some time.


updateInventory

Update inventory

Update the inventory quantity of the given SKU to the specified value.


/inventories

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/inventories?skuId=&locationId=&quantity=&inventoryUpdateSequence="
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 is being updated.
        String locationId = locationId_example; // String | The id of the location whose inventory is being updated.
        Integer quantity = 56; // Integer | The absolute number of items of the specified SKU available at the specified location.
        Long inventoryUpdateSequence = 789; // Long | A unique number provided with each call to update the inventory. This number must always be a unique and
increasing value per SKU per location for each inventory update. This is used by Amazon Yojaka to ensure the correct sequence
of updates, especially if Amazon Yojaka receives near-concurrent inventory updates for the same SKU and same location.
This has to be an integer, and not a floating point number.

        UpdateInventoryInput body = ; // UpdateInventoryInput | The request body containing information about the list of absolute provenanceId-Quantity of the specified SKU available at the specified location.
        try {
            InventoryDetails result = apiInstance.updateInventory(xAmzAccessToken, skuId, locationId, quantity, inventoryUpdateSequence, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryManagementApi#updateInventory");
            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 is being updated.
        String locationId = locationId_example; // String | The id of the location whose inventory is being updated.
        Integer quantity = 56; // Integer | The absolute number of items of the specified SKU available at the specified location.
        Long inventoryUpdateSequence = 789; // Long | A unique number provided with each call to update the inventory. This number must always be a unique and
increasing value per SKU per location for each inventory update. This is used by Amazon Yojaka to ensure the correct sequence
of updates, especially if Amazon Yojaka receives near-concurrent inventory updates for the same SKU and same location.
This has to be an integer, and not a floating point number.

        UpdateInventoryInput body = ; // UpdateInventoryInput | The request body containing information about the list of absolute provenanceId-Quantity of the specified SKU available at the specified location.
        try {
            InventoryDetails result = apiInstance.updateInventory(xAmzAccessToken, skuId, locationId, quantity, inventoryUpdateSequence, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InventoryManagementApi#updateInventory");
            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 is being updated.
String *locationId = locationId_example; // The id of the location whose inventory is being updated.
Integer *quantity = 56; // The absolute number of items of the specified SKU available at the specified location.
Long *inventoryUpdateSequence = 789; // A unique number provided with each call to update the inventory. This number must always be a unique and
increasing value per SKU per location for each inventory update. This is used by Amazon Yojaka to ensure the correct sequence
of updates, especially if Amazon Yojaka receives near-concurrent inventory updates for the same SKU and same location.
This has to be an integer, and not a floating point number.

UpdateInventoryInput *body = ; // The request body containing information about the list of absolute provenanceId-Quantity of the specified SKU available at the specified location. (optional)

InventoryManagementApi *apiInstance = [[InventoryManagementApi alloc] init];

// Update inventory
[apiInstance updateInventoryWith:xAmzAccessToken
    skuId:skuId
    locationId:locationId
    quantity:quantity
    inventoryUpdateSequence:inventoryUpdateSequence
    body:body
              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 is being updated.
var locationId = locationId_example; // {{String}} The id of the location whose inventory is being updated.
var quantity = 56; // {{Integer}} The absolute number of items of the specified SKU available at the specified location.
var inventoryUpdateSequence = 789; // {{Long}} A unique number provided with each call to update the inventory. This number must always be a unique and
increasing value per SKU per location for each inventory update. This is used by Amazon Yojaka to ensure the correct sequence
of updates, especially if Amazon Yojaka receives near-concurrent inventory updates for the same SKU and same location.
This has to be an integer, and not a floating point number.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateInventory(xAmzAccessTokenskuIdlocationIdquantityinventoryUpdateSequence, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateInventoryExample
    {
        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 is being updated.
            var locationId = locationId_example;  // String | The id of the location whose inventory is being updated.
            var quantity = 56;  // Integer | The absolute number of items of the specified SKU available at the specified location.
            var inventoryUpdateSequence = 789;  // Long | A unique number provided with each call to update the inventory. This number must always be a unique and
increasing value per SKU per location for each inventory update. This is used by Amazon Yojaka to ensure the correct sequence
of updates, especially if Amazon Yojaka receives near-concurrent inventory updates for the same SKU and same location.
This has to be an integer, and not a floating point number.

            var body = new UpdateInventoryInput(); // UpdateInventoryInput | The request body containing information about the list of absolute provenanceId-Quantity of the specified SKU available at the specified location. (optional) 

            try
            {
                // Update inventory
                InventoryDetails result = apiInstance.updateInventory(xAmzAccessToken, skuId, locationId, quantity, inventoryUpdateSequence, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InventoryManagementApi.updateInventory: " + 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 is being updated.
$locationId = locationId_example; // String | The id of the location whose inventory is being updated.
$quantity = 56; // Integer | The absolute number of items of the specified SKU available at the specified location.
$inventoryUpdateSequence = 789; // Long | A unique number provided with each call to update the inventory. This number must always be a unique and
increasing value per SKU per location for each inventory update. This is used by Amazon Yojaka to ensure the correct sequence
of updates, especially if Amazon Yojaka receives near-concurrent inventory updates for the same SKU and same location.
This has to be an integer, and not a floating point number.

$body = ; // UpdateInventoryInput | The request body containing information about the list of absolute provenanceId-Quantity of the specified SKU available at the specified location.

try {
    $result = $api_instance->updateInventory($xAmzAccessToken, $skuId, $locationId, $quantity, $inventoryUpdateSequence, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryManagementApi->updateInventory: ', $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 is being updated.
my $locationId = locationId_example; # String | The id of the location whose inventory is being updated.
my $quantity = 56; # Integer | The absolute number of items of the specified SKU available at the specified location.
my $inventoryUpdateSequence = 789; # Long | A unique number provided with each call to update the inventory. This number must always be a unique and
increasing value per SKU per location for each inventory update. This is used by Amazon Yojaka to ensure the correct sequence
of updates, especially if Amazon Yojaka receives near-concurrent inventory updates for the same SKU and same location.
This has to be an integer, and not a floating point number.

my $body = WWW::SwaggerClient::Object::UpdateInventoryInput->new(); # UpdateInventoryInput | The request body containing information about the list of absolute provenanceId-Quantity of the specified SKU available at the specified location.

eval { 
    my $result = $api_instance->updateInventory(xAmzAccessToken => $xAmzAccessToken, skuId => $skuId, locationId => $locationId, quantity => $quantity, inventoryUpdateSequence => $inventoryUpdateSequence, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InventoryManagementApi->updateInventory: $@\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 is being updated.
locationId = locationId_example # String | The id of the location whose inventory is being updated.
quantity = 56 # Integer | The absolute number of items of the specified SKU available at the specified location.
inventoryUpdateSequence = 789 # Long | A unique number provided with each call to update the inventory. This number must always be a unique and
increasing value per SKU per location for each inventory update. This is used by Amazon Yojaka to ensure the correct sequence
of updates, especially if Amazon Yojaka receives near-concurrent inventory updates for the same SKU and same location.
This has to be an integer, and not a floating point number.

body =  # UpdateInventoryInput | The request body containing information about the list of absolute provenanceId-Quantity of the specified SKU available at the specified location. (optional)

try: 
    # Update inventory
    api_response = api_instance.update_inventory(xAmzAccessToken, skuId, locationId, quantity, inventoryUpdateSequence, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InventoryManagementApi->updateInventory: %s\n" % e)

Parameters

Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Body parameters
Name Description
body
Query parameters
Name Description
skuId*
String
The id of the SKU whose inventory is being updated.
Required
locationId*
String
The id of the location whose inventory is being updated.
Required
quantity*
Integer
The absolute number of items of the specified SKU available at the specified location.
Required
inventoryUpdateSequence*
Long (int64)
A unique number provided with each call to update the inventory. This number must always be a unique and increasing value per SKU per location for each inventory update. This is used by Amazon Yojaka to ensure the correct sequence of updates, especially if Amazon Yojaka receives near-concurrent inventory updates for the same SKU and same location. This has to be an integer, and not a floating point number.
Required

Responses

Status: 200 - Success. The response contains the inventory details.

Status: 400 - Bad request. The response contains the error details.

Status: 401 - Unauthorized. You are not authorized to invoke this API for the given parameters.

Status: 409 - Conflict. Concurrent updates to the same inventory are not supported.

Status: 500 - Internal server error. Contact Amazon support for assistance.

Status: 503 - Service unavailable. Retry the request after some time.


ProvenanceIdentifiersManagement

createProvenanceIdentifiers

Create Provenance Identifiers

Create provenance identifiers for list of provenance details per sku in Amazon Yojaka system.


/inventories/provenances/

Usage and SDK Samples

curl -X POST "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/inventories/provenances/?skuId=&locationId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvenanceIdentifiersManagementApi;

import java.io.File;
import java.util.*;

public class ProvenanceIdentifiersManagementApiExample {

    public static void main(String[] args) {
        
        ProvenanceIdentifiersManagementApi apiInstance = new ProvenanceIdentifiersManagementApi();
        ProvenanceDetailsList body = ; // ProvenanceDetailsList | The request body indicating list of provenances details.
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String skuId = skuId_example; // String | ID of the SKU whose provenance identifier needs to be created.
        String locationId = locationId_example; // String | ID of the location where provenance identifier needs to be created.
        try {
            CreateProvenanceIdentifiersOutput result = apiInstance.createProvenanceIdentifiers(body, xAmzAccessToken, skuId, locationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvenanceIdentifiersManagementApi#createProvenanceIdentifiers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvenanceIdentifiersManagementApi;

public class ProvenanceIdentifiersManagementApiExample {

    public static void main(String[] args) {
        ProvenanceIdentifiersManagementApi apiInstance = new ProvenanceIdentifiersManagementApi();
        ProvenanceDetailsList body = ; // ProvenanceDetailsList | The request body indicating list of provenances details.
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String skuId = skuId_example; // String | ID of the SKU whose provenance identifier needs to be created.
        String locationId = locationId_example; // String | ID of the location where provenance identifier needs to be created.
        try {
            CreateProvenanceIdentifiersOutput result = apiInstance.createProvenanceIdentifiers(body, xAmzAccessToken, skuId, locationId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvenanceIdentifiersManagementApi#createProvenanceIdentifiers");
            e.printStackTrace();
        }
    }
}
ProvenanceDetailsList *body = ; // The request body indicating list of provenances details.
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *skuId = skuId_example; // ID of the SKU whose provenance identifier needs to be created.
String *locationId = locationId_example; // ID of the location where provenance identifier needs to be created.

ProvenanceIdentifiersManagementApi *apiInstance = [[ProvenanceIdentifiersManagementApi alloc] init];

// Create Provenance Identifiers
[apiInstance createProvenanceIdentifiersWith:body
    xAmzAccessToken:xAmzAccessToken
    skuId:skuId
    locationId:locationId
              completionHandler: ^(CreateProvenanceIdentifiersOutput output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiInventoriesModel = require('amazon_yojaka_api_inventories_model');

var api = new AmazonYojakaApiInventoriesModel.ProvenanceIdentifiersManagementApi()
var body = ; // {{ProvenanceDetailsList}} The request body indicating list of provenances details.
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var skuId = skuId_example; // {{String}} ID of the SKU whose provenance identifier needs to be created.
var locationId = locationId_example; // {{String}} ID of the location where provenance identifier needs to be created.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createProvenanceIdentifiers(bodyxAmzAccessTokenskuIdlocationId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createProvenanceIdentifiersExample
    {
        public void main()
        {

            var apiInstance = new ProvenanceIdentifiersManagementApi();
            var body = new ProvenanceDetailsList(); // ProvenanceDetailsList | The request body indicating list of provenances details.
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var skuId = skuId_example;  // String | ID of the SKU whose provenance identifier needs to be created.
            var locationId = locationId_example;  // String | ID of the location where provenance identifier needs to be created.

            try
            {
                // Create Provenance Identifiers
                CreateProvenanceIdentifiersOutput result = apiInstance.createProvenanceIdentifiers(body, xAmzAccessToken, skuId, locationId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvenanceIdentifiersManagementApi.createProvenanceIdentifiers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvenanceIdentifiersManagementApi();
$body = ; // ProvenanceDetailsList | The request body indicating list of provenances details.
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$skuId = skuId_example; // String | ID of the SKU whose provenance identifier needs to be created.
$locationId = locationId_example; // String | ID of the location where provenance identifier needs to be created.

try {
    $result = $api_instance->createProvenanceIdentifiers($body, $xAmzAccessToken, $skuId, $locationId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProvenanceIdentifiersManagementApi->createProvenanceIdentifiers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProvenanceIdentifiersManagementApi;

my $api_instance = WWW::SwaggerClient::ProvenanceIdentifiersManagementApi->new();
my $body = WWW::SwaggerClient::Object::ProvenanceDetailsList->new(); # ProvenanceDetailsList | The request body indicating list of provenances details.
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $skuId = skuId_example; # String | ID of the SKU whose provenance identifier needs to be created.
my $locationId = locationId_example; # String | ID of the location where provenance identifier needs to be created.

eval { 
    my $result = $api_instance->createProvenanceIdentifiers(body => $body, xAmzAccessToken => $xAmzAccessToken, skuId => $skuId, locationId => $locationId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProvenanceIdentifiersManagementApi->createProvenanceIdentifiers: $@\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.ProvenanceIdentifiersManagementApi()
body =  # ProvenanceDetailsList | The request body indicating list of provenances details.
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
skuId = skuId_example # String | ID of the SKU whose provenance identifier needs to be created.
locationId = locationId_example # String | ID of the location where provenance identifier needs to be created.

try: 
    # Create Provenance Identifiers
    api_response = api_instance.create_provenance_identifiers(body, xAmzAccessToken, skuId, locationId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProvenanceIdentifiersManagementApi->createProvenanceIdentifiers: %s\n" % e)

Parameters

Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Body parameters
Name Description
body *
Query parameters
Name Description
skuId*
String
ID of the SKU whose provenance identifier needs to be created.
Required
locationId*
String
ID of the location where provenance identifier needs to be created.
Required

Responses

Status: 200 - Success. The response contains the valid and invalid provenance details.

Status: 400 - Bad request. The response contains the error details.

Status: 401 - Unauthorized. You are not authorized to invoke this API for the given parameters.

Status: 409 - Conflict. Concurrent updates to the same inventory are not supported.

Status: 500 - Internal server error. Contact Amazon support for assistance.

Status: 503 - Service unavailable. Retry the request after some time.


getProvenanceDetails

Get Provenance Details

Get Provenance Details for list of Provenance Identifiers


/inventories/provenances/

Usage and SDK Samples

curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/inventories/provenances/?skuId=&locationId=&provenanceIdList="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ProvenanceIdentifiersManagementApi;

import java.io.File;
import java.util.*;

public class ProvenanceIdentifiersManagementApiExample {

    public static void main(String[] args) {
        
        ProvenanceIdentifiersManagementApi apiInstance = new ProvenanceIdentifiersManagementApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String skuId = skuId_example; // String | The id of the SKU for which we need to get provenance details
        String locationId = locationId_example; // String | The id of the location for which we need to get provenance details.
        String provenanceIdList = provenanceIdList_example; // String | The comma separated string of Amazon generated Provenance Id for which the details are to be fetched. For example - "P1,P2,P3" 
These provenance id can contain special characters, hence encode each of the comma separated provenance id using URLEncoder similar 
to https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html before sending the request

        try {
            GetProvenanceDetailsOutput result = apiInstance.getProvenanceDetails(xAmzAccessToken, skuId, locationId, provenanceIdList);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvenanceIdentifiersManagementApi#getProvenanceDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ProvenanceIdentifiersManagementApi;

public class ProvenanceIdentifiersManagementApiExample {

    public static void main(String[] args) {
        ProvenanceIdentifiersManagementApi apiInstance = new ProvenanceIdentifiersManagementApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String skuId = skuId_example; // String | The id of the SKU for which we need to get provenance details
        String locationId = locationId_example; // String | The id of the location for which we need to get provenance details.
        String provenanceIdList = provenanceIdList_example; // String | The comma separated string of Amazon generated Provenance Id for which the details are to be fetched. For example - "P1,P2,P3" 
These provenance id can contain special characters, hence encode each of the comma separated provenance id using URLEncoder similar 
to https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html before sending the request

        try {
            GetProvenanceDetailsOutput result = apiInstance.getProvenanceDetails(xAmzAccessToken, skuId, locationId, provenanceIdList);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ProvenanceIdentifiersManagementApi#getProvenanceDetails");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *skuId = skuId_example; // The id of the SKU for which we need to get provenance details
String *locationId = locationId_example; // The id of the location for which we need to get provenance details.
String *provenanceIdList = provenanceIdList_example; // The comma separated string of Amazon generated Provenance Id for which the details are to be fetched. For example - "P1,P2,P3" 
These provenance id can contain special characters, hence encode each of the comma separated provenance id using URLEncoder similar 
to https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html before sending the request


ProvenanceIdentifiersManagementApi *apiInstance = [[ProvenanceIdentifiersManagementApi alloc] init];

// Get Provenance Details
[apiInstance getProvenanceDetailsWith:xAmzAccessToken
    skuId:skuId
    locationId:locationId
    provenanceIdList:provenanceIdList
              completionHandler: ^(GetProvenanceDetailsOutput output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiInventoriesModel = require('amazon_yojaka_api_inventories_model');

var api = new AmazonYojakaApiInventoriesModel.ProvenanceIdentifiersManagementApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var skuId = skuId_example; // {{String}} The id of the SKU for which we need to get provenance details
var locationId = locationId_example; // {{String}} The id of the location for which we need to get provenance details.
var provenanceIdList = provenanceIdList_example; // {{String}} The comma separated string of Amazon generated Provenance Id for which the details are to be fetched. For example - "P1,P2,P3" 
These provenance id can contain special characters, hence encode each of the comma separated provenance id using URLEncoder similar 
to https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html before sending the request


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getProvenanceDetails(xAmzAccessToken, skuId, locationId, provenanceIdList, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getProvenanceDetailsExample
    {
        public void main()
        {

            var apiInstance = new ProvenanceIdentifiersManagementApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var skuId = skuId_example;  // String | The id of the SKU for which we need to get provenance details
            var locationId = locationId_example;  // String | The id of the location for which we need to get provenance details.
            var provenanceIdList = provenanceIdList_example;  // String | The comma separated string of Amazon generated Provenance Id for which the details are to be fetched. For example - "P1,P2,P3" 
These provenance id can contain special characters, hence encode each of the comma separated provenance id using URLEncoder similar 
to https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html before sending the request


            try
            {
                // Get Provenance Details
                GetProvenanceDetailsOutput result = apiInstance.getProvenanceDetails(xAmzAccessToken, skuId, locationId, provenanceIdList);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ProvenanceIdentifiersManagementApi.getProvenanceDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiProvenanceIdentifiersManagementApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$skuId = skuId_example; // String | The id of the SKU for which we need to get provenance details
$locationId = locationId_example; // String | The id of the location for which we need to get provenance details.
$provenanceIdList = provenanceIdList_example; // String | The comma separated string of Amazon generated Provenance Id for which the details are to be fetched. For example - "P1,P2,P3" 
These provenance id can contain special characters, hence encode each of the comma separated provenance id using URLEncoder similar 
to https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html before sending the request


try {
    $result = $api_instance->getProvenanceDetails($xAmzAccessToken, $skuId, $locationId, $provenanceIdList);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProvenanceIdentifiersManagementApi->getProvenanceDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ProvenanceIdentifiersManagementApi;

my $api_instance = WWW::SwaggerClient::ProvenanceIdentifiersManagementApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $skuId = skuId_example; # String | The id of the SKU for which we need to get provenance details
my $locationId = locationId_example; # String | The id of the location for which we need to get provenance details.
my $provenanceIdList = provenanceIdList_example; # String | The comma separated string of Amazon generated Provenance Id for which the details are to be fetched. For example - "P1,P2,P3" 
These provenance id can contain special characters, hence encode each of the comma separated provenance id using URLEncoder similar 
to https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html before sending the request


eval { 
    my $result = $api_instance->getProvenanceDetails(xAmzAccessToken => $xAmzAccessToken, skuId => $skuId, locationId => $locationId, provenanceIdList => $provenanceIdList);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ProvenanceIdentifiersManagementApi->getProvenanceDetails: $@\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.ProvenanceIdentifiersManagementApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
skuId = skuId_example # String | The id of the SKU for which we need to get provenance details
locationId = locationId_example # String | The id of the location for which we need to get provenance details.
provenanceIdList = provenanceIdList_example # String | The comma separated string of Amazon generated Provenance Id for which the details are to be fetched. For example - "P1,P2,P3" 
These provenance id can contain special characters, hence encode each of the comma separated provenance id using URLEncoder similar 
to https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html before sending the request


try: 
    # Get Provenance Details
    api_response = api_instance.get_provenance_details(xAmzAccessToken, skuId, locationId, provenanceIdList)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ProvenanceIdentifiersManagementApi->getProvenanceDetails: %s\n" % e)

Parameters

Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Query parameters
Name Description
skuId*
String
The id of the SKU for which we need to get provenance details
Required
locationId*
String
The id of the location for which we need to get provenance details.
Required
provenanceIdList*
String
The comma separated string of Amazon generated Provenance Id for which the details are to be fetched. For example - "P1,P2,P3" These provenance id can contain special characters, hence encode each of the comma separated provenance id using URLEncoder similar to https://docs.oracle.com/javase/8/docs/api/java/net/URLEncoder.html before sending the request
Required

Responses

Status: 200 - Success. The response contains the inventory details.

Status: 400 - Bad request. The response contains the error details.

Status: 401 - Unauthorized. You are not authorized to invoke this API for the given parameters.

Status: 409 - Conflict. Concurrent updates to the same inventory are not supported.

Status: 500 - Internal server error. Contact Amazon support for assistance.

Status: 503 - Service unavailable. Retry the request after some time.