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
Name | Description |
---|---|
id* |
String
The id of the shipment which is being fulfilled (shipmentId).
Required
|
Name | Description |
---|---|
body * |
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
|