Amazon Yojaka Adapters API Interface Model

OrderFulfilment

createPackages

Create packages

Invoked by the Amazon Yojaka product to create a package in the specified order.


/orders/{id}/packages

Usage and SDK Samples

curl -X POST "//orders/{id}/packages?marketplaceName=&channelName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFulfilmentApi;

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

public class OrderFulfilmentApiExample {

    public static void main(String[] args) {
        
        OrderFulfilmentApi apiInstance = new OrderFulfilmentApi();
        UpsertPackageInput body = ; // UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace for which the packages whose order is being processed.
        String channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
        String id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
        try {
            apiInstance.createPackages(body, marketplaceName, channelName, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFulfilmentApi#createPackages");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFulfilmentApi;

public class OrderFulfilmentApiExample {

    public static void main(String[] args) {
        OrderFulfilmentApi apiInstance = new OrderFulfilmentApi();
        UpsertPackageInput body = ; // UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace for which the packages whose order is being processed.
        String channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
        String id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
        try {
            apiInstance.createPackages(body, marketplaceName, channelName, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFulfilmentApi#createPackages");
            e.printStackTrace();
        }
    }
}
UpsertPackageInput *body = ; // The request body containing information about the order and package for which the adapter needs to return a ship-label.
String *marketplaceName = marketplaceName_example; // The name of the marketplace for which the packages whose order is being processed.
String *channelName = channelName_example; // The name of the fulfilment channel within the marketplace whose order is being processed.
String *id = id_example; // The id of the shipment which is being fulfilled (shipmentId).

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

// Create packages
[apiInstance createPackagesWith:body
    marketplaceName:marketplaceName
    channelName:channelName
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiInterfaceModel = require('amazon_yojaka_adapters_api_interface_model');

var api = new AmazonYojakaAdaptersApiInterfaceModel.OrderFulfilmentApi()
var body = ; // {{UpsertPackageInput}} The request body containing information about the order and package for which the adapter needs to return a ship-label.
var marketplaceName = marketplaceName_example; // {{String}} The name of the marketplace for which the packages whose order is being processed.
var channelName = channelName_example; // {{String}} The name of the fulfilment channel within the marketplace whose order is being processed.
var id = id_example; // {{String}} The id of the shipment which is being fulfilled (shipmentId).

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

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

            var apiInstance = new OrderFulfilmentApi();
            var body = new UpsertPackageInput(); // UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
            var marketplaceName = marketplaceName_example;  // String | The name of the marketplace for which the packages whose order is being processed.
            var channelName = channelName_example;  // String | The name of the fulfilment channel within the marketplace whose order is being processed.
            var id = id_example;  // String | The id of the shipment which is being fulfilled (shipmentId).

            try
            {
                // Create packages
                apiInstance.createPackages(body, marketplaceName, channelName, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFulfilmentApi.createPackages: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderFulfilmentApi();
$body = ; // UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
$marketplaceName = marketplaceName_example; // String | The name of the marketplace for which the packages whose order is being processed.
$channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
$id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).

try {
    $api_instance->createPackages($body, $marketplaceName, $channelName, $id);
} catch (Exception $e) {
    echo 'Exception when calling OrderFulfilmentApi->createPackages: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderFulfilmentApi;

my $api_instance = WWW::SwaggerClient::OrderFulfilmentApi->new();
my $body = WWW::SwaggerClient::Object::UpsertPackageInput->new(); # UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
my $marketplaceName = marketplaceName_example; # String | The name of the marketplace for which the packages whose order is being processed.
my $channelName = channelName_example; # String | The name of the fulfilment channel within the marketplace whose order is being processed.
my $id = id_example; # String | The id of the shipment which is being fulfilled (shipmentId).

eval { 
    $api_instance->createPackages(body => $body, marketplaceName => $marketplaceName, channelName => $channelName, id => $id);
};
if ($@) {
    warn "Exception when calling OrderFulfilmentApi->createPackages: $@\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.OrderFulfilmentApi()
body =  # UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
marketplaceName = marketplaceName_example # String | The name of the marketplace for which the packages whose order is being processed.
channelName = channelName_example # String | The name of the fulfilment channel within the marketplace whose order is being processed.
id = id_example # String | The id of the shipment which is being fulfilled (shipmentId).

try: 
    # Create packages
    api_instance.create_packages(body, marketplaceName, channelName, id)
except ApiException as e:
    print("Exception when calling OrderFulfilmentApi->createPackages: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The id of the shipment which is being fulfilled (shipmentId).
Required
Body parameters
Name Description
body *
{

The request body payload that will be provided by the Amazon Yojaka product when invoking the Create/Update packages API on your adapter.

Required: locationId,merchantId,orderId,packageInfo
locationId:
string

The id of the location where the order is being fulfilled.

merchantId:
string

The id of the seller (merchant) whose order is being fulfilled.

orderId:
string

The id of the order whose shipment is being fulfilled.

packageInfo:
{

This type describes a package that is created to ship one or more of an order's line items.

Required: height,id,length,lineItems,weight,width
id:
length:
width:
height:
weight:
lineItems:
}
}
Query parameters
Name Description
marketplaceName*
String
The name of the marketplace for which the packages whose order is being processed.
Required
channelName*
String
The name of the fulfilment channel within the marketplace whose order is being processed.
Required

Responses

Status: 200 - Success. The package is created in the marketplace

Status: 400 - Bad request. One or more of the input parameters you have provided is invalid.

Status: 500 - Internal server error.


generateShipLabel

Generate ship label

This API is to schedule the shipment with a shipping service and return the ship label.


/v1/orders/{id}/packages/{packageId}/ship-label

Usage and SDK Samples

curl -X POST "//v1/orders/{id}/packages/{packageId}/ship-label?operation=&marketplaceName=&channelName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFulfilmentApi;

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

public class OrderFulfilmentApiExample {

    public static void main(String[] args) {
        
        OrderFulfilmentApi apiInstance = new OrderFulfilmentApi();
        GenerateShipLabelInput body = ; // GenerateShipLabelInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
        String operation = operation_example; // String | Indicate whether have to generate the ship label for the first time or regenerate it.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
        String channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
        String id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
        String packageId = packageId_example; // String | The packages's ID whose ship label is to be generated.
        try {
            GenerateShipLabelOutput result = apiInstance.generateShipLabel(body, operation, marketplaceName, channelName, id, packageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFulfilmentApi#generateShipLabel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFulfilmentApi;

public class OrderFulfilmentApiExample {

    public static void main(String[] args) {
        OrderFulfilmentApi apiInstance = new OrderFulfilmentApi();
        GenerateShipLabelInput body = ; // GenerateShipLabelInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
        String operation = operation_example; // String | Indicate whether have to generate the ship label for the first time or regenerate it.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
        String channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
        String id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
        String packageId = packageId_example; // String | The packages's ID whose ship label is to be generated.
        try {
            GenerateShipLabelOutput result = apiInstance.generateShipLabel(body, operation, marketplaceName, channelName, id, packageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFulfilmentApi#generateShipLabel");
            e.printStackTrace();
        }
    }
}
GenerateShipLabelInput *body = ; // The request body containing information about the order and package for which the adapter needs to return a ship-label.
String *operation = operation_example; // Indicate whether have to generate the ship label for the first time or regenerate it.
String *marketplaceName = marketplaceName_example; // The name of the marketplace whose order is being processed.
String *channelName = channelName_example; // The name of the fulfilment channel within the marketplace whose order is being processed.
String *id = id_example; // The id of the shipment which is being fulfilled (shipmentId).
String *packageId = packageId_example; // The packages's ID whose ship label is to be generated.

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

// Generate ship label
[apiInstance generateShipLabelWith:body
    operation:operation
    marketplaceName:marketplaceName
    channelName:channelName
    id:id
    packageId:packageId
              completionHandler: ^(GenerateShipLabelOutput output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiInterfaceModel = require('amazon_yojaka_adapters_api_interface_model');

var api = new AmazonYojakaAdaptersApiInterfaceModel.OrderFulfilmentApi()
var body = ; // {{GenerateShipLabelInput}} The request body containing information about the order and package for which the adapter needs to return a ship-label.
var operation = operation_example; // {{String}} Indicate whether have to generate the ship label for the first time or regenerate it.
var marketplaceName = marketplaceName_example; // {{String}} The name of the marketplace whose order is being processed.
var channelName = channelName_example; // {{String}} The name of the fulfilment channel within the marketplace whose order is being processed.
var id = id_example; // {{String}} The id of the shipment which is being fulfilled (shipmentId).
var packageId = packageId_example; // {{String}} The packages's ID whose ship label is to be generated.

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

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

            var apiInstance = new OrderFulfilmentApi();
            var body = new GenerateShipLabelInput(); // GenerateShipLabelInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
            var operation = operation_example;  // String | Indicate whether have to generate the ship label for the first time or regenerate it.
            var marketplaceName = marketplaceName_example;  // String | The name of the marketplace whose order is being processed.
            var channelName = channelName_example;  // String | The name of the fulfilment channel within the marketplace whose order is being processed.
            var id = id_example;  // String | The id of the shipment which is being fulfilled (shipmentId).
            var packageId = packageId_example;  // String | The packages's ID whose ship label is to be generated.

            try
            {
                // Generate ship label
                GenerateShipLabelOutput result = apiInstance.generateShipLabel(body, operation, marketplaceName, channelName, id, packageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFulfilmentApi.generateShipLabel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderFulfilmentApi();
$body = ; // GenerateShipLabelInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
$operation = operation_example; // String | Indicate whether have to generate the ship label for the first time or regenerate it.
$marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
$channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
$id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
$packageId = packageId_example; // String | The packages's ID whose ship label is to be generated.

try {
    $result = $api_instance->generateShipLabel($body, $operation, $marketplaceName, $channelName, $id, $packageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderFulfilmentApi->generateShipLabel: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderFulfilmentApi;

my $api_instance = WWW::SwaggerClient::OrderFulfilmentApi->new();
my $body = WWW::SwaggerClient::Object::GenerateShipLabelInput->new(); # GenerateShipLabelInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
my $operation = operation_example; # String | Indicate whether have to generate the ship label for the first time or regenerate it.
my $marketplaceName = marketplaceName_example; # String | The name of the marketplace whose order is being processed.
my $channelName = channelName_example; # String | The name of the fulfilment channel within the marketplace whose order is being processed.
my $id = id_example; # String | The id of the shipment which is being fulfilled (shipmentId).
my $packageId = packageId_example; # String | The packages's ID whose ship label is to be generated.

eval { 
    my $result = $api_instance->generateShipLabel(body => $body, operation => $operation, marketplaceName => $marketplaceName, channelName => $channelName, id => $id, packageId => $packageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderFulfilmentApi->generateShipLabel: $@\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.OrderFulfilmentApi()
body =  # GenerateShipLabelInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
operation = operation_example # String | Indicate whether have to generate the ship label for the first time or regenerate it.
marketplaceName = marketplaceName_example # String | The name of the marketplace whose order is being processed.
channelName = channelName_example # String | The name of the fulfilment channel within the marketplace whose order is being processed.
id = id_example # String | The id of the shipment which is being fulfilled (shipmentId).
packageId = packageId_example # String | The packages's ID whose ship label is to be generated.

try: 
    # Generate ship label
    api_response = api_instance.generate_ship_label(body, operation, marketplaceName, channelName, id, packageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderFulfilmentApi->generateShipLabel: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The id of the shipment which is being fulfilled (shipmentId).
Required
packageId*
String
The packages's ID whose ship label is to be generated.
Required
Body parameters
Name Description
body *
{

The request body payload that will be provided by the Amazon Yojaka product when invoking the RetrieveShipLabel API on your adapter.

Required: locationId,merchantId,packageInfo,shipLabelFormat
orderId:
string

The id of the order whose shipment is being fulfilled.

shipmentId:
string

The id of the shipment which is being fulfilled.

locationId:
string

The id of the location where the order is being fulfilled.

merchantId:
string

The id of the seller (merchant) whose order is being fulfilled.

packageInfo:
{

This type describes a package that is created to ship one or more of an order's line items.

Required: height,id,length,lineItems,weight,width
id:
length:
width:
height:
weight:
lineItems:
}
paymentInfo:
{

Represents the payment details of the shipping service

cashOnDelivery:
totalAmount:
balanceDueAmount:
taxTotalAmount:
}
priority:
boolean

Flag indicating if this package needs priority shipping.

shippingServiceOffer:
{

Details of the shipping service

Required: id,shipBy
id:
shipBy:
shippingServiceId:
shippingServiceName:
carrierId:
carrierName:
promise:
totalCharge:
billedWeight:
}
locationTimezone:
string

The timezone of the location where order is being fulfilled.

printerResolution:
integer (int64)

The resolution of the ship-label printer.

shipLabelFormat:
string

The format in which the ship-label should be returned.

Enum: PDF, ZPL, PNG
returnAddress:
{

The return address to be printed on the ship-label.

Required: addressLine1,city,countryCode,name,postalCode,state
name:
addressLine1:
addressLine2:
addressLine3:
city:
state:
countryCode:
postalCode:
}
}
Query parameters
Name Description
operation*
String
Indicate whether have to generate the ship label for the first time or regenerate it.
Required
marketplaceName*
String
The name of the marketplace whose order is being processed.
Required
channelName*
String
The name of the fulfilment channel within the marketplace whose order is being processed.
Required

Responses

Status: 200 - Success. The encrypted shiplabel is contained in the response body.

{

The response body that will be provided by the respective adapter when invoking the RetrieveShipLabel API on your adapter.

Required: carrierShortName,label,shipMethod,trackingId
trackingId:
string

The tracking number of the package.

shipMethod:
string

shipping method used for the package.

carrierShortName:
string

Name of the carrier.

label:
{

An object to represent shiplabel.

payload:
{

Represents encrypted data, along with the key that can be used to request for decryption.

Required: encryptionInfo,value
value:
encryptionInfo:
}
format:
string

The format in which the ship-label should be returned.

Enum: PDF, ZPL, PNG
}
pickupWindow:
{

An object to represent a date/time range for carrier pickup.

Required: endTime,startTime
startTime:
number

The start date/time of the time window specified as milliseconds since epoch (in UTC)

endTime:
number

The end date/time of the time window specified as milliseconds since epoch (in UTC)

}
}

Status: 400 - Bad request. One or more of the input parameters you have provided is invalid.

Status: 500 - Internal server error.


getInvoice

Get Invoice

Adapter exposes this Rest API to fetch the invoice/warranty (in case of serial number items) document for orders.


/v1/orders/{id}/packages/{packageId}/invoice

Usage and SDK Samples

curl -X PUT "//v1/orders/{id}/packages/{packageId}/invoice?marketplaceName=&channelName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFulfilmentApi;

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

public class OrderFulfilmentApiExample {

    public static void main(String[] args) {
        
        OrderFulfilmentApi apiInstance = new OrderFulfilmentApi();
        RetrieveInvoiceInput body = ; // RetrieveInvoiceInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
        String channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
        String id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
        String packageId = packageId_example; // String | The package ID whose invoice is to be generated.
        try {
            EncryptedData result = apiInstance.getInvoice(body, marketplaceName, channelName, id, packageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFulfilmentApi#getInvoice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFulfilmentApi;

public class OrderFulfilmentApiExample {

    public static void main(String[] args) {
        OrderFulfilmentApi apiInstance = new OrderFulfilmentApi();
        RetrieveInvoiceInput body = ; // RetrieveInvoiceInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
        String channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
        String id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
        String packageId = packageId_example; // String | The package ID whose invoice is to be generated.
        try {
            EncryptedData result = apiInstance.getInvoice(body, marketplaceName, channelName, id, packageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFulfilmentApi#getInvoice");
            e.printStackTrace();
        }
    }
}
RetrieveInvoiceInput *body = ; // The request body containing information about the order and package for which the adapter needs to return a ship-label.
String *marketplaceName = marketplaceName_example; // The name of the marketplace whose order is being processed.
String *channelName = channelName_example; // The name of the fulfilment channel within the marketplace whose order is being processed.
String *id = id_example; // The id of the shipment which is being fulfilled (shipmentId).
String *packageId = packageId_example; // The package ID whose invoice is to be generated.

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

// Get Invoice
[apiInstance getInvoiceWith:body
    marketplaceName:marketplaceName
    channelName:channelName
    id:id
    packageId:packageId
              completionHandler: ^(EncryptedData output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiInterfaceModel = require('amazon_yojaka_adapters_api_interface_model');

var api = new AmazonYojakaAdaptersApiInterfaceModel.OrderFulfilmentApi()
var body = ; // {{RetrieveInvoiceInput}} The request body containing information about the order and package for which the adapter needs to return a ship-label.
var marketplaceName = marketplaceName_example; // {{String}} The name of the marketplace whose order is being processed.
var channelName = channelName_example; // {{String}} The name of the fulfilment channel within the marketplace whose order is being processed.
var id = id_example; // {{String}} The id of the shipment which is being fulfilled (shipmentId).
var packageId = packageId_example; // {{String}} The package ID whose invoice is to be generated.

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

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

            var apiInstance = new OrderFulfilmentApi();
            var body = new RetrieveInvoiceInput(); // RetrieveInvoiceInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
            var marketplaceName = marketplaceName_example;  // String | The name of the marketplace whose order is being processed.
            var channelName = channelName_example;  // String | The name of the fulfilment channel within the marketplace whose order is being processed.
            var id = id_example;  // String | The id of the shipment which is being fulfilled (shipmentId).
            var packageId = packageId_example;  // String | The package ID whose invoice is to be generated.

            try
            {
                // Get Invoice
                EncryptedData result = apiInstance.getInvoice(body, marketplaceName, channelName, id, packageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFulfilmentApi.getInvoice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderFulfilmentApi();
$body = ; // RetrieveInvoiceInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
$marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
$channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
$id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
$packageId = packageId_example; // String | The package ID whose invoice is to be generated.

try {
    $result = $api_instance->getInvoice($body, $marketplaceName, $channelName, $id, $packageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderFulfilmentApi->getInvoice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderFulfilmentApi;

my $api_instance = WWW::SwaggerClient::OrderFulfilmentApi->new();
my $body = WWW::SwaggerClient::Object::RetrieveInvoiceInput->new(); # RetrieveInvoiceInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
my $marketplaceName = marketplaceName_example; # String | The name of the marketplace whose order is being processed.
my $channelName = channelName_example; # String | The name of the fulfilment channel within the marketplace whose order is being processed.
my $id = id_example; # String | The id of the shipment which is being fulfilled (shipmentId).
my $packageId = packageId_example; # String | The package ID whose invoice is to be generated.

eval { 
    my $result = $api_instance->getInvoice(body => $body, marketplaceName => $marketplaceName, channelName => $channelName, id => $id, packageId => $packageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderFulfilmentApi->getInvoice: $@\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.OrderFulfilmentApi()
body =  # RetrieveInvoiceInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
marketplaceName = marketplaceName_example # String | The name of the marketplace whose order is being processed.
channelName = channelName_example # String | The name of the fulfilment channel within the marketplace whose order is being processed.
id = id_example # String | The id of the shipment which is being fulfilled (shipmentId).
packageId = packageId_example # String | The package ID whose invoice is to be generated.

try: 
    # Get Invoice
    api_response = api_instance.get_invoice(body, marketplaceName, channelName, id, packageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderFulfilmentApi->getInvoice: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The id of the shipment which is being fulfilled (shipmentId).
Required
packageId*
String
The package ID whose invoice is to be generated.
Required
Body parameters
Name Description
body *
{

The request body payload that will be provided by the Amazon Yojaka product when invoking the RetrieveInvoice API on your adapter.

Required: lineItemsList,locationId,marketplaceAttributes,merchantId
locationId:
string

The id of the location where the order is being fulfilled.

merchantId:
string

The id of the seller (merchant) whose order is being fulfilled.

marketplaceAttributes:
{

Represents information about a marketplace and a fulfilment channel within that marketplace whose order is being processed.

Required: channelName,marketplaceName
marketplaceName:
channelName:
}
lineItemsList:
[ (1..∞)

A list of line items from the order for which an invoice is to be retrieved.

{

Represents a line item for which invoice is to be retrieved.

Required: id,merchantSku,numberOfUnits
id:
string

The id of the line item.

merchantSku:
string

The SKU identifier of the line item.

numberOfUnits:
integer (int32) minimum:1

The number of items from the line item being fulfilled.

serialNumberList:
[

A list of encrypted serial numbers (if required) of items being fulfilled.

{

Represents encrypted data, along with the key that can be used to request for decryption.

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: invoice, shipLabel, giftMessage, serialNumber, shipToAddress
example: shipToAddress
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
]
}
]
}
Query parameters
Name Description
marketplaceName*
String
The name of the marketplace whose order is being processed.
Required
channelName*
String
The name of the fulfilment channel within the marketplace whose order is being processed.
Required

Responses

Status: 200 - Success. The encrypted invoice is contained in the response body.

{

Represents encrypted data, along with the key that can be used to request for decryption.

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: invoice, shipLabel, giftMessage, serialNumber, shipToAddress
example: shipToAddress
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}

Status: 400 - Bad request. One or more of the input parameters you have provided is invalid.

Status: 500 - Internal server error.


retrieveShippingServices

Fetch Eligible Shipping services / pickup slots

This API is to retrieve the list of eligible shipping services (carrier + ship out time) which seller can use to ship the packages from his/her location. The merchant is expected to choose one of the possible eligible shipping service.


/orders/{id}/shipping-services

Usage and SDK Samples

curl -X PUT "//orders/{id}/shipping-services?marketplaceName=&channelName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFulfilmentApi;

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

public class OrderFulfilmentApiExample {

    public static void main(String[] args) {
        
        OrderFulfilmentApi apiInstance = new OrderFulfilmentApi();
        RetrieveEligibleShippingServicesInput body = ; // RetrieveEligibleShippingServicesInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
        String channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
        String id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
        try {
            RetrieveEligibleShippingServicesOutput result = apiInstance.retrieveShippingServices(body, marketplaceName, channelName, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFulfilmentApi#retrieveShippingServices");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFulfilmentApi;

public class OrderFulfilmentApiExample {

    public static void main(String[] args) {
        OrderFulfilmentApi apiInstance = new OrderFulfilmentApi();
        RetrieveEligibleShippingServicesInput body = ; // RetrieveEligibleShippingServicesInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
        String channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
        String id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
        try {
            RetrieveEligibleShippingServicesOutput result = apiInstance.retrieveShippingServices(body, marketplaceName, channelName, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFulfilmentApi#retrieveShippingServices");
            e.printStackTrace();
        }
    }
}
RetrieveEligibleShippingServicesInput *body = ; // The request body containing information about the order and package for which the adapter needs to return a ship-label.
String *marketplaceName = marketplaceName_example; // The name of the marketplace whose order is being processed.
String *channelName = channelName_example; // The name of the fulfilment channel within the marketplace whose order is being processed.
String *id = id_example; // The id of the shipment which is being fulfilled (shipmentId).

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

// Fetch Eligible Shipping services / pickup slots
[apiInstance retrieveShippingServicesWith:body
    marketplaceName:marketplaceName
    channelName:channelName
    id:id
              completionHandler: ^(RetrieveEligibleShippingServicesOutput output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiInterfaceModel = require('amazon_yojaka_adapters_api_interface_model');

var api = new AmazonYojakaAdaptersApiInterfaceModel.OrderFulfilmentApi()
var body = ; // {{RetrieveEligibleShippingServicesInput}} The request body containing information about the order and package for which the adapter needs to return a ship-label.
var marketplaceName = marketplaceName_example; // {{String}} The name of the marketplace whose order is being processed.
var channelName = channelName_example; // {{String}} The name of the fulfilment channel within the marketplace whose order is being processed.
var id = id_example; // {{String}} The id of the shipment which is being fulfilled (shipmentId).

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

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

            var apiInstance = new OrderFulfilmentApi();
            var body = new RetrieveEligibleShippingServicesInput(); // RetrieveEligibleShippingServicesInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
            var marketplaceName = marketplaceName_example;  // String | The name of the marketplace whose order is being processed.
            var channelName = channelName_example;  // String | The name of the fulfilment channel within the marketplace whose order is being processed.
            var id = id_example;  // String | The id of the shipment which is being fulfilled (shipmentId).

            try
            {
                // Fetch Eligible Shipping services / pickup slots
                RetrieveEligibleShippingServicesOutput result = apiInstance.retrieveShippingServices(body, marketplaceName, channelName, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFulfilmentApi.retrieveShippingServices: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderFulfilmentApi();
$body = ; // RetrieveEligibleShippingServicesInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
$marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
$channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
$id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).

try {
    $result = $api_instance->retrieveShippingServices($body, $marketplaceName, $channelName, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderFulfilmentApi->retrieveShippingServices: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderFulfilmentApi;

my $api_instance = WWW::SwaggerClient::OrderFulfilmentApi->new();
my $body = WWW::SwaggerClient::Object::RetrieveEligibleShippingServicesInput->new(); # RetrieveEligibleShippingServicesInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
my $marketplaceName = marketplaceName_example; # String | The name of the marketplace whose order is being processed.
my $channelName = channelName_example; # String | The name of the fulfilment channel within the marketplace whose order is being processed.
my $id = id_example; # String | The id of the shipment which is being fulfilled (shipmentId).

eval { 
    my $result = $api_instance->retrieveShippingServices(body => $body, marketplaceName => $marketplaceName, channelName => $channelName, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderFulfilmentApi->retrieveShippingServices: $@\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.OrderFulfilmentApi()
body =  # RetrieveEligibleShippingServicesInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
marketplaceName = marketplaceName_example # String | The name of the marketplace whose order is being processed.
channelName = channelName_example # String | The name of the fulfilment channel within the marketplace whose order is being processed.
id = id_example # String | The id of the shipment which is being fulfilled (shipmentId).

try: 
    # Fetch Eligible Shipping services / pickup slots
    api_response = api_instance.retrieve_shipping_services(body, marketplaceName, channelName, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderFulfilmentApi->retrieveShippingServices: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The id of the shipment which is being fulfilled (shipmentId).
Required
Body parameters
Name Description
body *
{

The request body payload that will be provided by the Amazon Yojaka product when invoking the RetrieveShipLabel API on your adapter.

Required: locationId,merchantId,orderId,packageList,shipmentId,shippingType
locationId:
string

The id of the location where the order is being fulfilled.

merchantId:
string

The id of the seller (merchant) whose order is being fulfilled.

shipmentId:
string

The id of the shipment which is being fulfilled.

orderId:
string

The id of the order whose shipment is being fulfilled.

shippingType:
string

The transportation choice of the seller to ship the order.

Enum: Marketplace, Self
packageList:
[ (1..∞)
{

This type describes a package that is created to ship one or more of an order's line items.

Required: height,id,length,lineItems,weight,width
id:
string

An id provided by SmartConnect's clients which uniquely identifies a package within the scope of an order

length:
{

An object to represent a dimension of a package.

Required: dimensionUnit,value
value:
number minimum:1

The numerical value of the dimension. Will always be a positive number.

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
width:
{

An object to represent a dimension of a package.

Required: dimensionUnit,value
value:
number minimum:1

The numerical value of the dimension. Will always be a positive number.

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
height:
{

An object to represent a dimension of a package.

Required: dimensionUnit,value
value:
number minimum:1

The numerical value of the dimension. Will always be a positive number.

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
weight:
{

An object to represent the weight of a package.

Required: value,weightUnit
value:
number minimum:1

The numerical value of the weight. Will always be a positive number.

weightUnit:
string

The unit of measurement of the weight.

Enum: grams, kilograms
}
lineItems:
[

The order's line items (or a sub-set of them) that are packed into a particular package

{

Ths type describes a line item which contains details of an order item.

Required: id,merchantSku,numberOfUnits
id:
string

An identifier for an order's line item. This identifier is guaranteed to be unique within the scope of its containing order.

example: LI1
numberOfUnits:
integer (int32) minimum:1

The number of items of a particular line item of the order that are in a particular package.

merchantSku:
string

The SKU identifier of the line item.

example: MSKU1
serialNumbers:
[

The encrypted list of serial numbers of items in the package, if required to be provided for the items in the package

{

Represents encrypted data, along with the key that can be used to request for decryption.

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: invoice, shipLabel, giftMessage, serialNumber, shipToAddress
example: shipToAddress
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
]
}
]
}
]
}
Query parameters
Name Description
marketplaceName*
String
The name of the marketplace whose order is being processed.
Required
channelName*
String
The name of the fulfilment channel within the marketplace whose order is being processed.
Required

Responses

Status: 200 - Success. The details of the eligible shipping services is contained in the response body.

{

The body that will be received as part of success response of the API Fetch eligible shipping services.

Required: eligibleShippingServiceOffersByPackageV2
eligibleShippingServiceOffersByPackageV2:
{

Details of the eligible shipping service options

Required: eligibleShippingServiceOfferList
eligibleShippingServiceOfferList:
[
{

Details of the shipping service

Required: id,shipBy
id:
string

The id of the shipping service slot.

shipBy:
string

The transportation choice of the seller to ship the order.

Enum: MARKETPLACE, SELLER, THIRD_PARTY_CARRIER
example: MARKETPLACE
shippingServiceId:
string

The id of the shipping service.

shippingServiceName:
string

The name of the shipping service.

carrierId:
string

The id of the carrier.

carrierName:
string

The name of the carrier.

promise:
{

Represents information about promise of a shipping service i.e. the pickup and delivery windows

deliveryWindow:
{

Represents a time window

Required: endTime,startTime
startTime:
number

Start time of the window

endTime:
number

End time of the window

}
pickupWindow:
{

Represents a time window

Required: endTime,startTime
startTime:
number

Start time of the window

endTime:
number

End time of the window

}
}
totalCharge:
{

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
}
billedWeight:
{

An object to represent the weight of a package.

Required: value,weightUnit
value:
number minimum:1

The numerical value of the weight. Will always be a positive number.

weightUnit:
string

The unit of measurement of the weight.

Enum: grams, kilograms
}
}
]
recommendedShippingServiceOffer:
{

Details of the shipping service

Required: id,shipBy
id:
shipBy:
shippingServiceId:
shippingServiceName:
carrierId:
carrierName:
promise:
totalCharge:
billedWeight:
}
}
}

Status: 400 - Bad request. One or more of the input parameters you have provided is invalid.

Status: 500 - Internal server error.


updatePackages

Update packages

Invoked by the Amazon Yojaka product to update the specifications of an already created package in the specified order.


/orders/{id}/packages/{packageId}

Usage and SDK Samples

curl -X PUT "//orders/{id}/packages/{packageId}?marketplaceName=&channelName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderFulfilmentApi;

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

public class OrderFulfilmentApiExample {

    public static void main(String[] args) {
        
        OrderFulfilmentApi apiInstance = new OrderFulfilmentApi();
        UpsertPackageInput body = ; // UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
        String channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
        String id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
        String packageId = packageId_example; // String | The package id whose specifications are to be modified.
        try {
            apiInstance.updatePackages(body, marketplaceName, channelName, id, packageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFulfilmentApi#updatePackages");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderFulfilmentApi;

public class OrderFulfilmentApiExample {

    public static void main(String[] args) {
        OrderFulfilmentApi apiInstance = new OrderFulfilmentApi();
        UpsertPackageInput body = ; // UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
        String channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
        String id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
        String packageId = packageId_example; // String | The package id whose specifications are to be modified.
        try {
            apiInstance.updatePackages(body, marketplaceName, channelName, id, packageId);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderFulfilmentApi#updatePackages");
            e.printStackTrace();
        }
    }
}
UpsertPackageInput *body = ; // The request body containing information about the order and package for which the adapter needs to return a ship-label.
String *marketplaceName = marketplaceName_example; // The name of the marketplace whose order is being processed.
String *channelName = channelName_example; // The name of the fulfilment channel within the marketplace whose order is being processed.
String *id = id_example; // The id of the shipment which is being fulfilled (shipmentId).
String *packageId = packageId_example; // The package id whose specifications are to be modified.

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

// Update packages
[apiInstance updatePackagesWith:body
    marketplaceName:marketplaceName
    channelName:channelName
    id:id
    packageId:packageId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiInterfaceModel = require('amazon_yojaka_adapters_api_interface_model');

var api = new AmazonYojakaAdaptersApiInterfaceModel.OrderFulfilmentApi()
var body = ; // {{UpsertPackageInput}} The request body containing information about the order and package for which the adapter needs to return a ship-label.
var marketplaceName = marketplaceName_example; // {{String}} The name of the marketplace whose order is being processed.
var channelName = channelName_example; // {{String}} The name of the fulfilment channel within the marketplace whose order is being processed.
var id = id_example; // {{String}} The id of the shipment which is being fulfilled (shipmentId).
var packageId = packageId_example; // {{String}} The package id whose specifications are to be modified.

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

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

            var apiInstance = new OrderFulfilmentApi();
            var body = new UpsertPackageInput(); // UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
            var marketplaceName = marketplaceName_example;  // String | The name of the marketplace whose order is being processed.
            var channelName = channelName_example;  // String | The name of the fulfilment channel within the marketplace whose order is being processed.
            var id = id_example;  // String | The id of the shipment which is being fulfilled (shipmentId).
            var packageId = packageId_example;  // String | The package id whose specifications are to be modified.

            try
            {
                // Update packages
                apiInstance.updatePackages(body, marketplaceName, channelName, id, packageId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderFulfilmentApi.updatePackages: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderFulfilmentApi();
$body = ; // UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
$marketplaceName = marketplaceName_example; // String | The name of the marketplace whose order is being processed.
$channelName = channelName_example; // String | The name of the fulfilment channel within the marketplace whose order is being processed.
$id = id_example; // String | The id of the shipment which is being fulfilled (shipmentId).
$packageId = packageId_example; // String | The package id whose specifications are to be modified.

try {
    $api_instance->updatePackages($body, $marketplaceName, $channelName, $id, $packageId);
} catch (Exception $e) {
    echo 'Exception when calling OrderFulfilmentApi->updatePackages: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderFulfilmentApi;

my $api_instance = WWW::SwaggerClient::OrderFulfilmentApi->new();
my $body = WWW::SwaggerClient::Object::UpsertPackageInput->new(); # UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
my $marketplaceName = marketplaceName_example; # String | The name of the marketplace whose order is being processed.
my $channelName = channelName_example; # String | The name of the fulfilment channel within the marketplace whose order is being processed.
my $id = id_example; # String | The id of the shipment which is being fulfilled (shipmentId).
my $packageId = packageId_example; # String | The package id whose specifications are to be modified.

eval { 
    $api_instance->updatePackages(body => $body, marketplaceName => $marketplaceName, channelName => $channelName, id => $id, packageId => $packageId);
};
if ($@) {
    warn "Exception when calling OrderFulfilmentApi->updatePackages: $@\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.OrderFulfilmentApi()
body =  # UpsertPackageInput | The request body containing information about the order and package for which the adapter needs to return a ship-label.
marketplaceName = marketplaceName_example # String | The name of the marketplace whose order is being processed.
channelName = channelName_example # String | The name of the fulfilment channel within the marketplace whose order is being processed.
id = id_example # String | The id of the shipment which is being fulfilled (shipmentId).
packageId = packageId_example # String | The package id whose specifications are to be modified.

try: 
    # Update packages
    api_instance.update_packages(body, marketplaceName, channelName, id, packageId)
except ApiException as e:
    print("Exception when calling OrderFulfilmentApi->updatePackages: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The id of the shipment which is being fulfilled (shipmentId).
Required
packageId*
String
The package id whose specifications are to be modified.
Required
Body parameters
Name Description
body *
{

The request body payload that will be provided by the Amazon Yojaka product when invoking the Create/Update packages API on your adapter.

Required: locationId,merchantId,orderId,packageInfo
locationId:
string

The id of the location where the order is being fulfilled.

merchantId:
string

The id of the seller (merchant) whose order is being fulfilled.

orderId:
string

The id of the order whose shipment is being fulfilled.

packageInfo:
{

This type describes a package that is created to ship one or more of an order's line items.

Required: height,id,length,lineItems,weight,width
id:
length:
width:
height:
weight:
lineItems:
}
}
Query parameters
Name Description
marketplaceName*
String
The name of the marketplace whose order is being processed.
Required
channelName*
String
The name of the fulfilment channel within the marketplace whose order is being processed.
Required

Responses

Status: 200 - Success. The package is updated in the marketplace

Status: 400 - Bad request. One or more of the input parameters you have provided is invalid.

Status: 500 - Internal server error.


SKUOfferManagement

getSkuListingDetails

Retrieve SKU listing details

Invoked by the Amazon Yojaka product to retrieve the current state of the listing of a SKU on a particular marketplace/fulfilment channel.


/merchants/{merchantId}/skus/{sku}

Usage and SDK Samples

curl -X GET "//merchants/{merchantId}/skus/{sku}?marketplaceName=&channelName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SKUOfferManagementApi;

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

public class SKUOfferManagementApiExample {

    public static void main(String[] args) {
        
        SKUOfferManagementApi apiInstance = new SKUOfferManagementApi();
        String merchantId = merchantId_example; // String | The id of the seller (merchant) whose listing for a SKU is to be fetched.
        String sku = sku_example; // String | The SKU whose listing is to be fetched.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace for which the SKU listing details are to be fetched.
        String channelName = channelName_example; // String | The name of the fulfilment channel for which the SKU listing details are to be fetched.
        try {
            ListingDetails result = apiInstance.getSkuListingDetails(merchantId, sku, marketplaceName, channelName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SKUOfferManagementApi#getSkuListingDetails");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SKUOfferManagementApi;

public class SKUOfferManagementApiExample {

    public static void main(String[] args) {
        SKUOfferManagementApi apiInstance = new SKUOfferManagementApi();
        String merchantId = merchantId_example; // String | The id of the seller (merchant) whose listing for a SKU is to be fetched.
        String sku = sku_example; // String | The SKU whose listing is to be fetched.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace for which the SKU listing details are to be fetched.
        String channelName = channelName_example; // String | The name of the fulfilment channel for which the SKU listing details are to be fetched.
        try {
            ListingDetails result = apiInstance.getSkuListingDetails(merchantId, sku, marketplaceName, channelName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SKUOfferManagementApi#getSkuListingDetails");
            e.printStackTrace();
        }
    }
}
String *merchantId = merchantId_example; // The id of the seller (merchant) whose listing for a SKU is to be fetched.
String *sku = sku_example; // The SKU whose listing is to be fetched.
String *marketplaceName = marketplaceName_example; // The name of the marketplace for which the SKU listing details are to be fetched.
String *channelName = channelName_example; // The name of the fulfilment channel for which the SKU listing details are to be fetched.

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

// Retrieve SKU listing details
[apiInstance getSkuListingDetailsWith:merchantId
    sku:sku
    marketplaceName:marketplaceName
    channelName:channelName
              completionHandler: ^(ListingDetails output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiInterfaceModel = require('amazon_yojaka_adapters_api_interface_model');

var api = new AmazonYojakaAdaptersApiInterfaceModel.SKUOfferManagementApi()
var merchantId = merchantId_example; // {{String}} The id of the seller (merchant) whose listing for a SKU is to be fetched.
var sku = sku_example; // {{String}} The SKU whose listing is to be fetched.
var marketplaceName = marketplaceName_example; // {{String}} The name of the marketplace for which the SKU listing details are to be fetched.
var channelName = channelName_example; // {{String}} The name of the fulfilment channel for which the SKU listing details are to be fetched.

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

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

            var apiInstance = new SKUOfferManagementApi();
            var merchantId = merchantId_example;  // String | The id of the seller (merchant) whose listing for a SKU is to be fetched.
            var sku = sku_example;  // String | The SKU whose listing is to be fetched.
            var marketplaceName = marketplaceName_example;  // String | The name of the marketplace for which the SKU listing details are to be fetched.
            var channelName = channelName_example;  // String | The name of the fulfilment channel for which the SKU listing details are to be fetched.

            try
            {
                // Retrieve SKU listing details
                ListingDetails result = apiInstance.getSkuListingDetails(merchantId, sku, marketplaceName, channelName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SKUOfferManagementApi.getSkuListingDetails: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSKUOfferManagementApi();
$merchantId = merchantId_example; // String | The id of the seller (merchant) whose listing for a SKU is to be fetched.
$sku = sku_example; // String | The SKU whose listing is to be fetched.
$marketplaceName = marketplaceName_example; // String | The name of the marketplace for which the SKU listing details are to be fetched.
$channelName = channelName_example; // String | The name of the fulfilment channel for which the SKU listing details are to be fetched.

try {
    $result = $api_instance->getSkuListingDetails($merchantId, $sku, $marketplaceName, $channelName);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SKUOfferManagementApi->getSkuListingDetails: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SKUOfferManagementApi;

my $api_instance = WWW::SwaggerClient::SKUOfferManagementApi->new();
my $merchantId = merchantId_example; # String | The id of the seller (merchant) whose listing for a SKU is to be fetched.
my $sku = sku_example; # String | The SKU whose listing is to be fetched.
my $marketplaceName = marketplaceName_example; # String | The name of the marketplace for which the SKU listing details are to be fetched.
my $channelName = channelName_example; # String | The name of the fulfilment channel for which the SKU listing details are to be fetched.

eval { 
    my $result = $api_instance->getSkuListingDetails(merchantId => $merchantId, sku => $sku, marketplaceName => $marketplaceName, channelName => $channelName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SKUOfferManagementApi->getSkuListingDetails: $@\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.SKUOfferManagementApi()
merchantId = merchantId_example # String | The id of the seller (merchant) whose listing for a SKU is to be fetched.
sku = sku_example # String | The SKU whose listing is to be fetched.
marketplaceName = marketplaceName_example # String | The name of the marketplace for which the SKU listing details are to be fetched.
channelName = channelName_example # String | The name of the fulfilment channel for which the SKU listing details are to be fetched.

try: 
    # Retrieve SKU listing details
    api_response = api_instance.get_sku_listing_details(merchantId, sku, marketplaceName, channelName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SKUOfferManagementApi->getSkuListingDetails: %s\n" % e)

Parameters

Path parameters
Name Description
merchantId*
String
The id of the seller (merchant) whose listing for a SKU is to be fetched.
Required
sku*
String
The SKU whose listing is to be fetched.
Required
Query parameters
Name Description
marketplaceName*
String
The name of the marketplace for which the SKU listing details are to be fetched.
Required
channelName*
String
The name of the fulfilment channel for which the SKU listing details are to be fetched.
Required

Responses

Status: 200 - Success. The listing details are in the response

{

Contains information if a particular SKU of a merchant is listed on a particular marketplace/fulfilment channel.

Required: active
active:
boolean

Flag indicating if the specific SKU is active on a marketplace/fulfilment channel

}

Status: 400 - Bad request. One or more of the input parameters you have provided is invalid.

Status: 500 - Internal server error.


updatePricingInfo

Update pricing information

Update pricing information for a particular seller (merchant) and SKU for the specified marketplace/fulfilment channel.


/merchants/{merchantId}/skus/{sku}/prices

Usage and SDK Samples

curl -X PUT "//merchants/{merchantId}/skus/{sku}/prices?marketplaceName=&channelName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SKUOfferManagementApi;

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

public class SKUOfferManagementApiExample {

    public static void main(String[] args) {
        
        SKUOfferManagementApi apiInstance = new SKUOfferManagementApi();
        PricingInfo body = ; // PricingInfo | The request body containing information about the pricing information to be updated.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace for which the pricing information of the specified SKU needs to be updated.
        String channelName = channelName_example; // String | The name of the fulfilment channel for which the pricing information of the specified SKU needs to be updated.
        String merchantId = merchantId_example; // String | The id of the seller (merchant) whose pricing information for a SKU is to be updated.
        String sku = sku_example; // String | The SKU whose pricing information is to be updated.
        try {
            apiInstance.updatePricingInfo(body, marketplaceName, channelName, merchantId, sku);
        } catch (ApiException e) {
            System.err.println("Exception when calling SKUOfferManagementApi#updatePricingInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SKUOfferManagementApi;

public class SKUOfferManagementApiExample {

    public static void main(String[] args) {
        SKUOfferManagementApi apiInstance = new SKUOfferManagementApi();
        PricingInfo body = ; // PricingInfo | The request body containing information about the pricing information to be updated.
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace for which the pricing information of the specified SKU needs to be updated.
        String channelName = channelName_example; // String | The name of the fulfilment channel for which the pricing information of the specified SKU needs to be updated.
        String merchantId = merchantId_example; // String | The id of the seller (merchant) whose pricing information for a SKU is to be updated.
        String sku = sku_example; // String | The SKU whose pricing information is to be updated.
        try {
            apiInstance.updatePricingInfo(body, marketplaceName, channelName, merchantId, sku);
        } catch (ApiException e) {
            System.err.println("Exception when calling SKUOfferManagementApi#updatePricingInfo");
            e.printStackTrace();
        }
    }
}
PricingInfo *body = ; // The request body containing information about the pricing information to be updated.
String *marketplaceName = marketplaceName_example; // The name of the marketplace for which the pricing information of the specified SKU needs to be updated.
String *channelName = channelName_example; // The name of the fulfilment channel for which the pricing information of the specified SKU needs to be updated.
String *merchantId = merchantId_example; // The id of the seller (merchant) whose pricing information for a SKU is to be updated.
String *sku = sku_example; // The SKU whose pricing information is to be updated.

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

// Update pricing information
[apiInstance updatePricingInfoWith:body
    marketplaceName:marketplaceName
    channelName:channelName
    merchantId:merchantId
    sku:sku
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiInterfaceModel = require('amazon_yojaka_adapters_api_interface_model');

var api = new AmazonYojakaAdaptersApiInterfaceModel.SKUOfferManagementApi()
var body = ; // {{PricingInfo}} The request body containing information about the pricing information to be updated.
var marketplaceName = marketplaceName_example; // {{String}} The name of the marketplace for which the pricing information of the specified SKU needs to be updated.
var channelName = channelName_example; // {{String}} The name of the fulfilment channel for which the pricing information of the specified SKU needs to be updated.
var merchantId = merchantId_example; // {{String}} The id of the seller (merchant) whose pricing information for a SKU is to be updated.
var sku = sku_example; // {{String}} The SKU whose pricing information is to be updated.

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

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

            var apiInstance = new SKUOfferManagementApi();
            var body = new PricingInfo(); // PricingInfo | The request body containing information about the pricing information to be updated.
            var marketplaceName = marketplaceName_example;  // String | The name of the marketplace for which the pricing information of the specified SKU needs to be updated.
            var channelName = channelName_example;  // String | The name of the fulfilment channel for which the pricing information of the specified SKU needs to be updated.
            var merchantId = merchantId_example;  // String | The id of the seller (merchant) whose pricing information for a SKU is to be updated.
            var sku = sku_example;  // String | The SKU whose pricing information is to be updated.

            try
            {
                // Update pricing information
                apiInstance.updatePricingInfo(body, marketplaceName, channelName, merchantId, sku);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SKUOfferManagementApi.updatePricingInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSKUOfferManagementApi();
$body = ; // PricingInfo | The request body containing information about the pricing information to be updated.
$marketplaceName = marketplaceName_example; // String | The name of the marketplace for which the pricing information of the specified SKU needs to be updated.
$channelName = channelName_example; // String | The name of the fulfilment channel for which the pricing information of the specified SKU needs to be updated.
$merchantId = merchantId_example; // String | The id of the seller (merchant) whose pricing information for a SKU is to be updated.
$sku = sku_example; // String | The SKU whose pricing information is to be updated.

try {
    $api_instance->updatePricingInfo($body, $marketplaceName, $channelName, $merchantId, $sku);
} catch (Exception $e) {
    echo 'Exception when calling SKUOfferManagementApi->updatePricingInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SKUOfferManagementApi;

my $api_instance = WWW::SwaggerClient::SKUOfferManagementApi->new();
my $body = WWW::SwaggerClient::Object::PricingInfo->new(); # PricingInfo | The request body containing information about the pricing information to be updated.
my $marketplaceName = marketplaceName_example; # String | The name of the marketplace for which the pricing information of the specified SKU needs to be updated.
my $channelName = channelName_example; # String | The name of the fulfilment channel for which the pricing information of the specified SKU needs to be updated.
my $merchantId = merchantId_example; # String | The id of the seller (merchant) whose pricing information for a SKU is to be updated.
my $sku = sku_example; # String | The SKU whose pricing information is to be updated.

eval { 
    $api_instance->updatePricingInfo(body => $body, marketplaceName => $marketplaceName, channelName => $channelName, merchantId => $merchantId, sku => $sku);
};
if ($@) {
    warn "Exception when calling SKUOfferManagementApi->updatePricingInfo: $@\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.SKUOfferManagementApi()
body =  # PricingInfo | The request body containing information about the pricing information to be updated.
marketplaceName = marketplaceName_example # String | The name of the marketplace for which the pricing information of the specified SKU needs to be updated.
channelName = channelName_example # String | The name of the fulfilment channel for which the pricing information of the specified SKU needs to be updated.
merchantId = merchantId_example # String | The id of the seller (merchant) whose pricing information for a SKU is to be updated.
sku = sku_example # String | The SKU whose pricing information is to be updated.

try: 
    # Update pricing information
    api_instance.update_pricing_info(body, marketplaceName, channelName, merchantId, sku)
except ApiException as e:
    print("Exception when calling SKUOfferManagementApi->updatePricingInfo: %s\n" % e)

Parameters

Path parameters
Name Description
merchantId*
String
The id of the seller (merchant) whose pricing information for a SKU is to be updated.
Required
sku*
String
The SKU whose pricing information is to be updated.
Required
Body parameters
Name Description
body *
{

Represents the promise details of the shipping service

sellingPrice:
{

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

Required: currency,value
value:
currency:
}
maxRetailPrice:
{

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

Required: currency,value
value:
currency:
}
maxSellerAllowedPrice:
{

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

Required: currency,value
value:
currency:
}
minSellerAllowedPrice:
{

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

Required: currency,value
value:
currency:
}
}
Query parameters
Name Description
marketplaceName*
String
The name of the marketplace for which the pricing information of the specified SKU needs to be updated.
Required
channelName*
String
The name of the fulfilment channel for which the pricing information of the specified SKU needs to be updated.
Required

Responses

Status: 200 - Success. The pricing information has been updated.

Status: 400 - Bad request. One or more of the input parameters you have provided is invalid.

Status: 500 - Internal server error.