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.

{

Contains information about an order that is being processed by Amazon SmartConnect.

Required: creationTimestamp,id,lastUpdatedTimestamp,lineItems,locationId,marketplaceChannelDetails,metadata,status
id:
string

The order's id. This id is assigned by Amazon SmartConnect.

example: 8bdc492b-8bf4-44c6-938f-7b97867e418f
locationId:
string

The Amazon SmartConnect id of the location to which this order is dropped.

example: 86675a94-2bdc-461b-a8aa-aa7abd6302f1
metadata:
{

Metadata about the order.

Required: adapterApp,numberOfUnits,orderType,priority
orderType:
string

Contains the order type.

  • "REPLACEMENT" when replacing order's SKUs are same as the original order.
  • "EXCHANGE" when replacing order's SKUs are different from original order.
  • "NEW" when it's a new order.
Enum: NEW, EXCHANGE, REPLACEMENT
example: NEW
originalOrderInfo:
{

This field contains the details of the original order, if the orderType is either "REPLACEMENT" or "EXCHANGE".

Required: marketplaceChannelDetails,originalLineItems
orderId:
locationId:
marketplaceChannelDetails:
originalLineItems:
}
numberOfUnits:
integer minimum:1

Total number of units in the order.

example: 5
priority:
boolean

Indicates if the order is a priority order or not.

example: true
rejectionEligibleStatusList:
[

Represents a list of order statuses for which the marketplace allows order rejection (seller-cancellation). If the order has a status that does not belong to this list then seller-cancellation is not possible. This attribute remains immutable and does not change throughout the processing lifecycle of the order.

string

Order status for which seller-cancellation is allowed.

Enum: ACCEPTED, CONFIRMED, PACKAGE_CREATED, PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, DELIVERED, CANCELLED, UNFULFILLABLE
example: ACCEPTED
]
orderPlacedTimestamp:
integer (int64)

The timestamp (in UTC) when order was placed.

example: 1604923992000
charge:
{

This field is deprecated. Use the charges field at the root level of the Order object.

Required: totalAmount,totalTax
totalAmount:
totalTax:
}
invoiceInformation:
{

Invoice related information for the order dropped to Amazon SmartConnect.

Required: creationTimestamp,id
id:
creationTimestamp:
}
prescriptionInfo:
{

Prescription related information for the order. Contains Doctor's details.

After decrypting, encryptedPrescriberInfo deserialization could be done using a PrescriberInfo class present in the SDK. Decrypted PatientName is a string.

prescriptionMetadataList:
}
processingSource:
string

Denotes source of order operation. ex- If order is Shipped using Non-Smart Connect Platform then this attribute value will be EXTERNAL_PLATFORM. Possible values are EXTERNAL_PLATFORM, INTERNAL_PLATFORM

example: EXTERNAL_PLATFORM
adapterApp:
{

The adapter through which this order was dropped to Amazon SmartConnect.

Required: id,name
id:
name:
}
}
orderCharges:
[ (1..∞)

The charges associated with the order. The charge amount does not include the tax amount.

{

Represents an order's charges with relevant tax information.

Required: amount,name,type
orderChargeType:
string

The type of charge. Examples include "total", "shipping", "shippingPromotion" etc.

Enum: total, shipping, shippingPromotion
example: total
name:
string

The name of the charge.

example: ProductCharge
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

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

The tax details associated with a charge.

Required: amount,name
name:
string

The name of the tax.

example: GST
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
rate:
number

Combined Tax rate from breakup for the amount.

Note: Tax rate will only be present in lineItem charges, not in order level charges.

example: 0.18
breakup:
[ (1..∞)

The tax split details associated with a charge.

Example: IGST and CGST incase of IN Marketplace.

{

Represents an item from tax breakup.

name:
string

The name of the tax item.

example: SGST, CGST
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
rate:
number

Tax breakup rate for the amount.

Note: Tax rate will only be present in lineItem charges, not in order level charges.

example: 0.09
}
]
}
}
]
marketplaceChannelDetails:
{

Marketplace specific attributes about the order.

Required: locationId,marketplaceChannel,merchantId
marketplaceChannel:
{

Provides details about the marketplace and the channel.

Required: marketplaceName
marketplaceName:
channelName:
}
shipmentId:
string

The marketplace specific shipment id.

example: 852f17e1-105d-4374-8198-ec87a9afe56d
customerOrderId:
string

The marketplace specific customer's order id

example: 13ERT3241KJ
locationId:
string

The id, in the marketplace, of the location that this order is dropped to

example: WSAA
merchantId:
string

The id, in the marketplace, of the merchant or seller whom this order is dropped to

example: ABCDEFGH
customAttributes:
[ (1..∞)

Marketplace Channel specific custom attributes for the order. These attributes are not mandatory and each channel can provide it differently. Connectors can read them based on the type provided to parse the value.

{
attributeName:
string
example: isPrime
attributeValue:
{
valueType:
string
Enum: String, Integer, Double, Boolean
example: Boolean
valuePayload:
string
example: true
}
}
]
}
status:
string

The current status of the order.

Enum: ACCEPTED, CONFIRMED, PACKAGE_CREATED, PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, DELIVERED, CANCELLED, UNFULFILLABLE
example: ACCEPTED
creationTimestamp:
integer (int64)

The number of milliseconds since epoch in UTC when the order was created

example: 1563848475634
lastUpdatedTimestamp:
integer (int64)

The number of milliseconds since epoch in UTC when the order was last updated by any API

