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
Name | Description |
---|---|
id* |
String
The order's Amazon Yojaka assigned id.
Required
|
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.
Metadata about the order.
This field contains the details of the original order, if the orderType is either "REPLACEMENT" or "EXCHANGE".
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.
Invoice related information for the order dropped to Amazon SmartConnect.
The charges associated with the order. The charge amount does not include the tax amount.
Represents an order's charges with relevant tax information.
The tax details associated with a charge.
Marketplace specific attributes about the order.
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.
The line items in the order
Contains information about one line item in an order.
The serial number(s) for each item in this line item. This data is transmitted encrypted.
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.
A list of HAZMAT label identifiers that are to be applied on the packages for this line item.
This object provides details about the flags required for the batchAttributes of a lineItem.
This object provides details about any gift wrapping of this line item alongwith all relevant details
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.
The tax details associated with a charge.
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.
Information about how the packages in the order are to be shipped.
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.
This type describes dimensions for a packages.
An object to represent a dimension (length/width/height) of a package.
An object to represent a dimension (length/width/height) of a package.
An object to represent a dimension (length/width/height) of a package.
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.
A list of packages.
This type describes a package that is created to ship one or more of an order's line items.
An object to represent a dimension (length/width/height) of a package.
An object to represent a dimension (length/width/height) of a package.
An object to represent a dimension (length/width/height) of a package.
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.
The order's line items (or a sub-set of them) that are packed into a particular package
The order's line items that are in a particular package. Only the line item's id is required.
The maximum retail price of a particular line item of the order that are in a particular package. Only applicable for pharmacy orders.
The encrypted list of serial numbers of items in the package, if required to be provided for the items in the package
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.
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.
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.
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.
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.