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
Name | Description |
---|---|
id* |
String
The order's id as defined in the marketaplce/fulfilment channel
Required
|
Name | Description |
---|---|
body * |