example: 1563848475634
lineItems:
[ (1..∞)

The line items in the order

{

Contains information about one line item in an order.

Required: charges,hazmatLabelRequired,id,marketplaceChannelAttributes,merchantSku,numberOfUnits,serialNumberRequired
id:
string

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

example: LI1
merchantSku:
string

The seller's identifier for the SKU in this line item.

example: 4e66ead7-d2e1-45ff-a7fe-2dece27e4b64
numberOfUnits:
integer (int32) minimum:1

The number of items of the particular item.

example: 2
serialNumberRequired:
boolean

Indicates if the marketplace requires serial numbers for the item in this line item.

boundQtyByProvenanceId:
[

The list of provenanceId-quantity that has been bound with the given line item. In case inventory is not present for these provenances seller can provide us with different provenances while creating/updating packages.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
serialNumbers:
[

The serial number(s) for each item in this line item. This data is transmitted encrypted.

{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
]
isMultiPiece:
boolean

Indicates if the line Item has multiple pieces. This attribute will be true only if the line item is a multi-piece item (Example : large appliances, furniture, etc) , where a single unit of item can be shipped as separate pieces.

Example: A "3-piece sofa set" (having "3" pieces of sofa), where individual pieces could be packaged and shipped separately (into one or more packages) would have this attribute set to true.

example: true
hazmatLabelRequired:
boolean

Indicates if the marketplace requires hazardous material labels to be applied on the packages for this line item or not.

example: true
hazmatLabels:
[

A list of HAZMAT label identifiers that are to be applied on the packages for this line item.

string
]
isPrescriptionAvailable:
boolean

Indicates if the prescription is available for this line item or not.

example: true
batchAttributeFlags:
{

This object provides details about the flags required for the batchAttributes of a lineItem.

isMaximumRetailPriceRequired:
boolean

Indicates if the marketplace order requires maximum retail price for this line item or not.

example: true
isBatchNumberRequired:
boolean

Indicates if the marketplace order requires batch number for this line item or not.

example: true
isExpiryTimestampRequired:
boolean

Indicates if the marketplace order requires expiry timestamp for this line item or not.

example: true
}
batches:
[

Details of the batches used for fulfilling this order line item.

{

Details of a single batch.

batchNumber:
string

A string representing batch number for this batch.

maximumRetailPrice:
{

The maximum retail price for items in this batch.

Required: currency,value
value:
number (double)

The maximum retail price of the item. Will always be a positive number.

currency:
string

The currency of the maximum retail price.

example: INR
}
expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) for items in this batch.

quantity:
integer (int32) minimum:1

The number of items being fulfilled through this batch.

}
]
giftAttributes:
{

This object provides details about any gift wrapping of this line item alongwith all relevant details

Required: giftMessagePresent,giftWrapRequired
giftWrapRequired:
boolean

A boolean value indicating if the line item is to be gift wrapped or not

example: true
giftWrapLabel:
string

The label to be printed on the wrapped gift

giftMessagePresent:
boolean

Indicates if there is a gift message that has to be printed on the wrapped gift

example: true
giftMessage:
{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
}
charges:
[ (1..∞)

The charges associated with an order's line item. The charge amount does not include the tax amount.

{

Represents an order's line item's charge with relevant tax information.

Required: amount,name,type
type:
string

This field is deprecated. Use the lineItemChargeType field instead.

example: product
lineItemChargeType:
string

The type of charge. Examples include "product", "productPromotion", "giftWrap", "giftWrapPromotion" etc.

Enum: product, productPromotion, giftWrap, giftWrapPromotion, other
example: productPromotion
name:
string

The name of the charge.

example: ProductCharge
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

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

The tax details associated with a charge.

Required: amount,name
name:
string

The name of the tax.

example: GST
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
rate:
number

Combined Tax rate from breakup for the amount.

Note: Tax rate will only be present in lineItem charges, not in order level charges.

example: 0.18
breakup:
[ (1..∞)

The tax split details associated with a charge.

Example: IGST and CGST incase of IN Marketplace.

{

Represents an item from tax breakup.

name:
string

The name of the tax item.

example: SGST, CGST
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
rate:
number

Tax breakup rate for the amount.

Note: Tax rate will only be present in lineItem charges, not in order level charges.

example: 0.09
}
]
}
}
]
hsnCode:
string

The hsn code of SKU in this lineItem.

example: 961800
cancellations:
[

A list of cancellations for the given line item. This allows for partial cancellation of an order's line item. Supported CancellationType:

  • SELLER_REJECTED: Cancellation initiated by seller.

  • MARKETPLACE_CANCELLATION: Cancellation initiated by marketplace.

  • SYSTEM_CANCELLED: Cancellation initiated by Yojaka. No further action is needed.

NOTE: Currently, Amazon Yojaka does not support partial cancellation of an order or its line items. This list will contain a single value with all the cancellation details.

{

Represents an order item's cancellation details.

cancelledQuantity:
integer (int32) minimum:1

The quantity of items of this particular item which have been cancelled.

cancelledTimestamp:
integer (int64)

The number of milliseconds since epoch in UTC when the line item was cancelled.

example: 1569836471226
cancellationType:
string

The type of cancellation of the item in the order.

Enum: SELLER_REJECTED, MARKETPLACE_CANCELLATION, SYSTEM_CANCELLED
example: MARKETPLACE_CANCELLATION
cancellationReason:
string

The reason for cancellation of the item in the order

example: OUT_OF_STOCK
}
]
marketplaceChannelAttributes:
{

The marketplace specific attributes about the product in an order's line item.

Required: sku
sku:
string

The marketplace specific SKU identifier for this line item.

example: FNSKU-866a251f-a5f2-4126-9a02-47ca4230679e
}
}
]
shippingInfo:
{

Information about how the packages in the order are to be shipped.

shippingType:
string

The type of shipping that seller will use to deliver a customer order.

Enum: MARKETPLACE, SELF
example: MARKETPLACE
recommendedShipMethod:
string

The ship method that the marketplace/channel recommends the seller to use

example: AMZL
deliveryPromiseSpeed:
string

The speed with which order delivery is promised to the customer at the time of order placement

example: EXPEDITED
expectedShippingTimestamp:
integer (int64)

This field is deprecated. Use the expectedShippingTimestampV2 field instead.

example: 1569836471226
expectedShippingTimestampV2:
integer (int64)

The timestamp (in UTC) at which the marketplace/channel expects the seller to ship the order.

example: 1569836471226
expectedDeliveryTimestamp:
integer (int64)

The timestamp (in UTC) at which the marketplace/channel expects the seller to deliver the order.

example: 1569834371226
shipToAddress:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
recommendedPackages:
[ (1..∞)

Recommendations for packages in an order.

For example, If an order contains 2 multi-piece LineItems "1", "2" where, lineItem "1" is required to be shipped into 3 different packages and lineItem "2" is required to be shipped into 2 different packages, then package recommendations would look like : "recommendedPackages" : [ { "dimensions": {Dimension1}, "weight": {Weight1}, "lineItems": [{"lineItemId": "1"}] }, { "dimensions": {Dimension1}, "weight": {Weight1}, "lineItems": [{"lineItemId": "1"}] }, { "dimensions": {Dimension1}, "weight": {Weight1}, "lineItems": [{"lineItemId": "1"}] }, { "dimensions": {Dimension2}, "weight": {Weight2}, "lineItems": [{"lineItemId": "2"}] }, { "dimensions": {Dimension2}, "weight": {Weight2}, "lineItems": [{"lineItemId": "2"}] } ]

{

Recommendations for a package.

dimensions:
{

This type describes dimensions for a packages.

Required: height,length,width
length:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
width:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
height:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
}
weight:
{

An object to represent the weight of a package. The minimum weight for a package might vary from marketplace

to marketplace. For example, the Amazon marketplace expects a minimum weight of 5gms.

Required: value,weightUnit
value:
number minimum:1

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

weightUnit:
string

The unit of measurement of the weight.

Enum: grams, kilograms
}
lineItems:
[

List of line items to be contained in a recommended package. This attribute shall be provided only for orders that come with specific recommendation of line-items distribution within package recommendations.

{
Required: lineItemId
lineItemId:
string

An identifier for an order's line item which should be present in this package. This identifier has the same value as the id of lineItem present in the Order.

example: LI1
}
]
}
]
}
packages:
[

A list of packages.

{

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

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

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

length:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
width:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
height:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
weight:
{

An object to represent the weight of a package. The minimum weight for a package might vary from marketplace

to marketplace. For example, the Amazon marketplace expects a minimum weight of 5gms.

Required: value,weightUnit
value:
number minimum:1

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

weightUnit:
string

The unit of measurement of the weight.

Enum: grams, kilograms
}
packageStatus:
string

Indicates the current status of a package. For any order level details (like to determine if the invoice is generated, etc), refer the order Status value.

Enum: SHIPLABEL_GENERATED, SHIPPED, DELIVERED
example: SHIPLABEL_GENERATED
hazmatLabels:
[

The optional list of hazardous materials labels applied actually on the package

string
]
isFragile:
boolean

Specify whether a package has fragile items or not.

example: true
packagedLineItems:
[

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

{
Required: lineItem,quantity
lineItem:
{

The order's line items that are in a particular package. Only the line item's id is required.

Required: id
id:
string

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

example: LI1
}
quantity:
integer (int32) minimum:1

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

pieces:
integer (int32) minimum:1

The number of pieces of current multi-piece item that are included in this package. This is applicable only for items which are shipped in multiple pieces.

maximumRetailPrice:
{

The maximum retail price of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

Required: currency,value
value:
number (double)

The maximum retail price of the line item. Will always be a positive number

currency:
string

The currency of the maximum retail price.

example: INR
}
batchNumber:
string

The batch number or the lot number of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

serialNumbers:
[

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

{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
]
provenanceQuantities:
[

Seller need to enter these details if an order line-item is bound at provenance inventory so as to fulfill the order at this provided provenance level.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
batches:
[

Seller should enter these details if an order line-item is fulfilled using multiple batches, example - pharmacy SKU.

{

Details of a single batch.

batchNumber:
string

A string representing batch number for this batch.

maximumRetailPrice:
{

The maximum retail price for items in this batch.

Required: currency,value
value:
number (double)

The maximum retail price of the item. Will always be a positive number.

currency:
string

The currency of the maximum retail price.

example: INR
}
expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) for items in this batch.

quantity:
integer (int32) minimum:1

The number of items being fulfilled through this batch.

}
]
}
]
}
]
}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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.

{

An object containing a list of orders. This is returned when orders are listed against a certain query. Note that all fields

of the returned order are populated. Specifically, information about lineItems and packages are not returned.

Required: orders
orders:
[

A list of orders.

{

Contains information about an order that is being processed by Amazon SmartConnect.

Required: creationTimestamp,id,lastUpdatedTimestamp,lineItems,locationId,marketplaceChannelDetails,metadata,status
id:
string

The order's id. This id is assigned by Amazon SmartConnect.

example: 8bdc492b-8bf4-44c6-938f-7b97867e418f
locationId:
string

The Amazon SmartConnect id of the location to which this order is dropped.

example: 86675a94-2bdc-461b-a8aa-aa7abd6302f1
metadata:
{

Metadata about the order.

Required: adapterApp,numberOfUnits,orderType,priority
orderType:
string

Contains the order type.

  • "REPLACEMENT" when replacing order's SKUs are same as the original order.
  • "EXCHANGE" when replacing order's SKUs are different from original order.
  • "NEW" when it's a new order.
Enum: NEW, EXCHANGE, REPLACEMENT
example: NEW
originalOrderInfo:
{

This field contains the details of the original order, if the orderType is either "REPLACEMENT" or "EXCHANGE".

Required: marketplaceChannelDetails,originalLineItems
orderId:
string

The original order's id. This is the id assigned by SmartConnect to the original order. This value will be null if the original order was not processed by Amazon SmartConnect.

example: 23ergj34-23d3-d3gf-234d-34e4834ere32
locationId:
string

The original order's locationId. This is the locationId assigned by SmartConnect to the original order. This value will be null if the original order was not processed by Amazon SmartConnect.

example: 86675a94-2bdc-461b-a8aa-aa7abd6302f1
marketplaceChannelDetails:
{

Marketplace specific attributes about the order.

Required: locationId,marketplaceChannel,merchantId
marketplaceChannel:
{

Provides details about the marketplace and the channel.

Required: marketplaceName
marketplaceName:
string

The name of the marketplace.

example: AMAZON_IN
channelName:
string

The name of the channel within the marketplace.

example: FBA
}
shipmentId:
string

The marketplace specific shipment id.

example: 852f17e1-105d-4374-8198-ec87a9afe56d
customerOrderId:
string

The marketplace specific customer's order id

example: 13ERT3241KJ
locationId:
string

The id, in the marketplace, of the location that this order is dropped to

example: WSAA
merchantId:
string

The id, in the marketplace, of the merchant or seller whom this order is dropped to

example: ABCDEFGH
customAttributes:
[ (1..∞)

Marketplace Channel specific custom attributes for the order. These attributes are not mandatory and each channel can provide it differently. Connectors can read them based on the type provided to parse the value.

{
attributeName:
string
example: isPrime
attributeValue:
{
valueType:
string
Enum: String, Integer, Double, Boolean
example: Boolean
valuePayload:
string
example: true
}
}
]
}
originalLineItems:
[ (1..∞)

The line items from original order corresponding to this order

{
Required: charges,originalSku,replacingSku
replacingSku:
string

SKU id for this order

originalSku:
string

SKU id for the original order

charges:
[ (1..∞)

The charges associated with an order's line item. The charge amount does not include the tax amount.

{

Represents an order's line item's charge with relevant tax information.

Required: amount,name,type
type:
string

This field is deprecated. Use the lineItemChargeType field instead.

example: product
lineItemChargeType:
string

The type of charge. Examples include "product", "productPromotion", "giftWrap", "giftWrapPromotion" etc.

Enum: product, productPromotion, giftWrap, giftWrapPromotion, other
example: productPromotion
name:
string

The name of the charge.

example: ProductCharge
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

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

The tax details associated with a charge.

Required: amount,name
name:
string

The name of the tax.

example: GST
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
rate:
number

Combined Tax rate from breakup for the amount.

Note: Tax rate will only be present in lineItem charges, not in order level charges.

example: 0.18
breakup:
[ (1..∞)

The tax split details associated with a charge.

Example: IGST and CGST incase of IN Marketplace.

{

Represents an item from tax breakup.

name:
string

The name of the tax item.

example: SGST, CGST
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
rate:
number

Tax breakup rate for the amount.

Note: Tax rate will only be present in lineItem charges, not in order level charges.

example: 0.09
}
]
}
}
]
}
]
}
numberOfUnits:
integer minimum:1

Total number of units in the order.

example: 5
priority:
boolean

Indicates if the order is a priority order or not.

example: true
rejectionEligibleStatusList:
[

Represents a list of order statuses for which the marketplace allows order rejection (seller-cancellation). If the order has a status that does not belong to this list then seller-cancellation is not possible. This attribute remains immutable and does not change throughout the processing lifecycle of the order.

string

Order status for which seller-cancellation is allowed.

Enum: ACCEPTED, CONFIRMED, PACKAGE_CREATED, PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, DELIVERED, CANCELLED, UNFULFILLABLE
example: ACCEPTED
]
orderPlacedTimestamp:
integer (int64)

The timestamp (in UTC) when order was placed.

example: 1604923992000
charge:
{

This field is deprecated. Use the charges field at the root level of the Order object.

Required: totalAmount,totalTax
totalAmount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

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

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

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

Invoice related information for the order dropped to Amazon SmartConnect.

Required: creationTimestamp,id
id:
string

The unique id of invoice corresponding to this order.

example: QESR-3245
creationTimestamp:
integer (int64)

The number of milliseconds since epoch in UTC when the invoice was generated.

example: 1604923992000
}
prescriptionInfo:
{

Prescription related information for the order. Contains Doctor's details.

After decrypting, encryptedPrescriberInfo deserialization could be done using a PrescriberInfo class present in the SDK. Decrypted PatientName is a string.

prescriptionMetadataList:
[ (1..∞)

List containing information of prescriptions.

{

Contains details of one prescription.

encryptedPrescriberInfo:
{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
encryptedPatientName:
{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
}
]
}
processingSource:
string

Denotes source of order operation. ex- If order is Shipped using Non-Smart Connect Platform then this attribute value will be EXTERNAL_PLATFORM. Possible values are EXTERNAL_PLATFORM, INTERNAL_PLATFORM

example: EXTERNAL_PLATFORM
adapterApp:
{

The adapter through which this order was dropped to Amazon SmartConnect.

Required: id,name
id:
string

The unique id of the Amazon SmartConnect adapter that dropped the order.

example: 86675a94-2bdc-461b-a8aa-aa7abd6302f1
name:
string

The name of the Amazon SmartConnect adapter that dropped the order.

example: Amazon MFN Adapter
}
}
orderCharges:
[ (1..∞)

The charges associated with the order. The charge amount does not include the tax amount.

{

Represents an order's charges with relevant tax information.

Required: amount,name,type
orderChargeType:
string

The type of charge. Examples include "total", "shipping", "shippingPromotion" etc.

Enum: total, shipping, shippingPromotion
example: total
name:
string

The name of the charge.

example: ProductCharge
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

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

The tax details associated with a charge.

Required: amount,name
name:
string

The name of the tax.

example: GST
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
rate:
number

Combined Tax rate from breakup for the amount.

Note: Tax rate will only be present in lineItem charges, not in order level charges.

example: 0.18
breakup:
[ (1..∞)

The tax split details associated with a charge.

Example: IGST and CGST incase of IN Marketplace.

{

Represents an item from tax breakup.

name:
string

The name of the tax item.

example: SGST, CGST
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
rate:
number

Tax breakup rate for the amount.

Note: Tax rate will only be present in lineItem charges, not in order level charges.

example: 0.09
}
]
}
}
]
marketplaceChannelDetails:
{

Marketplace specific attributes about the order.

Required: locationId,marketplaceChannel,merchantId
marketplaceChannel:
{

Provides details about the marketplace and the channel.

Required: marketplaceName
marketplaceName:
string

The name of the marketplace.

example: AMAZON_IN
channelName:
string

The name of the channel within the marketplace.

example: FBA
}
shipmentId:
string

The marketplace specific shipment id.

example: 852f17e1-105d-4374-8198-ec87a9afe56d
customerOrderId:
string

The marketplace specific customer's order id

example: 13ERT3241KJ
locationId:
string

The id, in the marketplace, of the location that this order is dropped to

example: WSAA
merchantId:
string

The id, in the marketplace, of the merchant or seller whom this order is dropped to

example: ABCDEFGH
customAttributes:
[ (1..∞)

Marketplace Channel specific custom attributes for the order. These attributes are not mandatory and each channel can provide it differently. Connectors can read them based on the type provided to parse the value.

{
attributeName:
string
example: isPrime
attributeValue:
{
valueType:
string
Enum: String, Integer, Double, Boolean
example: Boolean
valuePayload:
string
example: true
}
}
]
}
status:
string

The current status of the order.

Enum: ACCEPTED, CONFIRMED, PACKAGE_CREATED, PICKUP_SLOT_RETRIEVED, INVOICE_GENERATED, SHIPLABEL_GENERATED, SHIPPED, DELIVERED, CANCELLED, UNFULFILLABLE
example: ACCEPTED
creationTimestamp:
integer (int64)

The number of milliseconds since epoch in UTC when the order was created

example: 1563848475634
lastUpdatedTimestamp:
integer (int64)

The number of milliseconds since epoch in UTC when the order was last updated by any API

example: 1563848475634
lineItems:
[ (1..∞)

The line items in the order

{

Contains information about one line item in an order.

Required: charges,hazmatLabelRequired,id,marketplaceChannelAttributes,merchantSku,numberOfUnits,serialNumberRequired
id:
string

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

example: LI1
merchantSku:
string

The seller's identifier for the SKU in this line item.

example: 4e66ead7-d2e1-45ff-a7fe-2dece27e4b64
numberOfUnits:
integer (int32) minimum:1

The number of items of the particular item.

example: 2
serialNumberRequired:
boolean

Indicates if the marketplace requires serial numbers for the item in this line item.

boundQtyByProvenanceId:
[

The list of provenanceId-quantity that has been bound with the given line item. In case inventory is not present for these provenances seller can provide us with different provenances while creating/updating packages.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
serialNumbers:
[

The serial number(s) for each item in this line item. This data is transmitted encrypted.

{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
]
isMultiPiece:
boolean

Indicates if the line Item has multiple pieces. This attribute will be true only if the line item is a multi-piece item (Example : large appliances, furniture, etc) , where a single unit of item can be shipped as separate pieces.

Example: A "3-piece sofa set" (having "3" pieces of sofa), where individual pieces could be packaged and shipped separately (into one or more packages) would have this attribute set to true.

example: true
hazmatLabelRequired:
boolean

Indicates if the marketplace requires hazardous material labels to be applied on the packages for this line item or not.

example: true
hazmatLabels:
[

A list of HAZMAT label identifiers that are to be applied on the packages for this line item.

string
]
isPrescriptionAvailable:
boolean

Indicates if the prescription is available for this line item or not.

example: true
batchAttributeFlags:
{

This object provides details about the flags required for the batchAttributes of a lineItem.

isMaximumRetailPriceRequired:
boolean

Indicates if the marketplace order requires maximum retail price for this line item or not.

example: true
isBatchNumberRequired:
boolean

Indicates if the marketplace order requires batch number for this line item or not.

example: true
isExpiryTimestampRequired:
boolean

Indicates if the marketplace order requires expiry timestamp for this line item or not.

example: true
}
batches:
[

Details of the batches used for fulfilling this order line item.

{

Details of a single batch.

batchNumber:
string

A string representing batch number for this batch.

maximumRetailPrice:
{

The maximum retail price for items in this batch.

Required: currency,value
value:
number (double)

The maximum retail price of the item. Will always be a positive number.

currency:
string

The currency of the maximum retail price.

example: INR
}
expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) for items in this batch.

quantity:
integer (int32) minimum:1

The number of items being fulfilled through this batch.

}
]
giftAttributes:
{

This object provides details about any gift wrapping of this line item alongwith all relevant details

Required: giftMessagePresent,giftWrapRequired
giftWrapRequired:
boolean

A boolean value indicating if the line item is to be gift wrapped or not

example: true
giftWrapLabel:
string

The label to be printed on the wrapped gift

giftMessagePresent:
boolean

Indicates if there is a gift message that has to be printed on the wrapped gift

example: true
giftMessage:
{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
}
charges:
[ (1..∞)

The charges associated with an order's line item. The charge amount does not include the tax amount.

{

Represents an order's line item's charge with relevant tax information.

Required: amount,name,type
type:
string

This field is deprecated. Use the lineItemChargeType field instead.

example: product
lineItemChargeType:
string

The type of charge. Examples include "product", "productPromotion", "giftWrap", "giftWrapPromotion" etc.

Enum: product, productPromotion, giftWrap, giftWrapPromotion, other
example: productPromotion
name:
string

The name of the charge.

example: ProductCharge
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

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

The tax details associated with a charge.

Required: amount,name
name:
string

The name of the tax.

example: GST
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
rate:
number

Combined Tax rate from breakup for the amount.

Note: Tax rate will only be present in lineItem charges, not in order level charges.

example: 0.18
breakup:
[ (1..∞)

The tax split details associated with a charge.

Example: IGST and CGST incase of IN Marketplace.

{

Represents an item from tax breakup.

name:
string

The name of the tax item.

example: SGST, CGST
amount:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

Enum: INR, USD
example: INR
}
rate:
number

Tax breakup rate for the amount.

Note: Tax rate will only be present in lineItem charges, not in order level charges.

example: 0.09
}
]
}
}
]
hsnCode:
string

The hsn code of SKU in this lineItem.

example: 961800
cancellations:
[

A list of cancellations for the given line item. This allows for partial cancellation of an order's line item. Supported CancellationType:

  • SELLER_REJECTED: Cancellation initiated by seller.

  • MARKETPLACE_CANCELLATION: Cancellation initiated by marketplace.

  • SYSTEM_CANCELLED: Cancellation initiated by Yojaka. No further action is needed.

NOTE: Currently, Amazon Yojaka does not support partial cancellation of an order or its line items. This list will contain a single value with all the cancellation details.

{

Represents an order item's cancellation details.

cancelledQuantity:
integer (int32) minimum:1

The quantity of items of this particular item which have been cancelled.

cancelledTimestamp:
integer (int64)

The number of milliseconds since epoch in UTC when the line item was cancelled.

example: 1569836471226
cancellationType:
string

The type of cancellation of the item in the order.

Enum: SELLER_REJECTED, MARKETPLACE_CANCELLATION, SYSTEM_CANCELLED
example: MARKETPLACE_CANCELLATION
cancellationReason:
string

The reason for cancellation of the item in the order

example: OUT_OF_STOCK
}
]
marketplaceChannelAttributes:
{

The marketplace specific attributes about the product in an order's line item.

Required: sku
sku:
string

The marketplace specific SKU identifier for this line item.

example: FNSKU-866a251f-a5f2-4126-9a02-47ca4230679e
}
}
]
shippingInfo:
{

Information about how the packages in the order are to be shipped.

shippingType:
string

The type of shipping that seller will use to deliver a customer order.

Enum: MARKETPLACE, SELF
example: MARKETPLACE
recommendedShipMethod:
string

The ship method that the marketplace/channel recommends the seller to use

example: AMZL
deliveryPromiseSpeed:
string

The speed with which order delivery is promised to the customer at the time of order placement

example: EXPEDITED
expectedShippingTimestamp:
integer (int64)

This field is deprecated. Use the expectedShippingTimestampV2 field instead.

example: 1569836471226
expectedShippingTimestampV2:
integer (int64)

The timestamp (in UTC) at which the marketplace/channel expects the seller to ship the order.

example: 1569836471226
expectedDeliveryTimestamp:
integer (int64)

The timestamp (in UTC) at which the marketplace/channel expects the seller to deliver the order.

example: 1569834371226
shipToAddress:
{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
recommendedPackages:
[ (1..∞)

Recommendations for packages in an order.

For example, If an order contains 2 multi-piece LineItems "1", "2" where, lineItem "1" is required to be shipped into 3 different packages and lineItem "2" is required to be shipped into 2 different packages, then package recommendations would look like : "recommendedPackages" : [ { "dimensions": {Dimension1}, "weight": {Weight1}, "lineItems": [{"lineItemId": "1"}] }, { "dimensions": {Dimension1}, "weight": {Weight1}, "lineItems": [{"lineItemId": "1"}] }, { "dimensions": {Dimension1}, "weight": {Weight1}, "lineItems": [{"lineItemId": "1"}] }, { "dimensions": {Dimension2}, "weight": {Weight2}, "lineItems": [{"lineItemId": "2"}] }, { "dimensions": {Dimension2}, "weight": {Weight2}, "lineItems": [{"lineItemId": "2"}] } ]

{

Recommendations for a package.

dimensions:
{

This type describes dimensions for a packages.

Required: height,length,width
length:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
width:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
height:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
}
weight:
{

An object to represent the weight of a package. The minimum weight for a package might vary from marketplace

to marketplace. For example, the Amazon marketplace expects a minimum weight of 5gms.

Required: value,weightUnit
value:
number minimum:1

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

weightUnit:
string

The unit of measurement of the weight.

Enum: grams, kilograms
}
lineItems:
[

List of line items to be contained in a recommended package. This attribute shall be provided only for orders that come with specific recommendation of line-items distribution within package recommendations.

{
Required: lineItemId
lineItemId:
string

An identifier for an order's line item which should be present in this package. This identifier has the same value as the id of lineItem present in the Order.

example: LI1
}
]
}
]
}
packages:
[

A list of packages.

{

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

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

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

length:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
width:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
height:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
weight:
{

An object to represent the weight of a package. The minimum weight for a package might vary from marketplace

to marketplace. For example, the Amazon marketplace expects a minimum weight of 5gms.

Required: value,weightUnit
value:
number minimum:1

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

weightUnit:
string

The unit of measurement of the weight.

Enum: grams, kilograms
}
packageStatus:
string

Indicates the current status of a package. For any order level details (like to determine if the invoice is generated, etc), refer the order Status value.

Enum: SHIPLABEL_GENERATED, SHIPPED, DELIVERED
example: SHIPLABEL_GENERATED
hazmatLabels:
[

The optional list of hazardous materials labels applied actually on the package

string
]
isFragile:
boolean

Specify whether a package has fragile items or not.

example: true
packagedLineItems:
[

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

{
Required: lineItem,quantity
lineItem:
{

The order's line items that are in a particular package. Only the line item's id is required.

Required: id
id:
string

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

example: LI1
}
quantity:
integer (int32) minimum:1

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

pieces:
integer (int32) minimum:1

The number of pieces of current multi-piece item that are included in this package. This is applicable only for items which are shipped in multiple pieces.

maximumRetailPrice:
{

The maximum retail price of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

Required: currency,value
value:
number (double)

The maximum retail price of the line item. Will always be a positive number

currency:
string

The currency of the maximum retail price.

example: INR
}
batchNumber:
string

The batch number or the lot number of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

serialNumbers:
[

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

{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
]
provenanceQuantities:
[

Seller need to enter these details if an order line-item is bound at provenance inventory so as to fulfill the order at this provided provenance level.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
batches:
[

Seller should enter these details if an order line-item is fulfilled using multiple batches, example - pharmacy SKU.

{

Details of a single batch.

batchNumber:
string

A string representing batch number for this batch.

maximumRetailPrice:
{

The maximum retail price for items in this batch.

Required: currency,value
value:
number (double)

The maximum retail price of the item. Will always be a positive number.

currency:
string

The currency of the maximum retail price.

example: INR
}
expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) for items in this batch.

quantity:
integer (int32) minimum:1

The number of items being fulfilled through this batch.

}
]
}
]
}
]
}
]
cursor:
string

A cursor representing information about the next page of orders that should be returned on subsequent calls. Use this value to page through the complete list of orders.

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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.

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

The request entity provided by a client with the details of the packages that will use used to ship the order.

The list of packages that will be shipped for an order needs to be provided. For the line items within each package,

only the id field within the line item is mandatory.

Required: packages
packages:
[

A list of packages.

{

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

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

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

length:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
width:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
height:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
weight:
{

An object to represent the weight of a package. The minimum weight for a package might vary from marketplace

to marketplace. For example, the Amazon marketplace expects a minimum weight of 5gms.

Required: value,weightUnit
value:
number minimum:1

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

weightUnit:
string

The unit of measurement of the weight.

Enum: grams, kilograms
}
hazmatLabels:
[

The optional list of hazardous materials labels applied actually on the package

string
]
isFragile:
boolean

Specify whether a package has fragile items or not.

example: true
packagedLineItems:
[

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

{
Required: lineItem,quantity
lineItem:
{

The order's line items that are in a particular package. Only the line item's id is required.

Required: id
id:
string

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

example: LI1
}
quantity:
integer (int32) minimum:1

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

pieces:
integer (int32) minimum:1

The number of pieces of current multi-piece item that are included in this package. This is applicable only for items which are shipped in multiple pieces.

maximumRetailPrice:
{

The maximum retail price of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

Required: currency,value
value:
number (double)

The maximum retail price of the line item. Will always be a positive number

currency:
string

The currency of the maximum retail price.

example: INR
}
batchNumber:
string

The batch number or the lot number of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

serialNumbers:
[

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

{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
]
provenanceQuantities:
[

Seller need to enter these details if an order line-item is bound at provenance inventory so as to fulfill the order at this provided provenance level.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
batches:
[

Seller should enter these details if an order line-item is fulfilled using multiple batches, example - pharmacy SKU.

{

Details of a single batch.

batchNumber:
string

A string representing batch number for this batch.

maximumRetailPrice:
{

The maximum retail price for items in this batch.

Required: currency,value
value:
number (double)

The maximum retail price of the item. Will always be a positive number.

currency:
string

The currency of the maximum retail price.

example: INR
}
expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) for items in this batch.

quantity:
integer (int32) minimum:1

The number of items being fulfilled through this batch.

}
]
}
]
}
]
}

Responses

Status: 204 - Success

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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.

{

An object representing an invoice. This contains the encrypted invoice document, encoded as a base64 string. Use the fileData field in the object. The invoice field is deprecated.

Note that the invoice returned by Amazon Yojaka will be in the PDF format.

Required: fileData
invoice:
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
}
fileData:
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
}
}
example: [object Object]

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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.

{

An object representing a list of packing documents such as invoice (may include Packing Slip or D&C Addendum, if applicable) and prescription (if applicable). This contains the encrypted documents, encoded as a base64 string.

Required: packingDocumentsList
packingDocumentsList:
[

List of the packing documents.

{

The individual packing documents object corresponding to each of the document type.

Required: encryptedContentList,packingDocumentType
packingDocumentType:
string

The type of the packing document.

Enum: INVOICE, PRESCRIPTION
encryptedContentList:
[
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
}
]
}
]
}
example: [object Object]

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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
{

This request entity will contain any extra attributes required to generate the ship label like courier tracking details.

courierSupportedAttributes:
{

The request entity provided by a client with the tracking details of the package if shipped by 3P courier.

NOTE: This attribute should only be provided when the value of ShipBy Enum is THIRD_PARTY_CARRIER.

Required: carrierName,trackingId
carrierName:
trackingId:
}
}
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.

{

An object representing a ship-label. This contains the encrypted ship-label document, encoded as a base64 string. Use the fileData field in the object. The shipLabel field is deprecated.

Note that the ship-label returned by Amazon Yojaka will either be in the ZPL or in the PNG format. The format of the returned ship-label is based on the configuration of the Amazon Yojaka location that is fulfilling the order.

Required: fileData
shipLabel:
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
}
shipLabelMetadata:
{

Contains Metadata about the ship label document.

carrierName:
string

Name of the carrier.

trackingId:
string

The tracking number of the package.

carrierPickupWindow:
{

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

Required: endTimestamp,startTimestamp
startTimestamp:
endTimestamp:
}
}
fileData:
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
}
}
example: [object Object]

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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
{

This request entity will contain any extra attributes required to generate the ship label like courier tracking details.

courierSupportedAttributes:
{

The request entity provided by a client with the tracking details of the package if shipped by 3P courier.

NOTE: This attribute should only be provided when the value of ShipBy Enum is THIRD_PARTY_CARRIER.

Required: carrierName,trackingId
carrierName:
trackingId:
}
}
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.

