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.

{

An object containing all details about the inventory picture available with Amazon Yojaka for a particular SKU.

Required: marketplaceChannelInventories,reservedQuantity,sellableQuantity
sellableQuantity:
integer

The number of items of the specified SKU that are available for being purchased.

reservedQuantity:
integer

The number of items of the specified SKU that have been reserved for orders dropped from any marketplace which are yet to be fulfilled.

provenanceQuantities:
[

The list of provenanceId-quantity of the specified SKU that are available for being purchased.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
provenanceReservedQuantities:
[

The list of provenanceId-quantity of the specified SKU that have been reserved for orders dropped from any marketplace which are yet to be fulfilled.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
marketplaceChannelInventories:
[ (1..∞)

Provides a break-up of how many items of the specified SKU are available in different channels.

{

Details of the inventory of a particular SKU available in a particular channel.

Required: marketplaceAttributes,sellableQuantity
sellableQuantity:
integer

The number of items of a particular SKU that is available for being purchased on the channel.

bufferedQuantity:
integer

The number of items of a particular SKU that have been virtually buffered by Amazon Yojaka.

sellableProvenances:
[

The list of provenances of the specified SKU that are available for being purchased.

string
]
unsellableProvenances:
[

The list of provenances of the specified SKU that are not available for being purchased due to being expired in that marketplace.

string
]
marketplaceAttributes:
{

The details about the marketplace and channel for this inventory applies.

Required: marketplaceName
marketplaceName:
string

The name of the marketplace.

channelName:
string

The name of the channel within the marketplace (if applicable).

}
channelDisabled:
boolean

The status of the specific node on the specified channel and marketplace. For a disabled marketplace channel, the inventory sent to upstream would be 0. true = Disabled/Inactive, false = Enabled/Active

}
]
}
example: [object Object]

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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
{

This object is used as input when the connector invokes the Amazon Yojaka Adapter API to send inventory update.

provenanceQuantities:
[

The list of provenanceId-quantity of the specified SKU that are available for being purchased.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
}
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.

{

An object containing all details about the inventory picture available with Amazon Yojaka for a particular SKU.

Required: marketplaceChannelInventories,reservedQuantity,sellableQuantity
sellableQuantity:
integer

The number of items of the specified SKU that are available for being purchased.

reservedQuantity:
integer

The number of items of the specified SKU that have been reserved for orders dropped from any marketplace which are yet to be fulfilled.

provenanceQuantities:
[

The list of provenanceId-quantity of the specified SKU that are available for being purchased.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
provenanceReservedQuantities:
[

The list of provenanceId-quantity of the specified SKU that have been reserved for orders dropped from any marketplace which are yet to be fulfilled.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
marketplaceChannelInventories:
[ (1..∞)

Provides a break-up of how many items of the specified SKU are available in different channels.

{

Details of the inventory of a particular SKU available in a particular channel.

Required: marketplaceAttributes,sellableQuantity
sellableQuantity:
integer

The number of items of a particular SKU that is available for being purchased on the channel.

bufferedQuantity:
integer

The number of items of a particular SKU that have been virtually buffered by Amazon Yojaka.

sellableProvenances:
[

The list of provenances of the specified SKU that are available for being purchased.

string
]
unsellableProvenances:
[

The list of provenances of the specified SKU that are not available for being purchased due to being expired in that marketplace.

string
]
marketplaceAttributes:
{

The details about the marketplace and channel for this inventory applies.

Required: marketplaceName
marketplaceName:
string

The name of the marketplace.

channelName:
string

The name of the channel within the marketplace (if applicable).

}
channelDisabled:
boolean

The status of the specific node on the specified channel and marketplace. For a disabled marketplace channel, the inventory sent to upstream would be 0. true = Disabled/Inactive, false = Enabled/Active

}
]
}
example: [object Object]

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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 *
{

An object containing createProvenanceIdentifiers input.

Required: provenanceDetailsList
provenanceDetailsList:
[

A list of provenance details

{

An object containing provenance level details for a given sku and location

batchId:
string

A string representing batch number for this provenance

sellingPrice:
{

Represents a monetary amount along with a currency for the amount.

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
listPrice:
{

Represents a monetary amount along with a currency for the amount.

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) of a particular provenance.

}
]
}
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.

{

An object containing information of the provenance being created.

ValidProvenanceIdentifiersList:
[

List of Valid Provenances which were created across all marketplaces.

{

An object which contains provenance id created by Yojaka Amazon for given provenance details along with provenance status across all Marketplaces where Sku is active.

Required: marketplaceChannelNameStatusList,provenanceDetails,provenanceId
provenanceId:
string

An id which maps uniquely to given provenance details for the given sku. It needs to be persisted for any future communication for order and inventory processing.

provenanceDetails:
{

An object containing provenance level details for a given sku and location

batchId:
string

A string representing batch number for this provenance

sellingPrice:
{

Represents a monetary amount along with a currency for the amount.

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
listPrice:
{

Represents a monetary amount along with a currency for the amount.

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) of a particular provenance.

}
marketplaceChannelNameStatusList:
[

List which contains marketplace channel level status of a provenance

{

An object which contains marketplace channel status of each provenance based on various marketplace specific validations.

Required: isProvenanceActive,marketplaceChannelAttributes
marketplaceChannelAttributes:
{

Provides details about the marketplace and the channel.

Required: marketplaceName
marketplaceName:
string

The name of the marketplace.

example: AMAZON_IN
channelName:
string

The name of the channel within the marketplace.

example: FBA
}
isProvenanceActive:
boolean

Boolean which tells the status of provenance in that marketplace. true = provenance active, false = provenance inactive

failureReason:
string

Failure reason in case if provenance is inactive in a specific marketplace. If provenance is active then this value will be null

marketplaceChannelExpiryTimestamp:
integer (int64)

Expiry time stamp as per the marketplace buffer/pad time. If expiry of provenance is at epoch of 110ms and marketplace pad time is 10ms, then this will be 110-10 = 100ms. It will be null in case proevnance is inactive in a marketplace.

}
]
}
]
InvalidProvenanceIdentifiersList:
[

List of Invalid Provenances which expired or had invalid list/selling price.

{

An object which contains Invalid Provenances which were either expired or had invalid list/selling price.

provenanceDetails:
{

An object containing provenance level details for a given sku and location

batchId:
string

A string representing batch number for this provenance

sellingPrice:
{

Represents a monetary amount along with a currency for the amount.

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
listPrice:
{

Represents a monetary amount along with a currency for the amount.

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) of a particular provenance.

}
errorCode:
string

Error code where provenances were invalid

Enum: PROVENANCE_EXPIRED, INCORRECT_PROVENANCE_MRP, EMPTY_PROVENANCE_DETAILS
example: PROVENANCE_EXPIRED
}
]
}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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.

{

An object containing provenance details stored in AmazonYojaka for a list of input provenace id.

provenanceDetailsList:
[

List of provenances which are stored in Amazon yojaka system along with their metadata.

{

An object which contains provenance id created by Yojaka Amazon for given provenance details along with provenance status across all Marketplaces where Sku is active.

Required: marketplaceChannelNameStatusList,provenanceDetails,provenanceId
provenanceId:
string

An id which maps uniquely to given provenance details for the given sku. It needs to be persisted for any future communication for order and inventory processing.

provenanceDetails:
{

An object containing provenance level details for a given sku and location

batchId:
string

A string representing batch number for this provenance

sellingPrice:
{

Represents a monetary amount along with a currency for the amount.

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
listPrice:
{

Represents a monetary amount along with a currency for the amount.

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) of a particular provenance.

}
marketplaceChannelNameStatusList:
[

List which contains marketplace channel level status of a provenance

{

An object which contains marketplace channel status of each provenance based on various marketplace specific validations.

Required: isProvenanceActive,marketplaceChannelAttributes
marketplaceChannelAttributes:
{

Provides details about the marketplace and the channel.

Required: marketplaceName
marketplaceName:
string

The name of the marketplace.

example: AMAZON_IN
channelName:
string

The name of the channel within the marketplace.

example: FBA
}
isProvenanceActive:
boolean

Boolean which tells the status of provenance in that marketplace. true = provenance active, false = provenance inactive

failureReason:
string

Failure reason in case if provenance is inactive in a specific marketplace. If provenance is active then this value will be null

marketplaceChannelExpiryTimestamp:
integer (int64)

Expiry time stamp as per the marketplace buffer/pad time. If expiry of provenance is at epoch of 110ms and marketplace pad time is 10ms, then this will be 110-10 = 100ms. It will be null in case proevnance is inactive in a marketplace.

}
]
}
]
}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}

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

{

Represents information about an error/exception that occurred with an API call to Amazon Yojaka.

Required: errorCode,errorDescription,retryable
errorCode:
string

A unique Amazon Yojaka error code assigned to each class of errors.

example: SC_00001
errorDescription:
string

A human-readable description of the error.

example: A temporary failure occurred in the Amazon Yojaka product.
retryable:
boolean

A boolean value indicating if the API can be retried again with the possibility that the API invocation might succeed upon retry.

}