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