{

An object representing a ship-label. This contains the encrypted ship-label document, encoded as a base64 string. Use the fileData field in the object. The shipLabel field is deprecated.

Note that the ship-label returned by Amazon Yojaka will either be in the ZPL or in the PNG format. The format of the returned ship-label is based on the configuration of the Amazon Yojaka location that is fulfilling the order.

Required: fileData
shipLabel:
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
}
shipLabelMetadata:
{

Contains Metadata about the ship label document.

carrierName:
string

Name of the carrier.

trackingId:
string

The tracking number of the package.

carrierPickupWindow:
{

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

Required: endTimestamp,startTimestamp
startTimestamp:
endTimestamp:
}
}
fileData:
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
}
}
example: [object Object]

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

The request entity provided by a client when rejecting/cancelling an order.

Required: referenceId
referenceId:
string

A unique identifier for every order rejection request raised by the caller.

example: RJCT-ID-1
rejectedLineItems:
[

Details about the line items from the order that are rejected by the seller

{
Required: lineItem,reason
lineItem:
{

The line item which is being rejected. Only the id of the line item is required.

Required: id
id:
string

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

example: LI1
}
reason:
string

The reason for the rejection of the order.

Note: CUSTOMER_REQUESTED is only applicable for MFN channel orders with ShippingType as SELF.

Enum: OUT_OF_STOCK, CUSTOMER_REQUESTED
example: OUT_OF_STOCK
quantity:
integer (int32) minimum:1

The number of items which are being rejected by the seller. This allows for the partial fulfilment of an order's line items.

NOTE that, currently, Amazon Yojaka does not support partial rejection of the line items of an order. The quantity you specify

here must be exactly equal to the line item's quantity as present in the order.

}
]
}

