Amazon Yojaka Adapters API Orders Model

OrderManagement

cancelOrder

Cancel order

Use this API to indicate to the Amazon Yojaka product that the marketplace/fulfilment channel has cancelled an order that had been dropped to Amazon Yojaka for a seller to process. This call indicates to the seller that they need to continue the process of fulfiling the order.


/orders/{id}/cancel

Usage and SDK Samples

curl -X PUT "https://api.prod.dub.adapters.yojaka.xp.sellers.a2z.com/v1/orders/{id}/cancel"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderManagementApi;

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

public class OrderManagementApiExample {

    public static void main(String[] args) {
        
        OrderManagementApi apiInstance = new OrderManagementApi();
        CancelOrderInput body = ; // CancelOrderInput | The request body containing information about the order being cancelled.
        String id = id_example; // String | The order's id as defined in the marketaplce/fulfilment channel
        try {
            apiInstance.cancelOrder(body, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderManagementApi#cancelOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderManagementApi;

public class OrderManagementApiExample {

    public static void main(String[] args) {
        OrderManagementApi apiInstance = new OrderManagementApi();
        CancelOrderInput body = ; // CancelOrderInput | The request body containing information about the order being cancelled.
        String id = id_example; // String | The order's id as defined in the marketaplce/fulfilment channel
        try {
            apiInstance.cancelOrder(body, id);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderManagementApi#cancelOrder");
            e.printStackTrace();
        }
    }
}
CancelOrderInput *body = ; // The request body containing information about the order being cancelled.
String *id = id_example; // The order's id as defined in the marketaplce/fulfilment channel

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

// Cancel order
[apiInstance cancelOrderWith:body
    id:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiOrdersModel = require('amazon_yojaka_adapters_api_orders_model');

var api = new AmazonYojakaAdaptersApiOrdersModel.OrderManagementApi()
var body = ; // {{CancelOrderInput}} The request body containing information about the order being cancelled.
var id = id_example; // {{String}} The order's id as defined in the marketaplce/fulfilment channel

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

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

            var apiInstance = new OrderManagementApi();
            var body = new CancelOrderInput(); // CancelOrderInput | The request body containing information about the order being cancelled.
            var id = id_example;  // String | The order's id as defined in the marketaplce/fulfilment channel

            try
            {
                // Cancel order
                apiInstance.cancelOrder(body, id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderManagementApi.cancelOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderManagementApi();
$body = ; // CancelOrderInput | The request body containing information about the order being cancelled.
$id = id_example; // String | The order's id as defined in the marketaplce/fulfilment channel

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

my $api_instance = WWW::SwaggerClient::OrderManagementApi->new();
my $body = WWW::SwaggerClient::Object::CancelOrderInput->new(); # CancelOrderInput | The request body containing information about the order being cancelled.
my $id = id_example; # String | The order's id as defined in the marketaplce/fulfilment channel

eval { 
    $api_instance->cancelOrder(body => $body, id => $id);
};
if ($@) {
    warn "Exception when calling OrderManagementApi->cancelOrder: $@\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.OrderManagementApi()
body =  # CancelOrderInput | The request body containing information about the order being cancelled.
id = id_example # String | The order's id as defined in the marketaplce/fulfilment channel

try: 
    # Cancel order
    api_instance.cancel_order(body, id)
except ApiException as e:
    print("Exception when calling OrderManagementApi->cancelOrder: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The order's id as defined in the marketaplce/fulfilment channel
Required
Body parameters
Name Description
body *
{

This object is used as input when an adapter invokes the Amazon Yojaka Adapters API to indicate that an order that a seller is currently fulfiling has been cancelled by the marketplace/fulfilment channel.

Required: cancelLineItemsDetailsList,locationId,marketplaceAttributes,merchantId,orderId
locationId:
string

The id of the location of the seller whose order is being cancelled.

example: WSAA
merchantId:
string

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

marketplaceAttributes:
{

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

Required: channelName,marketplaceName
marketplaceName:
channelName:
}
orderId:
string

The id of the order being cancelled.

cancelLineItemDetailsList:
[ (1..∞)

A list of line items from the order which are being cancelled.

{
Required: cancelledQuantity,id,reason
id:
string

The id of the line item within the order which is being cancelled

reason:
string

The reason for the cancellation of the line item

Enum: CUSTOMER_CANCELLATION
cancelledQuantity:
integer (int32) minimum:1

The number of items from the line item in the order being cancelled.

}
]
}

Responses

Status: 200 - Success. The order cancellation has been accepted.

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

{

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.

}

createOrder

Create order

Create or drop an order from a marketplace/fulfilment channel into the Amazon Yojaka system for processing and fulfilment by a seller.


/orders

Usage and SDK Samples

curl -X POST "https://api.prod.dub.adapters.yojaka.xp.sellers.a2z.com/v1/orders"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderManagementApi;

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

public class OrderManagementApiExample {

    public static void main(String[] args) {
        
        OrderManagementApi apiInstance = new OrderManagementApi();
        CreateOrderInput body = ; // CreateOrderInput | The request body containing information about the order being dropped.
        try {
            apiInstance.createOrder(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderManagementApi#createOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderManagementApi;

public class OrderManagementApiExample {

    public static void main(String[] args) {
        OrderManagementApi apiInstance = new OrderManagementApi();
        CreateOrderInput body = ; // CreateOrderInput | The request body containing information about the order being dropped.
        try {
            apiInstance.createOrder(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderManagementApi#createOrder");
            e.printStackTrace();
        }
    }
}
CreateOrderInput *body = ; // The request body containing information about the order being dropped.

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

// Create order
[apiInstance createOrderWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiOrdersModel = require('amazon_yojaka_adapters_api_orders_model');

var api = new AmazonYojakaAdaptersApiOrdersModel.OrderManagementApi()
var body = ; // {{CreateOrderInput}} The request body containing information about the order being dropped.

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

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

            var apiInstance = new OrderManagementApi();
            var body = new CreateOrderInput(); // CreateOrderInput | The request body containing information about the order being dropped.

            try
            {
                // Create order
                apiInstance.createOrder(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderManagementApi.createOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderManagementApi();
$body = ; // CreateOrderInput | The request body containing information about the order being dropped.

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

my $api_instance = WWW::SwaggerClient::OrderManagementApi->new();
my $body = WWW::SwaggerClient::Object::CreateOrderInput->new(); # CreateOrderInput | The request body containing information about the order being dropped.

eval { 
    $api_instance->createOrder(body => $body);
};
if ($@) {
    warn "Exception when calling OrderManagementApi->createOrder: $@\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.OrderManagementApi()
body =  # CreateOrderInput | The request body containing information about the order being dropped.

try: 
    # Create order
    api_instance.create_order(body)
except ApiException as e:
    print("Exception when calling OrderManagementApi->createOrder: %s\n" % e)

Parameters

Body parameters
Name Description
body *
{

This object encapsulates all the data to be provided by an adapter to drop an order from a marketplace/fulfilment channel into the Amazon Yojaka product.

Required: lineItems,locationId,marketplaceAttributes,merchantId,orderId,paymentInfo,priority,shipmentId,shippingInfo
locationId:
string

The id of the location of the seller for which the order is being created in the Amazon Yojaka product. This is the id of the location as registered in the marketplace that the adapter works with.

example: WSAA
merchantId:
string

The id of the seller (merchant) for whom an order is being dropped. This is the id of the seller as registered in the marketplace that the adapter works with.

marketplaceAttributes:
{

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

Required: channelName,marketplaceName
marketplaceName:
channelName:
}
shipmentId:
string

The id of the shipment for the order being dropped as provided by the marketplace/fulfilment channel.

orderId:
string

The id of the order being dropped as provided by the marketplace/fulfilment channel.

priority:
boolean

A flag indicating if the seller should process this order as a "priority" order.

shippingInfo:
{

This field contains information required for the seller to ship the items in the order.

Required: expectedShippingTimestamp,expectedShippingTimestampV2
expectedShippingTimestamp:
expectedShippingTimestampV2:
shipToAddress:
}
lineItems:
[ (1..∞)

The line items in the order

{

Contains information about one line item in an order.

Required: giftAttributes,hazmatLabelRequired,id,numberOfUnits,serialNumberRequired,sku
id:
string

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

example: LI1
sku:
string

The 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.

hazmatLabelRequired:
boolean

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

example: true
hazmatLabelList:
[

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

string
]
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, serialNumber, shipToAddress
example: shipToAddress
type:
string

The type of encryption used

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

The charges associated with an order's line item.

{

Contains details of the Charge

Required: amount,name,type
type:
string

The type of charge. Examples include "product", "shipping", etc.

Enum: product, product_promotion, shipping, shipping_promotion, gift_wrap, gift_wrap_promotion, total, other
example: product
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:
{

Contains details of the Charge breakup

name:
string

Name of the tax element

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 rate, should use BigDecimal or equivalent.

breakup:
[

Contains details of the Charge breakup

{
Required: amount,name
name:
string

Name of the tax element

Enum: VAT, CST, IGST, SGST, CGST, UTGST, CESS, OTHER
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 rate, should use BigDecimal or equivalent.

}
]
}
}
]
}
]
orderType:
string

Type of the order

Enum: CUSTOMER, REPLACEMENT, EXCHANGE
orderPlacedTimestamp:
number

Epoch timestamp in milliseconds when the order was placed in the marketplace.

replacedOrderInfo:
{

Contains the details of the replaced order against which this order is created.

channelAttributes:
lineItems:
}
invoiceInfo:
{

Contains details of the invoice

Required: invoiceCreationTimestamp,invoiceId
invoiceId:
invoiceCreationTimestamp:
}
charges:
[

The details of the charges of the order

{

Contains details of the Charge

Required: amount,name,type
type:
string

The type of charge. Examples include "product", "shipping", etc.

Enum: product, product_promotion, shipping, shipping_promotion, gift_wrap, gift_wrap_promotion, total, other
example: product
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:
{

Contains details of the Charge breakup

name:
string

Name of the tax element

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 rate, should use BigDecimal or equivalent.

breakup:
[

Contains details of the Charge breakup

{
Required: amount,name
name:
string

Name of the tax element

Enum: VAT, CST, IGST, SGST, CGST, UTGST, CESS, OTHER
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 rate, should use BigDecimal or equivalent.

}
]
}
}
]
cancellationAllowedAfterSlam:
boolean

Flag to set if cancellation is allowed by the channel after order is packed.

customAttributes:
{

Any custom channel level attributes of the order

}
}

Responses

Status: 200 - Success. The order has been created.

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

{

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.

}

updateOrderStatusByKeyAttribute

This API can be used to update order status.

Use this API to change the order status in Amazon Yojaka.


/orders/status

Usage and SDK Samples

curl -X PUT "https://api.prod.dub.adapters.yojaka.xp.sellers.a2z.com/v1/orders/status?searchId=&type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderManagementApi;

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

public class OrderManagementApiExample {

    public static void main(String[] args) {
        
        OrderManagementApi apiInstance = new OrderManagementApi();
        UpdateOrderStatusByKeyAttributeInput body = ; // UpdateOrderStatusByKeyAttributeInput | The request body containing information about the order status update.
        String searchId = searchId_example; // String | Amazon Yojaka compatibe searchId (ShipmentId/TrackingId) to uniquely identify order.
        String type = type_example; // String | Type of searchId. Possible enum values are TRACKING_ID, SHIPMENT_ID .
        try {
            apiInstance.updateOrderStatusByKeyAttribute(body, searchId, type);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderManagementApi#updateOrderStatusByKeyAttribute");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderManagementApi;

public class OrderManagementApiExample {

    public static void main(String[] args) {
        OrderManagementApi apiInstance = new OrderManagementApi();
        UpdateOrderStatusByKeyAttributeInput body = ; // UpdateOrderStatusByKeyAttributeInput | The request body containing information about the order status update.
        String searchId = searchId_example; // String | Amazon Yojaka compatibe searchId (ShipmentId/TrackingId) to uniquely identify order.
        String type = type_example; // String | Type of searchId. Possible enum values are TRACKING_ID, SHIPMENT_ID .
        try {
            apiInstance.updateOrderStatusByKeyAttribute(body, searchId, type);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderManagementApi#updateOrderStatusByKeyAttribute");
            e.printStackTrace();
        }
    }
}
UpdateOrderStatusByKeyAttributeInput *body = ; // The request body containing information about the order status update.
String *searchId = searchId_example; // Amazon Yojaka compatibe searchId (ShipmentId/TrackingId) to uniquely identify order.
String *type = type_example; // Type of searchId. Possible enum values are TRACKING_ID, SHIPMENT_ID .

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

// This API can be used to update order status.
[apiInstance updateOrderStatusByKeyAttributeWith:body
    searchId:searchId
    type:type
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiOrdersModel = require('amazon_yojaka_adapters_api_orders_model');

var api = new AmazonYojakaAdaptersApiOrdersModel.OrderManagementApi()
var body = ; // {{UpdateOrderStatusByKeyAttributeInput}} The request body containing information about the order status update.
var searchId = searchId_example; // {{String}} Amazon Yojaka compatibe searchId (ShipmentId/TrackingId) to uniquely identify order.
var type = type_example; // {{String}} Type of searchId. Possible enum values are TRACKING_ID, SHIPMENT_ID .

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

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

            var apiInstance = new OrderManagementApi();
            var body = new UpdateOrderStatusByKeyAttributeInput(); // UpdateOrderStatusByKeyAttributeInput | The request body containing information about the order status update.
            var searchId = searchId_example;  // String | Amazon Yojaka compatibe searchId (ShipmentId/TrackingId) to uniquely identify order.
            var type = type_example;  // String | Type of searchId. Possible enum values are TRACKING_ID, SHIPMENT_ID .

            try
            {
                // This API can be used to update order status.
                apiInstance.updateOrderStatusByKeyAttribute(body, searchId, type);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderManagementApi.updateOrderStatusByKeyAttribute: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderManagementApi();
$body = ; // UpdateOrderStatusByKeyAttributeInput | The request body containing information about the order status update.
$searchId = searchId_example; // String | Amazon Yojaka compatibe searchId (ShipmentId/TrackingId) to uniquely identify order.
$type = type_example; // String | Type of searchId. Possible enum values are TRACKING_ID, SHIPMENT_ID .

try {
    $api_instance->updateOrderStatusByKeyAttribute($body, $searchId, $type);
} catch (Exception $e) {
    echo 'Exception when calling OrderManagementApi->updateOrderStatusByKeyAttribute: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderManagementApi;

my $api_instance = WWW::SwaggerClient::OrderManagementApi->new();
my $body = WWW::SwaggerClient::Object::UpdateOrderStatusByKeyAttributeInput->new(); # UpdateOrderStatusByKeyAttributeInput | The request body containing information about the order status update.
my $searchId = searchId_example; # String | Amazon Yojaka compatibe searchId (ShipmentId/TrackingId) to uniquely identify order.
my $type = type_example; # String | Type of searchId. Possible enum values are TRACKING_ID, SHIPMENT_ID .

eval { 
    $api_instance->updateOrderStatusByKeyAttribute(body => $body, searchId => $searchId, type => $type);
};
if ($@) {
    warn "Exception when calling OrderManagementApi->updateOrderStatusByKeyAttribute: $@\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.OrderManagementApi()
body =  # UpdateOrderStatusByKeyAttributeInput | The request body containing information about the order status update.
searchId = searchId_example # String | Amazon Yojaka compatibe searchId (ShipmentId/TrackingId) to uniquely identify order.
type = type_example # String | Type of searchId. Possible enum values are TRACKING_ID, SHIPMENT_ID .

try: 
    # This API can be used to update order status.
    api_instance.update_order_status_by_key_attribute(body, searchId, type)
except ApiException as e:
    print("Exception when calling OrderManagementApi->updateOrderStatusByKeyAttribute: %s\n" % e)

Parameters

Body parameters
Name Description
body *
{

This object is used as input when an adapter invokes the Amazon Yojaka Adapters API to change the order status.

Required: marketplaceAttributes,status
status:
string

status of the order.

Enum: SHIPPED, DELIVERED
example: SHIPPED
marketplaceAttributes:
{

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

Required: channelName,marketplaceName
marketplaceName:
channelName:
}
}
Query parameters
Name Description
searchId*
String
Amazon Yojaka compatibe searchId (ShipmentId/TrackingId) to uniquely identify order.
Required
type*
String
Type of searchId. Possible enum values are TRACKING_ID, SHIPMENT_ID .
Required

Responses

Status: 200 - Success. The order status update has been accepted.

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

{

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.

}