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 *

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.

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

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


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 *

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.

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

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


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

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

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