Responses

Status: 204 - Success

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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.

{

An object representing an invoice. This contains the encrypted invoice document, encoded as a base64 string. Use the fileData field in the object. The invoice field is deprecated.

Note that the invoice returned by Amazon Yojaka will be in the PDF format.

Required: fileData
invoice:
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
}
fileData:
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
}
}
example: [object Object]

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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.

{

An object representing a list of packing documents such as invoice (may include Packing Slip or D&C Addendum, if applicable) and prescription (if applicable). This contains the encrypted documents, encoded as a base64 string.

Required: packingDocumentsList
packingDocumentsList:
[

List of the packing documents.

{

The individual packing documents object corresponding to each of the document type.

Required: encryptedContentList,packingDocumentType
packingDocumentType:
string

The type of the packing document.

Enum: INVOICE, PRESCRIPTION
encryptedContentList:
[
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
}
]
}
]
}
example: [object Object]

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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.

{

The response entity returned to the client by the retrieve pickup slots API.

The response contains 0 or more time-slots on a per-package basis from which the seller has to select one timeslot while retrieving the ship-label.

If the particular marketplace/channel does not support scheduled pickup-slots, then this response will be empty.

packagePickupSlots:
[

The list of time-slots per package

{
Required: packageId,timeSlots
packageId:
string

The id of the package for which the timeslots are listed.

timeSlots:
[ (1..∞)

The list of time-slots for the given package

{

An object to represent a time-slot that a marketplace/channel provides to the seller to pickup the packages of the order.

Required: endTimestamp,id,startTimestamp
id:
string

An id assigned by Amazon SmartConect for each time-slot. The id is unique within the scope of an order.

startTimestamp:
integer (int64)

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

endTimestamp:
integer (int64)

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

}
]
recommendedTimeSlot:
{

An object to represent a time-slot that a marketplace/channel provides to the seller to pickup the packages of the order.

Required: endTimestamp,id,startTimestamp
id:
string

An id assigned by Amazon SmartConect for each time-slot. The id is unique within the scope of an order.

startTimestamp:
integer (int64)

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

endTimestamp:
integer (int64)

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

}
}
]
}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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.

