Amazon Yojaka API Orders Model

OrderListingRetrieval

getOrder

Returns a single order

Use this API to retrieve complete details about a single order, given the order's id.


/orders/{id}

Usage and SDK Samples

curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderListingRetrievalApi;

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

public class OrderListingRetrievalApiExample {

    public static void main(String[] args) {
        
        OrderListingRetrievalApi apiInstance = new OrderListingRetrievalApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            Order result = apiInstance.getOrder(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderListingRetrievalApi#getOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderListingRetrievalApi;

public class OrderListingRetrievalApiExample {

    public static void main(String[] args) {
        OrderListingRetrievalApi apiInstance = new OrderListingRetrievalApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            Order result = apiInstance.getOrder(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderListingRetrievalApi#getOrder");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka assigned id.

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

// Returns a single order
[apiInstance getOrderWith:xAmzAccessToken
    id:id
              completionHandler: ^(Order output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderListingRetrievalApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.

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

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

            var apiInstance = new OrderListingRetrievalApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.

            try
            {
                // Returns a single order
                Order result = apiInstance.getOrder(xAmzAccessToken, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderListingRetrievalApi.getOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderListingRetrievalApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka assigned id.

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

my $api_instance = WWW::SwaggerClient::OrderListingRetrievalApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka assigned id.

eval { 
    my $result = $api_instance->getOrder(xAmzAccessToken => $xAmzAccessToken, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderListingRetrievalApi->getOrder: $@\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.OrderListingRetrievalApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka assigned id.

try: 
    # Returns a single order
    api_response = api_instance.get_order(xAmzAccessToken, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderListingRetrievalApi->getOrder: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required

Responses

Status: 200 - Success. The response contains details of a single order.

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

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

Status: 404 - Not found. The specified order id is not found.

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

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


listOrders

Returns a list of active/open orders

Invoke this API to get a list of orders that are pending action by a client. Clients can filter the returned list of orders based on the state of the order. This API returns data in pages.


/orders

Usage and SDK Samples

curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders?locationId=&status=&fromTimestamp=&toTimestamp=&cursor=&maxResults="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderListingRetrievalApi;

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

public class OrderListingRetrievalApiExample {

    public static void main(String[] args) {
        
        OrderListingRetrievalApi apiInstance = new OrderListingRetrievalApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String status = status_example; // String | Use this parameter to filter orders in a particular state. The most common use-case would be to fetch all new

orders from Amazon Yojaka using the ACCEPTED status. Valid values are ACCEPTED, CONFIRMED, PACKAGE_CREATED,

PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, and CANCELLED.

        String locationId = locationId_example; // String | The location id for which orders need to be listed.
        String fromTimestamp = fromTimestamp_example; // String | Use this parameter to filter orders whose latest update in Amazon Yojaka is after a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
        String toTimestamp = toTimestamp_example; // String | Use this parameter to filter orders whose latest update in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
        String cursor = cursor_example; // String | The cursor value returned from a previous call to list orders. Use this to retrieve the next page of orders.
        Integer maxResults = 56; // Integer | Specify the maximum number of orders that are to be returned in the response. If omitted, this parameter defaults to 10.
        try {
            ListOrdersOutput result = apiInstance.listOrders(xAmzAccessToken, status, locationId, fromTimestamp, toTimestamp, cursor, maxResults);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderListingRetrievalApi#listOrders");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderListingRetrievalApi;

public class OrderListingRetrievalApiExample {

    public static void main(String[] args) {
        OrderListingRetrievalApi apiInstance = new OrderListingRetrievalApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String status = status_example; // String | Use this parameter to filter orders in a particular state. The most common use-case would be to fetch all new

orders from Amazon Yojaka using the ACCEPTED status. Valid values are ACCEPTED, CONFIRMED, PACKAGE_CREATED,

PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, and CANCELLED.

        String locationId = locationId_example; // String | The location id for which orders need to be listed.
        String fromTimestamp = fromTimestamp_example; // String | Use this parameter to filter orders whose latest update in Amazon Yojaka is after a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
        String toTimestamp = toTimestamp_example; // String | Use this parameter to filter orders whose latest update in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
        String cursor = cursor_example; // String | The cursor value returned from a previous call to list orders. Use this to retrieve the next page of orders.
        Integer maxResults = 56; // Integer | Specify the maximum number of orders that are to be returned in the response. If omitted, this parameter defaults to 10.
        try {
            ListOrdersOutput result = apiInstance.listOrders(xAmzAccessToken, status, locationId, fromTimestamp, toTimestamp, cursor, maxResults);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderListingRetrievalApi#listOrders");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *status = status_example; // Use this parameter to filter orders in a particular state. The most common use-case would be to fetch all new

orders from Amazon Yojaka using the ACCEPTED status. Valid values are ACCEPTED, CONFIRMED, PACKAGE_CREATED,

PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, and CANCELLED.

String *locationId = locationId_example; // The location id for which orders need to be listed. (optional)
String *fromTimestamp = fromTimestamp_example; // Use this parameter to filter orders whose latest update in Amazon Yojaka is after a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone. (optional)
String *toTimestamp = toTimestamp_example; // Use this parameter to filter orders whose latest update in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone. (optional)
String *cursor = cursor_example; // The cursor value returned from a previous call to list orders. Use this to retrieve the next page of orders. (optional)
Integer *maxResults = 56; // Specify the maximum number of orders that are to be returned in the response. If omitted, this parameter defaults to 10. (optional)

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

// Returns a list of active/open orders
[apiInstance listOrdersWith:xAmzAccessToken
    status:status
    locationId:locationId
    fromTimestamp:fromTimestamp
    toTimestamp:toTimestamp
    cursor:cursor
    maxResults:maxResults
              completionHandler: ^(ListOrdersOutput output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderListingRetrievalApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var status = status_example; // {{String}} Use this parameter to filter orders in a particular state. The most common use-case would be to fetch all new

orders from Amazon Yojaka using the ACCEPTED status. Valid values are ACCEPTED, CONFIRMED, PACKAGE_CREATED,

PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, and CANCELLED.

var opts = { 
  'locationId': locationId_example, // {{String}} The location id for which orders need to be listed.
  'fromTimestamp': fromTimestamp_example, // {{String}} Use this parameter to filter orders whose latest update in Amazon Yojaka is after a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
  'toTimestamp': toTimestamp_example, // {{String}} Use this parameter to filter orders whose latest update in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
  'cursor': cursor_example, // {{String}} The cursor value returned from a previous call to list orders. Use this to retrieve the next page of orders.
  'maxResults': 56 // {{Integer}} Specify the maximum number of orders that are to be returned in the response. If omitted, this parameter defaults to 10.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listOrders(xAmzAccessToken, status, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new OrderListingRetrievalApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var status = status_example;  // String | Use this parameter to filter orders in a particular state. The most common use-case would be to fetch all new

orders from Amazon Yojaka using the ACCEPTED status. Valid values are ACCEPTED, CONFIRMED, PACKAGE_CREATED,

PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, and CANCELLED.

            var locationId = locationId_example;  // String | The location id for which orders need to be listed. (optional) 
            var fromTimestamp = fromTimestamp_example;  // String | Use this parameter to filter orders whose latest update in Amazon Yojaka is after a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone. (optional) 
            var toTimestamp = toTimestamp_example;  // String | Use this parameter to filter orders whose latest update in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone. (optional) 
            var cursor = cursor_example;  // String | The cursor value returned from a previous call to list orders. Use this to retrieve the next page of orders. (optional) 
            var maxResults = 56;  // Integer | Specify the maximum number of orders that are to be returned in the response. If omitted, this parameter defaults to 10. (optional) 

            try
            {
                // Returns a list of active/open orders
                ListOrdersOutput result = apiInstance.listOrders(xAmzAccessToken, status, locationId, fromTimestamp, toTimestamp, cursor, maxResults);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderListingRetrievalApi.listOrders: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderListingRetrievalApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$status = status_example; // String | Use this parameter to filter orders in a particular state. The most common use-case would be to fetch all new

orders from Amazon Yojaka using the ACCEPTED status. Valid values are ACCEPTED, CONFIRMED, PACKAGE_CREATED,

PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, and CANCELLED.

$locationId = locationId_example; // String | The location id for which orders need to be listed.
$fromTimestamp = fromTimestamp_example; // String | Use this parameter to filter orders whose latest update in Amazon Yojaka is after a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
$toTimestamp = toTimestamp_example; // String | Use this parameter to filter orders whose latest update in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
$cursor = cursor_example; // String | The cursor value returned from a previous call to list orders. Use this to retrieve the next page of orders.
$maxResults = 56; // Integer | Specify the maximum number of orders that are to be returned in the response. If omitted, this parameter defaults to 10.

try {
    $result = $api_instance->listOrders($xAmzAccessToken, $status, $locationId, $fromTimestamp, $toTimestamp, $cursor, $maxResults);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderListingRetrievalApi->listOrders: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderListingRetrievalApi;

my $api_instance = WWW::SwaggerClient::OrderListingRetrievalApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $status = status_example; # String | Use this parameter to filter orders in a particular state. The most common use-case would be to fetch all new

orders from Amazon Yojaka using the ACCEPTED status. Valid values are ACCEPTED, CONFIRMED, PACKAGE_CREATED,

PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, and CANCELLED.

my $locationId = locationId_example; # String | The location id for which orders need to be listed.
my $fromTimestamp = fromTimestamp_example; # String | Use this parameter to filter orders whose latest update in Amazon Yojaka is after a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
my $toTimestamp = toTimestamp_example; # String | Use this parameter to filter orders whose latest update in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
my $cursor = cursor_example; # String | The cursor value returned from a previous call to list orders. Use this to retrieve the next page of orders.
my $maxResults = 56; # Integer | Specify the maximum number of orders that are to be returned in the response. If omitted, this parameter defaults to 10.

eval { 
    my $result = $api_instance->listOrders(xAmzAccessToken => $xAmzAccessToken, status => $status, locationId => $locationId, fromTimestamp => $fromTimestamp, toTimestamp => $toTimestamp, cursor => $cursor, maxResults => $maxResults);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderListingRetrievalApi->listOrders: $@\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.OrderListingRetrievalApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
status = status_example # String | Use this parameter to filter orders in a particular state. The most common use-case would be to fetch all new

orders from Amazon Yojaka using the ACCEPTED status. Valid values are ACCEPTED, CONFIRMED, PACKAGE_CREATED,

PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, and CANCELLED.

locationId = locationId_example # String | The location id for which orders need to be listed. (optional)
fromTimestamp = fromTimestamp_example # String | Use this parameter to filter orders whose latest update in Amazon Yojaka is after a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone. (optional)
toTimestamp = toTimestamp_example # String | Use this parameter to filter orders whose latest update in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone. (optional)
cursor = cursor_example # String | The cursor value returned from a previous call to list orders. Use this to retrieve the next page of orders. (optional)
maxResults = 56 # Integer | Specify the maximum number of orders that are to be returned in the response. If omitted, this parameter defaults to 10. (optional)

try: 
    # Returns a list of active/open orders
    api_response = api_instance.list_orders(xAmzAccessToken, status, locationId=locationId, fromTimestamp=fromTimestamp, toTimestamp=toTimestamp, cursor=cursor, maxResults=maxResults)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderListingRetrievalApi->listOrders: %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
locationId
String
The location id for which orders need to be listed.
status*
String
Use this parameter to filter orders in a particular state. The most common use-case would be to fetch all new orders from Amazon Yojaka using the ACCEPTED status. Valid values are ACCEPTED, CONFIRMED, PACKAGE_CREATED, PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, and CANCELLED.
Required
fromTimestamp
String
Use this parameter to filter orders whose latest update in Amazon Yojaka is after a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
toTimestamp
String
Use this parameter to filter orders whose latest update in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
cursor
String
The cursor value returned from a previous call to list orders. Use this to retrieve the next page of orders.
maxResults
Integer
Specify the maximum number of orders that are to be returned in the response. If omitted, this parameter defaults to 10.

Responses

Status: 200 - Success. The response contains a list of orders.

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

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

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

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


OrderWorkflowProcessing

confirmOrder

Confirm an order

An API for a client to indicate to Amazon Yojaka that the client has confirmed the order for fulfilment processing.


/orders/{id}/confirm-order

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/confirm-order"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            apiInstance.confirmOrder(xAmzAccessToken, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#confirmOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            apiInstance.confirmOrder(xAmzAccessToken, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#confirmOrder");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka assigned id.

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

// Confirm an order
[apiInstance confirmOrderWith:xAmzAccessToken
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.

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

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.

            try
            {
                // Confirm an order
                apiInstance.confirmOrder(xAmzAccessToken, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.confirmOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka assigned id.

try {
    $api_instance->confirmOrder($xAmzAccessToken, $id);
} catch (Exception $e) {
    echo 'Exception when calling OrderWorkflowProcessingApi->confirmOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderWorkflowProcessingApi;

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka assigned id.

eval { 
    $api_instance->confirmOrder(xAmzAccessToken => $xAmzAccessToken, id => $id);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->confirmOrder: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka assigned id.

try: 
    # Confirm an order
    api_instance.confirm_order(xAmzAccessToken, id)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->confirmOrder: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required

Responses

Status: 204 - Success

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


createPackages

Create Packages

An API for a client to provide the details of the packages that will be used to ship an order. **NOTE:** For serial number enabled orders being processed on the Amazon EasyShip channel, provide correct serial numbers in this call as serial number updates are not allowed by marketplace channel.


/orders/{id}/create-packages

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/create-packages"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        CreatePackagesInput body = ; // CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id
        try {
            apiInstance.createPackages(body, xAmzAccessToken, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#createPackages");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        CreatePackagesInput body = ; // CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id
        try {
            apiInstance.createPackages(body, xAmzAccessToken, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#createPackages");
            e.printStackTrace();
        }
    }
}
CreatePackagesInput *body = ; // The request body indicating details of the packages, including their dimensions and weight
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka assigned id

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

// Create Packages
[apiInstance createPackagesWith:body
    xAmzAccessToken:xAmzAccessToken
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var body = ; // {{CreatePackagesInput}} The request body indicating details of the packages, including their dimensions and weight
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createPackages(bodyxAmzAccessTokenid, 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 OrderWorkflowProcessingApi();
            var body = new CreatePackagesInput(); // CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka assigned id

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

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$body = ; // CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka assigned id

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $body = WWW::SwaggerClient::Object::CreatePackagesInput->new(); # CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka assigned id

eval { 
    $api_instance->createPackages(body => $body, xAmzAccessToken => $xAmzAccessToken, id => $id);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->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.OrderWorkflowProcessingApi()
body =  # CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka assigned id

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

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Body parameters
Name Description
body *

Responses

Status: 204 - Success

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


generateInvoice

Generate invoice

Clients invoke this API indicating that the invoice is to be generated and retrieved for a given order. **NOTE** : This API is deprecated, kindly use the generic `/orders/{id}/generate-packing-documents` API instead.


/orders/{id}/generate-invoice

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/generate-invoice"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            Invoice result = apiInstance.generateInvoice(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#generateInvoice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            Invoice result = apiInstance.generateInvoice(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#generateInvoice");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka assigned id.

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

// Generate invoice
[apiInstance generateInvoiceWith:xAmzAccessToken
    id:id
              completionHandler: ^(Invoice output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.

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

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.

            try
            {
                // Generate invoice
                Invoice result = apiInstance.generateInvoice(xAmzAccessToken, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.generateInvoice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka assigned id.

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka assigned id.

eval { 
    my $result = $api_instance->generateInvoice(xAmzAccessToken => $xAmzAccessToken, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->generateInvoice: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka assigned id.

try: 
    # Generate invoice
    api_response = api_instance.generate_invoice(xAmzAccessToken, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->generateInvoice: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required

Responses

Status: 200 - Success. The response will contain the invoice as a PDF.

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


generatePackingDocuments

Generate Packing Documents

Clients invoke this API indicating that packing documents such as invoice (may include Packing Slip or D&C Addendum, if applicable) and prescription (if applicable) are to be generated and retrieved for a given order. **NOTE**: This API shall respond with an exception in case there is any issue in fetching any of the documents.


/orders/{id}/generate-packing-documents

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/generate-packing-documents"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            PackingDocuments result = apiInstance.generatePackingDocuments(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#generatePackingDocuments");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            PackingDocuments result = apiInstance.generatePackingDocuments(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#generatePackingDocuments");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka assigned id.

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

// Generate Packing Documents
[apiInstance generatePackingDocumentsWith:xAmzAccessToken
    id:id
              completionHandler: ^(PackingDocuments output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.

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

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.

            try
            {
                // Generate Packing Documents
                PackingDocuments result = apiInstance.generatePackingDocuments(xAmzAccessToken, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.generatePackingDocuments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka assigned id.

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka assigned id.

eval { 
    my $result = $api_instance->generatePackingDocuments(xAmzAccessToken => $xAmzAccessToken, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->generatePackingDocuments: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka assigned id.

try: 
    # Generate Packing Documents
    api_response = api_instance.generate_packing_documents(xAmzAccessToken, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->generatePackingDocuments: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required

Responses

Status: 200 - Success. The response will contain the documents in a map.

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


generateShipLabel

Generate ship-label

**NOTE** : This API is deprecated. Use `orders/{id}/ship-labels` API instead


/orders/{id}/generate-ship-label

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/generate-ship-label?packageId=&pickupTimeSlotId=&shippingOptionId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String packageId = packageId_example; // String | The id of the package for which a ship-label is to be generated
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        GenerateShipLabelInput body = ; // GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier

supported attributes

        String pickupTimeSlotId = pickupTimeSlotId_example; // String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.

        String shippingOptionId = shippingOptionId_example; // String | The id of the shipping-option that the seller chooses to ship the package.
        try {
            ShipLabel result = apiInstance.generateShipLabel(xAmzAccessToken, packageId, id, body, pickupTimeSlotId, shippingOptionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#generateShipLabel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String packageId = packageId_example; // String | The id of the package for which a ship-label is to be generated
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        GenerateShipLabelInput body = ; // GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier

supported attributes

        String pickupTimeSlotId = pickupTimeSlotId_example; // String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.

        String shippingOptionId = shippingOptionId_example; // String | The id of the shipping-option that the seller chooses to ship the package.
        try {
            ShipLabel result = apiInstance.generateShipLabel(xAmzAccessToken, packageId, id, body, pickupTimeSlotId, shippingOptionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#generateShipLabel");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *packageId = packageId_example; // The id of the package for which a ship-label is to be generated
String *id = id_example; // The order's Amazon Yojaka assigned id.
GenerateShipLabelInput *body = ; // The request body indicating any extra package details required to generate the ship label like Courier

supported attributes
 (optional)
String *pickupTimeSlotId = pickupTimeSlotId_example; // This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.
 (optional)
String *shippingOptionId = shippingOptionId_example; // The id of the shipping-option that the seller chooses to ship the package. (optional)

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

// Generate ship-label
[apiInstance generateShipLabelWith:xAmzAccessToken
    packageId:packageId
    id:id
    body:body
    pickupTimeSlotId:pickupTimeSlotId
    shippingOptionId:shippingOptionId
              completionHandler: ^(ShipLabel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var packageId = packageId_example; // {{String}} The id of the package for which a ship-label is to be generated
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.
var opts = { 
  'body':  // {{GenerateShipLabelInput}} The request body indicating any extra package details required to generate the ship label like Courier

supported attributes

  'pickupTimeSlotId': pickupTimeSlotId_example // {{String}} This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.

  'shippingOptionId': shippingOptionId_example // {{String}} The id of the shipping-option that the seller chooses to ship the package.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.generateShipLabel(xAmzAccessTokenpackageIdid, opts, 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 OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var packageId = packageId_example;  // String | The id of the package for which a ship-label is to be generated
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.
            var body = new GenerateShipLabelInput(); // GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier

supported attributes
 (optional) 
            var pickupTimeSlotId = pickupTimeSlotId_example;  // String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.
 (optional) 
            var shippingOptionId = shippingOptionId_example;  // String | The id of the shipping-option that the seller chooses to ship the package. (optional) 

            try
            {
                // Generate ship-label
                ShipLabel result = apiInstance.generateShipLabel(xAmzAccessToken, packageId, id, body, pickupTimeSlotId, shippingOptionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.generateShipLabel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$packageId = packageId_example; // String | The id of the package for which a ship-label is to be generated
$id = id_example; // String | The order's Amazon Yojaka assigned id.
$body = ; // GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier

supported attributes

$pickupTimeSlotId = pickupTimeSlotId_example; // String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.

$shippingOptionId = shippingOptionId_example; // String | The id of the shipping-option that the seller chooses to ship the package.

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $packageId = packageId_example; # String | The id of the package for which a ship-label is to be generated
my $id = id_example; # String | The order's Amazon Yojaka assigned id.
my $body = WWW::SwaggerClient::Object::GenerateShipLabelInput->new(); # GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier

supported attributes

my $pickupTimeSlotId = pickupTimeSlotId_example; # String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.

my $shippingOptionId = shippingOptionId_example; # String | The id of the shipping-option that the seller chooses to ship the package.

eval { 
    my $result = $api_instance->generateShipLabel(xAmzAccessToken => $xAmzAccessToken, packageId => $packageId, id => $id, body => $body, pickupTimeSlotId => $pickupTimeSlotId, shippingOptionId => $shippingOptionId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
packageId = packageId_example # String | The id of the package for which a ship-label is to be generated
id = id_example # String | The order's Amazon Yojaka assigned id.
body =  # GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier

supported attributes
 (optional)
pickupTimeSlotId = pickupTimeSlotId_example # String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.
 (optional)
shippingOptionId = shippingOptionId_example # String | The id of the shipping-option that the seller chooses to ship the package. (optional)

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

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Body parameters
Name Description
body
Query parameters
Name Description
packageId*
String
The id of the package for which a ship-label is to be generated
Required
pickupTimeSlotId
String
This field is deprecated. Use shippingOptionId instead. Use retrieve-shipping-options API instead of retrieve-pickup-slots.
shippingOptionId
String
The id of the shipping-option that the seller chooses to ship the package.

Responses

Status: 200 - Success. The response will contain the ship-label.

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


regenerateShipLabel

Regenerate ship-label.

Use this API to request for the regeneration of a ship-label from a transportation carrier. Typically, you would use this API if you want to modify a previously generated ship-label such as using a different pickup time-slot. **NOTE:** For orders being processed on the Amazon EasyShip channel, you must invoke the retrievePickupSlots API before invoking this API. **NOTE:** This API is deprecated. Use `orders/{id}/ship-labels` API instead


/orders/{id}/regenerate-ship-label

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/regenerate-ship-label?packageId=&pickupTimeSlotId=&shippingOptionId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String packageId = packageId_example; // String | The id of the package for which a ship-label is to be regenerated
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        GenerateShipLabelInput body = ; // GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier supported attributes
        String pickupTimeSlotId = pickupTimeSlotId_example; // String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.

        String shippingOptionId = shippingOptionId_example; // String | The id of the shipping-option that the seller chooses to ship the package.
        try {
            ShipLabel result = apiInstance.regenerateShipLabel(xAmzAccessToken, packageId, id, body, pickupTimeSlotId, shippingOptionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#regenerateShipLabel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String packageId = packageId_example; // String | The id of the package for which a ship-label is to be regenerated
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        GenerateShipLabelInput body = ; // GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier supported attributes
        String pickupTimeSlotId = pickupTimeSlotId_example; // String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.

        String shippingOptionId = shippingOptionId_example; // String | The id of the shipping-option that the seller chooses to ship the package.
        try {
            ShipLabel result = apiInstance.regenerateShipLabel(xAmzAccessToken, packageId, id, body, pickupTimeSlotId, shippingOptionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#regenerateShipLabel");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *packageId = packageId_example; // The id of the package for which a ship-label is to be regenerated
String *id = id_example; // The order's Amazon Yojaka assigned id.
GenerateShipLabelInput *body = ; // The request body indicating any extra package details required to generate the ship label like Courier supported attributes (optional)
String *pickupTimeSlotId = pickupTimeSlotId_example; // This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.
 (optional)
String *shippingOptionId = shippingOptionId_example; // The id of the shipping-option that the seller chooses to ship the package. (optional)

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

// Regenerate ship-label.
[apiInstance regenerateShipLabelWith:xAmzAccessToken
    packageId:packageId
    id:id
    body:body
    pickupTimeSlotId:pickupTimeSlotId
    shippingOptionId:shippingOptionId
              completionHandler: ^(ShipLabel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var packageId = packageId_example; // {{String}} The id of the package for which a ship-label is to be regenerated
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.
var opts = { 
  'body':  // {{GenerateShipLabelInput}} The request body indicating any extra package details required to generate the ship label like Courier supported attributes
  'pickupTimeSlotId': pickupTimeSlotId_example // {{String}} This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.

  'shippingOptionId': shippingOptionId_example // {{String}} The id of the shipping-option that the seller chooses to ship the package.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.regenerateShipLabel(xAmzAccessTokenpackageIdid, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var packageId = packageId_example;  // String | The id of the package for which a ship-label is to be regenerated
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.
            var body = new GenerateShipLabelInput(); // GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier supported attributes (optional) 
            var pickupTimeSlotId = pickupTimeSlotId_example;  // String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.
 (optional) 
            var shippingOptionId = shippingOptionId_example;  // String | The id of the shipping-option that the seller chooses to ship the package. (optional) 

            try
            {
                // Regenerate ship-label.
                ShipLabel result = apiInstance.regenerateShipLabel(xAmzAccessToken, packageId, id, body, pickupTimeSlotId, shippingOptionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.regenerateShipLabel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$packageId = packageId_example; // String | The id of the package for which a ship-label is to be regenerated
$id = id_example; // String | The order's Amazon Yojaka assigned id.
$body = ; // GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier supported attributes
$pickupTimeSlotId = pickupTimeSlotId_example; // String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.

$shippingOptionId = shippingOptionId_example; // String | The id of the shipping-option that the seller chooses to ship the package.

try {
    $result = $api_instance->regenerateShipLabel($xAmzAccessToken, $packageId, $id, $body, $pickupTimeSlotId, $shippingOptionId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderWorkflowProcessingApi->regenerateShipLabel: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderWorkflowProcessingApi;

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $packageId = packageId_example; # String | The id of the package for which a ship-label is to be regenerated
my $id = id_example; # String | The order's Amazon Yojaka assigned id.
my $body = WWW::SwaggerClient::Object::GenerateShipLabelInput->new(); # GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier supported attributes
my $pickupTimeSlotId = pickupTimeSlotId_example; # String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.

my $shippingOptionId = shippingOptionId_example; # String | The id of the shipping-option that the seller chooses to ship the package.

eval { 
    my $result = $api_instance->regenerateShipLabel(xAmzAccessToken => $xAmzAccessToken, packageId => $packageId, id => $id, body => $body, pickupTimeSlotId => $pickupTimeSlotId, shippingOptionId => $shippingOptionId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->regenerateShipLabel: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
packageId = packageId_example # String | The id of the package for which a ship-label is to be regenerated
id = id_example # String | The order's Amazon Yojaka assigned id.
body =  # GenerateShipLabelInput | The request body indicating any extra package details required to generate the ship label like Courier supported attributes (optional)
pickupTimeSlotId = pickupTimeSlotId_example # String | This field is deprecated. Use shippingOptionId instead.

Use retrieve-shipping-options API instead of retrieve-pickup-slots.
 (optional)
shippingOptionId = shippingOptionId_example # String | The id of the shipping-option that the seller chooses to ship the package. (optional)

try: 
    # Regenerate ship-label.
    api_response = api_instance.regenerate_ship_label(xAmzAccessToken, packageId, id, body=body, pickupTimeSlotId=pickupTimeSlotId, shippingOptionId=shippingOptionId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->regenerateShipLabel: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Body parameters
Name Description
body
Query parameters
Name Description
packageId*
String
The id of the package for which a ship-label is to be regenerated
Required
pickupTimeSlotId
String
This field is deprecated. Use shippingOptionId instead. Use retrieve-shipping-options API instead of retrieve-pickup-slots.
shippingOptionId
String
The id of the shipping-option that the seller chooses to ship the package.

Responses

Status: 200 - Success. The response will contain the ship-label.

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


rejectOrder

Reject/cancel an order

An API for a client to indicate to Amazon Yojaka that the seller is rejecting the order and will not be processing it further. The caller has to provide one or more line items from the order being rejected and indicate the reason for the rejection at a line item level. Note that a call to this API will reject the complete order even if the caller provides a rejection reason for a subset of the line items. Line items from the order which are not specified in the input to this API are unbound, their units are added back to the virtual inventory maintained by Amazon Yojaka and associated marketplaces are notified about the new inventory. Note that line items rejected with the reason as OUT_OF_STOCK will have the inventory quantity for their respective SKUs set to 0 in the Amazon Yojaka inventory, and all associated marketplaces will be notified about the unavailabilty of that particular SKU in the current order's location.


/orders/{id}/reject-order

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/reject-order"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        RejectOrderInput body = ; // RejectOrderInput | The request body indicating details about the reason for the rejection/cancellation.
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            apiInstance.rejectOrder(body, xAmzAccessToken, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#rejectOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        RejectOrderInput body = ; // RejectOrderInput | The request body indicating details about the reason for the rejection/cancellation.
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            apiInstance.rejectOrder(body, xAmzAccessToken, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#rejectOrder");
            e.printStackTrace();
        }
    }
}
RejectOrderInput *body = ; // The request body indicating details about the reason for the rejection/cancellation.
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka assigned id.

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

// Reject/cancel an order
[apiInstance rejectOrderWith:body
    xAmzAccessToken:xAmzAccessToken
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var body = ; // {{RejectOrderInput}} The request body indicating details about the reason for the rejection/cancellation.
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.

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

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var body = new RejectOrderInput(); // RejectOrderInput | The request body indicating details about the reason for the rejection/cancellation.
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.

            try
            {
                // Reject/cancel an order
                apiInstance.rejectOrder(body, xAmzAccessToken, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.rejectOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$body = ; // RejectOrderInput | The request body indicating details about the reason for the rejection/cancellation.
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka assigned id.

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $body = WWW::SwaggerClient::Object::RejectOrderInput->new(); # RejectOrderInput | The request body indicating details about the reason for the rejection/cancellation.
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka assigned id.

eval { 
    $api_instance->rejectOrder(body => $body, xAmzAccessToken => $xAmzAccessToken, id => $id);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->rejectOrder: $@\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.OrderWorkflowProcessingApi()
body =  # RejectOrderInput | The request body indicating details about the reason for the rejection/cancellation.
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka assigned id.

try: 
    # Reject/cancel an order
    api_instance.reject_order(body, xAmzAccessToken, id)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->rejectOrder: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Body parameters
Name Description
body *

Responses

Status: 204 - Success

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


retrieveInvoice

Retrieve invoice

Clients can invoke this API to retrieve the specified order's invoice. This API will return the invoice only if the GenerateInvoice step of the order processing workflow has been completed. **NOTE**: As per standard Amazon data-retention policy, the Invoice file shall be deleted post 30 days from the date of its generation. This API shall respond with a Yojaka Error Code of `SC_00003` in that case.


/orders/{id}/invoice

Usage and SDK Samples

curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/invoice"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            Invoice result = apiInstance.retrieveInvoice(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#retrieveInvoice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            Invoice result = apiInstance.retrieveInvoice(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#retrieveInvoice");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka assigned id.

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

// Retrieve invoice
[apiInstance retrieveInvoiceWith:xAmzAccessToken
    id:id
              completionHandler: ^(Invoice output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.

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

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.

            try
            {
                // Retrieve invoice
                Invoice result = apiInstance.retrieveInvoice(xAmzAccessToken, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.retrieveInvoice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka assigned id.

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka assigned id.

eval { 
    my $result = $api_instance->retrieveInvoice(xAmzAccessToken => $xAmzAccessToken, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->retrieveInvoice: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka assigned id.

try: 
    # Retrieve invoice
    api_response = api_instance.retrieve_invoice(xAmzAccessToken, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->retrieveInvoice: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required

Responses

Status: 200 - Success. The response will contain the invoice as a PDF.

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


retrievePackingDocuments

Retrieve Packing Documents

Clients can invoke this API to retrieve the specified order's packing documents such as invoice (may include Packing Slip or D&C Addendum, if applicable) and prescription (if applicable). This API will return the documents only if the INVOICE_GENERATED step of the order processing workflow has been completed. **NOTE**: As per standard Amazon data-retention policy, the Invoice file shall be deleted post 30 days from the date of its generation and Prescription file (if applicable) shall be deleted post 30 days from the date of order drop. This API shall return empty List for any of the valid documents if they meet the above criteria, and respond with an exception in case there is any issue in fetching any of the documents.


/orders/{id}/packing-documents

Usage and SDK Samples

curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/packing-documents"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            PackingDocuments result = apiInstance.retrievePackingDocuments(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#retrievePackingDocuments");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        try {
            PackingDocuments result = apiInstance.retrievePackingDocuments(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#retrievePackingDocuments");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka assigned id.

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

// Retrieve Packing Documents
[apiInstance retrievePackingDocumentsWith:xAmzAccessToken
    id:id
              completionHandler: ^(PackingDocuments output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.

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

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.

            try
            {
                // Retrieve Packing Documents
                PackingDocuments result = apiInstance.retrievePackingDocuments(xAmzAccessToken, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.retrievePackingDocuments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka assigned id.

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka assigned id.

eval { 
    my $result = $api_instance->retrievePackingDocuments(xAmzAccessToken => $xAmzAccessToken, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->retrievePackingDocuments: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka assigned id.

try: 
    # Retrieve Packing Documents
    api_response = api_instance.retrieve_packing_documents(xAmzAccessToken, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->retrievePackingDocuments: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required

Responses

Status: 200 - Success. The response will contain the documents in a map.

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


retrievePickupSlots

Retrieve pickup slots

[This API is deprecated. Use /orders/{id}/shipping-options instead.] An API for a client to retrieve an optional list of time-slots that marketplace/channel provides for the pickup of the packages of an order. This API will return a list of time-slots if the marketplace/channel provides transportation and allows the seller to choose a pickup time-slot. If the marketplace/channel does not allow for a pickup-slot to be selected, but has a pre-determined pickup-slot, then this API will return an empty response. **NOTE:** Pickup slots might get expired if time slot has already passed, in this case pickup slots need to be retreived again for ship-label calls.


/orders/{id}/retrieve-pickup-slots

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/retrieve-pickup-slots"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id
        try {
            RetrievePickupSlotsOutput result = apiInstance.retrievePickupSlots(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#retrievePickupSlots");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id
        try {
            RetrievePickupSlotsOutput result = apiInstance.retrievePickupSlots(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#retrievePickupSlots");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka assigned id

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

// Retrieve pickup slots
[apiInstance retrievePickupSlotsWith:xAmzAccessToken
    id:id
              completionHandler: ^(RetrievePickupSlotsOutput output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id

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

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka assigned id

            try
            {
                // Retrieve pickup slots
                RetrievePickupSlotsOutput result = apiInstance.retrievePickupSlots(xAmzAccessToken, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.retrievePickupSlots: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka assigned id

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka assigned id

eval { 
    my $result = $api_instance->retrievePickupSlots(xAmzAccessToken => $xAmzAccessToken, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->retrievePickupSlots: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka assigned id

try: 
    # Retrieve pickup slots
    api_response = api_instance.retrieve_pickup_slots(xAmzAccessToken, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->retrievePickupSlots: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required

Responses

Status: 200 - Success. The response contains an optional list of time-slots that the marketplace/channel provides for pickup.

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


retrieveShipLabel

Retrieve ship-label

Clients can invoke this API to retrieve the ship-label for the specified package of the specified order. This API will return the ship-label only if the GenerateShipLabel step of the order processing workflow has been completed. **NOTE**: As per standard Amazon data-retention policy, the ship-label file shall be deleted post 30 days from the date of its generation. This API shall respond with a Yojaka Error Code of `SC_00003` in that case. **NOTE**: This API is deprecated, kindly use `/orders/{id}/ship-labels` API which has an idempotent GENERATE request to retrieve previous labels.


/orders/{id}/ship-label

Usage and SDK Samples

curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/ship-label?packageId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        String packageId = packageId_example; // String | The id of the package for which a ship-label is to be retrieved.
        try {
            ShipLabel result = apiInstance.retrieveShipLabel(xAmzAccessToken, id, packageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#retrieveShipLabel");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        String packageId = packageId_example; // String | The id of the package for which a ship-label is to be retrieved.
        try {
            ShipLabel result = apiInstance.retrieveShipLabel(xAmzAccessToken, id, packageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#retrieveShipLabel");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka assigned id.
String *packageId = packageId_example; // The id of the package for which a ship-label is to be retrieved.

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

// Retrieve ship-label
[apiInstance retrieveShipLabelWith:xAmzAccessToken
    id:id
    packageId:packageId
              completionHandler: ^(ShipLabel output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.
var packageId = packageId_example; // {{String}} The id of the package for which a ship-label is to be retrieved.

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

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.
            var packageId = packageId_example;  // String | The id of the package for which a ship-label is to be retrieved.

            try
            {
                // Retrieve ship-label
                ShipLabel result = apiInstance.retrieveShipLabel(xAmzAccessToken, id, packageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.retrieveShipLabel: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka assigned id.
$packageId = packageId_example; // String | The id of the package for which a ship-label is to be retrieved.

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka assigned id.
my $packageId = packageId_example; # String | The id of the package for which a ship-label is to be retrieved.

eval { 
    my $result = $api_instance->retrieveShipLabel(xAmzAccessToken => $xAmzAccessToken, id => $id, packageId => $packageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->retrieveShipLabel: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka assigned id.
packageId = packageId_example # String | The id of the package for which a ship-label is to be retrieved.

try: 
    # Retrieve ship-label
    api_response = api_instance.retrieve_ship_label(xAmzAccessToken, id, packageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->retrieveShipLabel: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Query parameters
Name Description
packageId*
String
The id of the package for which a ship-label is to be retrieved.
Required

Responses

Status: 200 - Success. The response will contain the ship-label.

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

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

Status: 404 - Not found. The specified order/package id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


retrieveShippingOptions

Retrieve shipping options

An API for a client to retrieve an optional list of shipping-options that marketplace/channel provides for the packages of an order. This API will return a list of shipping-options if the marketplace/channel provides transportation and allows the seller to choose a shipping-option to ship the package. If the marketplace/channel does not allow for a shipping option to be selected, but has a pre-determined shipping option with it's own pickup times then this API will return an empty response. If the order is eligible for the seller to ship herself, there will be more shipping options for the same. Seller can provide the tracking details in that case using the ship label API. **NOTE:** Shipping Options might get expired if pickup start time has already passed, in this case shipping options need to be retreived again for ship-label calls.


/orders/{id}/retrieve-shipping-options

Usage and SDK Samples

curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/retrieve-shipping-options"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon SmartConnect assigned id
        try {
            RetrieveShippingOptionsOutput result = apiInstance.retrieveShippingOptions(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#retrieveShippingOptions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon SmartConnect assigned id
        try {
            RetrieveShippingOptionsOutput result = apiInstance.retrieveShippingOptions(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#retrieveShippingOptions");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon SmartConnect assigned id

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

// Retrieve shipping options
[apiInstance retrieveShippingOptionsWith:xAmzAccessToken
    id:id
              completionHandler: ^(RetrieveShippingOptionsOutput output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon SmartConnect assigned id

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

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon SmartConnect assigned id

            try
            {
                // Retrieve shipping options
                RetrieveShippingOptionsOutput result = apiInstance.retrieveShippingOptions(xAmzAccessToken, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.retrieveShippingOptions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon SmartConnect assigned id

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon SmartConnect assigned id

eval { 
    my $result = $api_instance->retrieveShippingOptions(xAmzAccessToken => $xAmzAccessToken, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->retrieveShippingOptions: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon SmartConnect assigned id

try: 
    # Retrieve shipping options
    api_response = api_instance.retrieve_shipping_options(xAmzAccessToken, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->retrieveShippingOptions: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon SmartConnect assigned id
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required

Responses

Status: 200 - Success. The response contains an optional list of shipping-options that the marketplace/channel provides for shipping.

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


shipLabels

Generate Shipping Labels.

This API can be used to generate labels for one or more packages of an Yojaka order. It is a successor to (and replaces) the previous GenerateShipLabel and RegenerateShipLabel APIs. The Generate API operation is idempotent, and can also be used to retrieve previously generated labels by supplying the same request parameters. Some programs/features (like Multi-piece) mandate supplying the entire list of packages in a single Label generation request. The Regenerate API acts as a forced generate operation, always generating a new label. Use this only if you want to modify the previously generated label (if any request-param like ShippingOptionId, CourierAttributes or your CPT changes) Edge-case handling: Suppose an order has three packages - P1, P2, P3 Request 1: /ship-labels with packages P1, P2 Response 1 : Label1 , Label2 Request 2: /ship-labels with packages P2, P3 Response 2: Label2 (idempotent response - previously generated label) , Label3 (newly generated)


/orders/{id}/ship-labels

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/ship-labels?shippingOptionId=&operationType="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String operationType = operationType_example; // String | The operationType ( GENERATE / REGENERATE ) associated with current invocation.
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        ShipLabelsInput body = ; // ShipLabelsInput | The request body indicating any extra package/shipping details required to generate the ship label.

        String shippingOptionId = shippingOptionId_example; // String | The id of the shipping-option that the seller chooses to ship the package.
        try {
            ShipLabelsOutput result = apiInstance.shipLabels(xAmzAccessToken, operationType, id, body, shippingOptionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#shipLabels");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String operationType = operationType_example; // String | The operationType ( GENERATE / REGENERATE ) associated with current invocation.
        String id = id_example; // String | The order's Amazon Yojaka assigned id.
        ShipLabelsInput body = ; // ShipLabelsInput | The request body indicating any extra package/shipping details required to generate the ship label.

        String shippingOptionId = shippingOptionId_example; // String | The id of the shipping-option that the seller chooses to ship the package.
        try {
            ShipLabelsOutput result = apiInstance.shipLabels(xAmzAccessToken, operationType, id, body, shippingOptionId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#shipLabels");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *operationType = operationType_example; // The operationType ( GENERATE / REGENERATE ) associated with current invocation.
String *id = id_example; // The order's Amazon Yojaka assigned id.
ShipLabelsInput *body = ; // The request body indicating any extra package/shipping details required to generate the ship label.
 (optional)
String *shippingOptionId = shippingOptionId_example; // The id of the shipping-option that the seller chooses to ship the package. (optional)

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

// Generate Shipping Labels.
[apiInstance shipLabelsWith:xAmzAccessToken
    operationType:operationType
    id:id
    body:body
    shippingOptionId:shippingOptionId
              completionHandler: ^(ShipLabelsOutput output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var operationType = operationType_example; // {{String}} The operationType ( GENERATE / REGENERATE ) associated with current invocation.
var id = id_example; // {{String}} The order's Amazon Yojaka assigned id.
var opts = { 
  'body':  // {{ShipLabelsInput}} The request body indicating any extra package/shipping details required to generate the ship label.

  'shippingOptionId': shippingOptionId_example // {{String}} The id of the shipping-option that the seller chooses to ship the package.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.shipLabels(xAmzAccessTokenoperationTypeid, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var operationType = operationType_example;  // String | The operationType ( GENERATE / REGENERATE ) associated with current invocation.
            var id = id_example;  // String | The order's Amazon Yojaka assigned id.
            var body = new ShipLabelsInput(); // ShipLabelsInput | The request body indicating any extra package/shipping details required to generate the ship label.
 (optional) 
            var shippingOptionId = shippingOptionId_example;  // String | The id of the shipping-option that the seller chooses to ship the package. (optional) 

            try
            {
                // Generate Shipping Labels.
                ShipLabelsOutput result = apiInstance.shipLabels(xAmzAccessToken, operationType, id, body, shippingOptionId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.shipLabels: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$operationType = operationType_example; // String | The operationType ( GENERATE / REGENERATE ) associated with current invocation.
$id = id_example; // String | The order's Amazon Yojaka assigned id.
$body = ; // ShipLabelsInput | The request body indicating any extra package/shipping details required to generate the ship label.

$shippingOptionId = shippingOptionId_example; // String | The id of the shipping-option that the seller chooses to ship the package.

try {
    $result = $api_instance->shipLabels($xAmzAccessToken, $operationType, $id, $body, $shippingOptionId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderWorkflowProcessingApi->shipLabels: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderWorkflowProcessingApi;

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $operationType = operationType_example; # String | The operationType ( GENERATE / REGENERATE ) associated with current invocation.
my $id = id_example; # String | The order's Amazon Yojaka assigned id.
my $body = WWW::SwaggerClient::Object::ShipLabelsInput->new(); # ShipLabelsInput | The request body indicating any extra package/shipping details required to generate the ship label.

my $shippingOptionId = shippingOptionId_example; # String | The id of the shipping-option that the seller chooses to ship the package.

eval { 
    my $result = $api_instance->shipLabels(xAmzAccessToken => $xAmzAccessToken, operationType => $operationType, id => $id, body => $body, shippingOptionId => $shippingOptionId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->shipLabels: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
operationType = operationType_example # String | The operationType ( GENERATE / REGENERATE ) associated with current invocation.
id = id_example # String | The order's Amazon Yojaka assigned id.
body =  # ShipLabelsInput | The request body indicating any extra package/shipping details required to generate the ship label.
 (optional)
shippingOptionId = shippingOptionId_example # String | The id of the shipping-option that the seller chooses to ship the package. (optional)

try: 
    # Generate Shipping Labels.
    api_response = api_instance.ship_labels(xAmzAccessToken, operationType, id, body=body, shippingOptionId=shippingOptionId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->shipLabels: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka assigned id.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Body parameters
Name Description
body
Query parameters
Name Description
shippingOptionId
String
The id of the shipping-option that the seller chooses to ship the package.
operationType*
String
The operationType ( GENERATE / REGENERATE ) associated with current invocation.
Required

Responses

Status: 200 - Success. The response will contain the ship-label(s).

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


shipOrder

Ship order

An API to indicate to Amazon Yojaka that a client has shipped an order.


/orders/{id}/ship-order

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/ship-order"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka id
        try {
            apiInstance.shipOrder(xAmzAccessToken, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#shipOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka id
        try {
            apiInstance.shipOrder(xAmzAccessToken, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#shipOrder");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka id

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

// Ship order
[apiInstance shipOrderWith:xAmzAccessToken
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka id

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

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

            var apiInstance = new OrderWorkflowProcessingApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka id

            try
            {
                // Ship order
                apiInstance.shipOrder(xAmzAccessToken, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderWorkflowProcessingApi.shipOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka id

try {
    $api_instance->shipOrder($xAmzAccessToken, $id);
} catch (Exception $e) {
    echo 'Exception when calling OrderWorkflowProcessingApi->shipOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderWorkflowProcessingApi;

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka id

eval { 
    $api_instance->shipOrder(xAmzAccessToken => $xAmzAccessToken, id => $id);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->shipOrder: $@\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.OrderWorkflowProcessingApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka id

try: 
    # Ship order
    api_instance.ship_order(xAmzAccessToken, id)
except ApiException as e:
    print("Exception when calling OrderWorkflowProcessingApi->shipOrder: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka id
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required

Responses

Status: 204 - Success

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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


updatePackages

Update packages

Use this API to update details about the packages that are being used to fulfil an order. This could include new IMEI serial numbers, new pacakge dimensions, etc. **NOTE:** For serial number enabled orders being processed on the Amazon EasyShip channel, provide correct serial numbers in create-package call as serial number updates are not allowed by marketplace channel.


/orders/{id}/update-packages

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/orders/{id}/update-packages"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderWorkflowProcessingApi;

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

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        CreatePackagesInput body = ; // CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight. Note that the complete list of all packages used or fulfiling the order must be specified.
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka id
        try {
            apiInstance.updatePackages(body, xAmzAccessToken, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#updatePackages");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderWorkflowProcessingApi;

public class OrderWorkflowProcessingApiExample {

    public static void main(String[] args) {
        OrderWorkflowProcessingApi apiInstance = new OrderWorkflowProcessingApi();
        CreatePackagesInput body = ; // CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight. Note that the complete list of all packages used or fulfiling the order must be specified.
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String id = id_example; // String | The order's Amazon Yojaka id
        try {
            apiInstance.updatePackages(body, xAmzAccessToken, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderWorkflowProcessingApi#updatePackages");
            e.printStackTrace();
        }
    }
}
CreatePackagesInput *body = ; // The request body indicating details of the packages, including their dimensions and weight. Note that the complete list of all packages used or fulfiling the order must be specified.
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The order's Amazon Yojaka id

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

// Update packages
[apiInstance updatePackagesWith:body
    xAmzAccessToken:xAmzAccessToken
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiOrdersModel = require('amazon_yojaka_api_orders_model');

var api = new AmazonYojakaApiOrdersModel.OrderWorkflowProcessingApi()
var body = ; // {{CreatePackagesInput}} The request body indicating details of the packages, including their dimensions and weight. Note that the complete list of all packages used or fulfiling the order must be specified.
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var id = id_example; // {{String}} The order's Amazon Yojaka id

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updatePackages(bodyxAmzAccessTokenid, 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 OrderWorkflowProcessingApi();
            var body = new CreatePackagesInput(); // CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight. Note that the complete list of all packages used or fulfiling the order must be specified.
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The order's Amazon Yojaka id

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

$api_instance = new Swagger\Client\ApiOrderWorkflowProcessingApi();
$body = ; // CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight. Note that the complete list of all packages used or fulfiling the order must be specified.
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$id = id_example; // String | The order's Amazon Yojaka id

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

my $api_instance = WWW::SwaggerClient::OrderWorkflowProcessingApi->new();
my $body = WWW::SwaggerClient::Object::CreatePackagesInput->new(); # CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight. Note that the complete list of all packages used or fulfiling the order must be specified.
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $id = id_example; # String | The order's Amazon Yojaka id

eval { 
    $api_instance->updatePackages(body => $body, xAmzAccessToken => $xAmzAccessToken, id => $id);
};
if ($@) {
    warn "Exception when calling OrderWorkflowProcessingApi->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.OrderWorkflowProcessingApi()
body =  # CreatePackagesInput | The request body indicating details of the packages, including their dimensions and weight. Note that the complete list of all packages used or fulfiling the order must be specified.
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
id = id_example # String | The order's Amazon Yojaka id

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

Parameters

Path parameters
Name Description
id*
String
The order's Amazon Yojaka id
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Body parameters
Name Description
body *

Responses

Status: 204 - Success

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

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

Status: 404 - Not found. The specified order id is not found.

Status: 422 - Unprocessable Entity. The specified order has been cancelled by the marketplace.

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

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