Invoke this API to get a list of returns. This API returns data in pages.
curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/returns?returnLocationId=&returnStatus=&fromTimestamp=&toTimestamp=&lastUpdatedFrom=&lastUpdatedTo=&reverseTrackingId=&cursor=&maxResults="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReturnsListingRetrievalApi;
import java.io.File;
import java.util.*;
public class ReturnsListingRetrievalApiExample {
public static void main(String[] args) {
ReturnsListingRetrievalApi apiInstance = new ReturnsListingRetrievalApi();
String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
String returnLocationId = returnLocationId_example; // String | The location id for which returns need to be listed.
String returnStatus = returnStatus_example; // String | Use this parameter to filter returns in a particular state. A use-case would be to fetch all new
returns from Amazon Yojaka using the CUSTOMER_CANCELLED_PICK_UP returnStatus.
String fromTimestamp = fromTimestamp_example; // String | Use this parameter to filter returns whose creation 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 returns whose creation 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 lastUpdatedFrom = lastUpdatedFrom_example; // String | Use this parameter to filter returns 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 lastUpdatedTo = lastUpdatedTo_example; // String | Use this parameter to filter returns 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 reverseTrackingId = reverseTrackingId_example; // String | Use this parameter to filter returns based on the reverse tracking id.
**Note:** The maxResults parameter has no impact when using with reverseTrackingId.
String cursor = cursor_example; // String | The cursor value returned from a previous call to list returns. Use this to retrieve the next page of returns.
Integer maxResults = 56; // Integer | Specify the maximum number of returns that are to be returned in the response. If omitted, this parameter defaults to 10.
try {
ListReturnsOutput result = apiInstance.listReturns(xAmzAccessToken, returnLocationId, returnStatus, fromTimestamp, toTimestamp, lastUpdatedFrom, lastUpdatedTo, reverseTrackingId, cursor, maxResults);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReturnsListingRetrievalApi#listReturns");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ReturnsListingRetrievalApi;
public class ReturnsListingRetrievalApiExample {
public static void main(String[] args) {
ReturnsListingRetrievalApi apiInstance = new ReturnsListingRetrievalApi();
String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
String returnLocationId = returnLocationId_example; // String | The location id for which returns need to be listed.
String returnStatus = returnStatus_example; // String | Use this parameter to filter returns in a particular state. A use-case would be to fetch all new
returns from Amazon Yojaka using the CUSTOMER_CANCELLED_PICK_UP returnStatus.
String fromTimestamp = fromTimestamp_example; // String | Use this parameter to filter returns whose creation 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 returns whose creation 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 lastUpdatedFrom = lastUpdatedFrom_example; // String | Use this parameter to filter returns 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 lastUpdatedTo = lastUpdatedTo_example; // String | Use this parameter to filter returns 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 reverseTrackingId = reverseTrackingId_example; // String | Use this parameter to filter returns based on the reverse tracking id.
**Note:** The maxResults parameter has no impact when using with reverseTrackingId.
String cursor = cursor_example; // String | The cursor value returned from a previous call to list returns. Use this to retrieve the next page of returns.
Integer maxResults = 56; // Integer | Specify the maximum number of returns that are to be returned in the response. If omitted, this parameter defaults to 10.
try {
ListReturnsOutput result = apiInstance.listReturns(xAmzAccessToken, returnLocationId, returnStatus, fromTimestamp, toTimestamp, lastUpdatedFrom, lastUpdatedTo, reverseTrackingId, cursor, maxResults);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReturnsListingRetrievalApi#listReturns");
e.printStackTrace();
}
}
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *returnLocationId = returnLocationId_example; // The location id for which returns need to be listed. (optional)
String *returnStatus = returnStatus_example; // Use this parameter to filter returns in a particular state. A use-case would be to fetch all new
returns from Amazon Yojaka using the CUSTOMER_CANCELLED_PICK_UP returnStatus.
(optional)
String *fromTimestamp = fromTimestamp_example; // Use this parameter to filter returns whose creation 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 returns whose creation 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 *lastUpdatedFrom = lastUpdatedFrom_example; // Use this parameter to filter returns 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 *lastUpdatedTo = lastUpdatedTo_example; // Use this parameter to filter returns 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 *reverseTrackingId = reverseTrackingId_example; // Use this parameter to filter returns based on the reverse tracking id.
**Note:** The maxResults parameter has no impact when using with reverseTrackingId.
(optional)
String *cursor = cursor_example; // The cursor value returned from a previous call to list returns. Use this to retrieve the next page of returns. (optional)
Integer *maxResults = 56; // Specify the maximum number of returns that are to be returned in the response. If omitted, this parameter defaults to 10. (optional)
ReturnsListingRetrievalApi *apiInstance = [[ReturnsListingRetrievalApi alloc] init];
// Returns a list of active/open returns
[apiInstance listReturnsWith:xAmzAccessToken
returnLocationId:returnLocationId
returnStatus:returnStatus
fromTimestamp:fromTimestamp
toTimestamp:toTimestamp
lastUpdatedFrom:lastUpdatedFrom
lastUpdatedTo:lastUpdatedTo
reverseTrackingId:reverseTrackingId
cursor:cursor
maxResults:maxResults
completionHandler: ^(ListReturnsOutput output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var AmazonYojakaApiReturnsModel = require('amazon_yojaka_api_returns_model');
var api = new AmazonYojakaApiReturnsModel.ReturnsListingRetrievalApi()
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var opts = {
'returnLocationId': returnLocationId_example, // {{String}} The location id for which returns need to be listed.
'returnStatus': returnStatus_example, // {{String}} Use this parameter to filter returns in a particular state. A use-case would be to fetch all new
returns from Amazon Yojaka using the CUSTOMER_CANCELLED_PICK_UP returnStatus.
'fromTimestamp': fromTimestamp_example, // {{String}} Use this parameter to filter returns whose creation 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 returns whose creation in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
'lastUpdatedFrom': lastUpdatedFrom_example, // {{String}} Use this parameter to filter returns 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.
'lastUpdatedTo': lastUpdatedTo_example, // {{String}} Use this parameter to filter returns 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.
'reverseTrackingId': reverseTrackingId_example, // {{String}} Use this parameter to filter returns based on the reverse tracking id.
**Note:** The maxResults parameter has no impact when using with reverseTrackingId.
'cursor': cursor_example, // {{String}} The cursor value returned from a previous call to list returns. Use this to retrieve the next page of returns.
'maxResults': 56 // {{Integer}} Specify the maximum number of returns 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.listReturns(xAmzAccessToken, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class listReturnsExample
{
public void main()
{
var apiInstance = new ReturnsListingRetrievalApi();
var xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
var returnLocationId = returnLocationId_example; // String | The location id for which returns need to be listed. (optional)
var returnStatus = returnStatus_example; // String | Use this parameter to filter returns in a particular state. A use-case would be to fetch all new
returns from Amazon Yojaka using the CUSTOMER_CANCELLED_PICK_UP returnStatus.
(optional)
var fromTimestamp = fromTimestamp_example; // String | Use this parameter to filter returns whose creation 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 returns whose creation 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 lastUpdatedFrom = lastUpdatedFrom_example; // String | Use this parameter to filter returns 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 lastUpdatedTo = lastUpdatedTo_example; // String | Use this parameter to filter returns 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 reverseTrackingId = reverseTrackingId_example; // String | Use this parameter to filter returns based on the reverse tracking id.
**Note:** The maxResults parameter has no impact when using with reverseTrackingId.
(optional)
var cursor = cursor_example; // String | The cursor value returned from a previous call to list returns. Use this to retrieve the next page of returns. (optional)
var maxResults = 56; // Integer | Specify the maximum number of returns that are to be returned in the response. If omitted, this parameter defaults to 10. (optional)
try
{
// Returns a list of active/open returns
ListReturnsOutput result = apiInstance.listReturns(xAmzAccessToken, returnLocationId, returnStatus, fromTimestamp, toTimestamp, lastUpdatedFrom, lastUpdatedTo, reverseTrackingId, cursor, maxResults);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ReturnsListingRetrievalApi.listReturns: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiReturnsListingRetrievalApi();
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$returnLocationId = returnLocationId_example; // String | The location id for which returns need to be listed.
$returnStatus = returnStatus_example; // String | Use this parameter to filter returns in a particular state. A use-case would be to fetch all new
returns from Amazon Yojaka using the CUSTOMER_CANCELLED_PICK_UP returnStatus.
$fromTimestamp = fromTimestamp_example; // String | Use this parameter to filter returns whose creation 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 returns whose creation in Amazon Yojaka is before a particular date/time. The value is specified as the number of milliseconds since epoch in the UTC timezone.
$lastUpdatedFrom = lastUpdatedFrom_example; // String | Use this parameter to filter returns 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.
$lastUpdatedTo = lastUpdatedTo_example; // String | Use this parameter to filter returns 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.
$reverseTrackingId = reverseTrackingId_example; // String | Use this parameter to filter returns based on the reverse tracking id.
**Note:** The maxResults parameter has no impact when using with reverseTrackingId.
$cursor = cursor_example; // String | The cursor value returned from a previous call to list returns. Use this to retrieve the next page of returns.
$maxResults = 56; // Integer | Specify the maximum number of returns that are to be returned in the response. If omitted, this parameter defaults to 10.
try {
$result = $api_instance->listReturns($xAmzAccessToken, $returnLocationId, $returnStatus, $fromTimestamp, $toTimestamp, $lastUpdatedFrom, $lastUpdatedTo, $reverseTrackingId, $cursor, $maxResults);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReturnsListingRetrievalApi->listReturns: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReturnsListingRetrievalApi;
my $api_instance = WWW::SwaggerClient::ReturnsListingRetrievalApi->new();
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $returnLocationId = returnLocationId_example; # String | The location id for which returns need to be listed.
my $returnStatus = returnStatus_example; # String | Use this parameter to filter returns in a particular state. A use-case would be to fetch all new
returns from Amazon Yojaka using the CUSTOMER_CANCELLED_PICK_UP returnStatus.
my $fromTimestamp = fromTimestamp_example; # String | Use this parameter to filter returns whose creation 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 returns whose creation 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 $lastUpdatedFrom = lastUpdatedFrom_example; # String | Use this parameter to filter returns 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 $lastUpdatedTo = lastUpdatedTo_example; # String | Use this parameter to filter returns 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 $reverseTrackingId = reverseTrackingId_example; # String | Use this parameter to filter returns based on the reverse tracking id.
**Note:** The maxResults parameter has no impact when using with reverseTrackingId.
my $cursor = cursor_example; # String | The cursor value returned from a previous call to list returns. Use this to retrieve the next page of returns.
my $maxResults = 56; # Integer | Specify the maximum number of returns that are to be returned in the response. If omitted, this parameter defaults to 10.
eval {
my $result = $api_instance->listReturns(xAmzAccessToken => $xAmzAccessToken, returnLocationId => $returnLocationId, returnStatus => $returnStatus, fromTimestamp => $fromTimestamp, toTimestamp => $toTimestamp, lastUpdatedFrom => $lastUpdatedFrom, lastUpdatedTo => $lastUpdatedTo, reverseTrackingId => $reverseTrackingId, cursor => $cursor, maxResults => $maxResults);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ReturnsListingRetrievalApi->listReturns: $@\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.ReturnsListingRetrievalApi()
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
returnLocationId = returnLocationId_example # String | The location id for which returns need to be listed. (optional)
returnStatus = returnStatus_example # String | Use this parameter to filter returns in a particular state. A use-case would be to fetch all new
returns from Amazon Yojaka using the CUSTOMER_CANCELLED_PICK_UP returnStatus.
(optional)
fromTimestamp = fromTimestamp_example # String | Use this parameter to filter returns whose creation 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 returns whose creation 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)
lastUpdatedFrom = lastUpdatedFrom_example # String | Use this parameter to filter returns 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)
lastUpdatedTo = lastUpdatedTo_example # String | Use this parameter to filter returns 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)
reverseTrackingId = reverseTrackingId_example # String | Use this parameter to filter returns based on the reverse tracking id.
**Note:** The maxResults parameter has no impact when using with reverseTrackingId.
(optional)
cursor = cursor_example # String | The cursor value returned from a previous call to list returns. Use this to retrieve the next page of returns. (optional)
maxResults = 56 # Integer | Specify the maximum number of returns that are to be returned in the response. If omitted, this parameter defaults to 10. (optional)
try:
# Returns a list of active/open returns
api_response = api_instance.list_returns(xAmzAccessToken, returnLocationId=returnLocationId, returnStatus=returnStatus, fromTimestamp=fromTimestamp, toTimestamp=toTimestamp, lastUpdatedFrom=lastUpdatedFrom, lastUpdatedTo=lastUpdatedTo, reverseTrackingId=reverseTrackingId, cursor=cursor, maxResults=maxResults)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReturnsListingRetrievalApi->listReturns: %s\n" % e)