{

An object representing a ship-label. This contains the encrypted ship-label document, encoded as a base64 string. Use the fileData field in the object. The shipLabel field is deprecated.

Note that the ship-label returned by Amazon Yojaka will either be in the ZPL or in the PNG format. The format of the returned ship-label is based on the configuration of the Amazon Yojaka location that is fulfilling the order.

Required: fileData
shipLabel:
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
}
shipLabelMetadata:
{

Contains Metadata about the ship label document.

carrierName:
string

Name of the carrier.

trackingId:
string

The tracking number of the package.

carrierPickupWindow:
{

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

Required: endTimestamp,startTimestamp
startTimestamp:
endTimestamp:
}
}
fileData:
{

A generic container object for files returned by Amazon SmartConnect.

format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
encryptedContent:
{

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

Required: encryptionInfo,value
value:
encryptionInfo:
}
}
}
example: [object Object]

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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.

{

The response entity returned to the client by the retrieve shipping options API.

The response contains 0 or more shipping options on a per-package basis from which the seller has to select one option while generating the ship-label.

If the particular marketplace/channel does not support scheduled shipping options, then this response will be empty.

packageShippingOptions:
[

The list of shipping options per package

{
Required: packageId,shippingOptions
packageId:
string

The id of the package for which the shipping options are listed.

shippingOptions:
[ (1..∞)

The list of shipping options for the given package

{

An object to represent a shipping-option that a marketplace/channel provides to the seller.

This shipping-option specifies how the seller wants to ship the packages of the order.

Required: id,shipBy
id:
string

An id assigned by Amazon SmartConect for each shipping-option. The id is unique within the scope of an order.

carrierName:
string

The name of the carrier available to ship the order

shipBy:
string

Shipping method (MARKETPLACE/THIRD_PARTY_CARRIER/SELLER)

Enum: MARKETPLACE, THIRD_PARTY_CARRIER, SELLER
pickupStartTimestamp:
integer (int64)

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

pickupEndTimestamp:
integer (int64)

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

expectedDeliveryStartTimestamp:
integer (int64)

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

expectedDeliveryEndTimestamp:
integer (int64)

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

totalCharge:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

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

An object to represent the weight of a package. The minimum weight for a package might vary from marketplace

to marketplace. For example, the Amazon marketplace expects a minimum weight of 5gms.

Required: value,weightUnit
value:
number minimum:1

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

weightUnit:
string

The unit of measurement of the weight.

Enum: grams, kilograms
}
}
]
recommendedShippingOption:
{

An object to represent a shipping-option that a marketplace/channel provides to the seller.

This shipping-option specifies how the seller wants to ship the packages of the order.

Required: id,shipBy
id:
string

An id assigned by Amazon SmartConect for each shipping-option. The id is unique within the scope of an order.

carrierName:
string

The name of the carrier available to ship the order

shipBy:
string

Shipping method (MARKETPLACE/THIRD_PARTY_CARRIER/SELLER)

Enum: MARKETPLACE, THIRD_PARTY_CARRIER, SELLER
pickupStartTimestamp:
integer (int64)

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

pickupEndTimestamp:
integer (int64)

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

expectedDeliveryStartTimestamp:
integer (int64)

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

expectedDeliveryEndTimestamp:
integer (int64)

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

totalCharge:
{

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

Required: currency,value
value:
number

The monetary amount.

example: 1024
currency:
string

The currency of the amount.

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

An object to represent the weight of a package. The minimum weight for a package might vary from marketplace

to marketplace. For example, the Amazon marketplace expects a minimum weight of 5gms.

Required: value,weightUnit
value:
number minimum:1

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

weightUnit:
string

The unit of measurement of the weight.

Enum: grams, kilograms
}
}
}
]
}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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
{

This request entity will contain extra attributes required to generate the ship-label like list of packages,
courier supported attributes, etc.

packageIds:
[

The subset of package-ids to generate label for in the current request. This field is mandatory and need to be supplied with every request.

{

The id of the package for which a ship-label is to be retrieved.

packageId:
string
}
]
courierSupportedAttributes:
{

The request entity provided by a client with the tracking details of the package if shipped by 3P courier.

NOTE: This attribute should only be provided when the value of ShipBy Enum is THIRD_PARTY_CARRIER.

Required: carrierName,trackingId
carrierName:
trackingId:
}
}
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).

[

An object representing ship-label response as a list of label documents against each package specified in the request. In case of partial failures when generating labels, the isErrored and errorDetails attributes can be used to extract the failure cause.

{
packageId:
string

The packageId for current object

shipLabelMetadata:
{

Contains Metadata about the ship label document.

carrierName:
string

Name of the carrier.

trackingId:
string

The tracking number of the package.

carrierPickupWindow:
{

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

Required: endTimestamp,startTimestamp
startTimestamp:
integer (int64)

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

endTimestamp:
integer (int64)

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

}
}
fileData:
{

A generic container object for files returned by Amazon Smartconnect. We use S3-Presigned URLs to transfer file contents.

Required: format,presignedURL
format:
string

The media type of the file.

Enum: ZPL, PDF, PNG
presignedURL:
string

The presigned url link to fetch the file. You can use this url as part of an HTTP GET request to download the contents.

The downloaded file content is encrypted and follows the EncryptedData definition as below :

  {
    "value": "string", // The encrypted content.
    "encryptionInfo" : {
       "context" : "string", // Context information to be used during decryption. Supported Enums : [giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName]
       "type" : "string" // The type of encryption used. Supported Enums : [AWS_KMS]
    }
  }
}
isErrored:
boolean

Indicates if Label generation failed for the current package. If true, use errorDetails field to extract details of the failure.

errorDetails:
{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}
}
]

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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.

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

The request entity provided by a client with the details of the packages that will use used to ship the order.

The list of packages that will be shipped for an order needs to be provided. For the line items within each package,

only the id field within the line item is mandatory.

Required: packages
packages:
[

A list of packages.

{

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

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

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

length:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
width:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
height:
{

An object to represent a dimension (length/width/height) of a package.

Required: dimensionUnit,value
value:
number minimum:1

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

dimensionUnit:
string

The unit of measurement of a dimension.

Enum: CM, M
}
weight:
{

An object to represent the weight of a package. The minimum weight for a package might vary from marketplace

to marketplace. For example, the Amazon marketplace expects a minimum weight of 5gms.

Required: value,weightUnit
value:
number minimum:1

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

weightUnit:
string

The unit of measurement of the weight.

Enum: grams, kilograms
}
hazmatLabels:
[

The optional list of hazardous materials labels applied actually on the package

string
]
isFragile:
boolean

Specify whether a package has fragile items or not.

example: true
packagedLineItems:
[

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

{
Required: lineItem,quantity
lineItem:
{

The order's line items that are in a particular package. Only the line item's id is required.

Required: id
id:
string

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

example: LI1
}
quantity:
integer (int32) minimum:1

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

pieces:
integer (int32) minimum:1

The number of pieces of current multi-piece item that are included in this package. This is applicable only for items which are shipped in multiple pieces.

maximumRetailPrice:
{

The maximum retail price of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

Required: currency,value
value:
number (double)

The maximum retail price of the line item. Will always be a positive number

currency:
string

The currency of the maximum retail price.

example: INR
}
batchNumber:
string

The batch number or the lot number of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.

serialNumbers:
[

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

{

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

Required: encryptionInfo,value
value:
string

The encrypted content.

example: ABCD1244BCDE=
encryptionInfo:
{

Contains information about the encryption.

Required: context,type
context:
string

Context information that should be used during decryption.

Enum: giftMessage, invoice, prescription, serialNumber, shipLabel, shipToAddress, prescriberInfo, patientName
example: invoice
type:
string

The type of encryption used

Enum: AWS_KMS
example: AWS_KMS
}
}
]
provenanceQuantities:
[

Seller need to enter these details if an order line-item is bound at provenance inventory so as to fulfill the order at this provided provenance level.

{

Represents provenanceId-quantity mapping

Required: provenanceId,quantity
provenanceId:
string

Amazon Yojaka generated Provenance ID

quantity:
integer

Quantity associated with the given Provenance ID

}
]
batches:
[

Seller should enter these details if an order line-item is fulfilled using multiple batches, example - pharmacy SKU.

{

Details of a single batch.

batchNumber:
string

A string representing batch number for this batch.

maximumRetailPrice:
{

The maximum retail price for items in this batch.

Required: currency,value
value:
number (double)

The maximum retail price of the item. Will always be a positive number.

currency:
string

The currency of the maximum retail price.

example: INR
}
expiryTimestamp:
integer (int64)

The expiry timestamp as milliseconds since epoch (in UTC) for items in this batch.

quantity:
integer (int32) minimum:1

The number of items being fulfilled through this batch.

}
]
}
]
}
]
}

Responses

Status: 204 - Success

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}

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

{

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

Required: errorCode,errorDescription,retryable
errorCode:
string

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

example: SC_00001
errorDescription:
string

A human-readable description of the error.

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

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

}