Amazon Yojaka API Returns Model

ReturnsListingRetrieval

getReturn

Returns a single return

Use this API to retrieve complete details about a single return, given the return's id.


/returns/{id}

Usage and SDK Samples

curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/returns/{id}"
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 id = id_example; // String | The return's Amazon Yojaka assigned id.
        try {
            ReturnItem result = apiInstance.getReturn(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnsListingRetrievalApi#getReturn");
            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 id = id_example; // String | The return's Amazon Yojaka assigned id.
        try {
            ReturnItem result = apiInstance.getReturn(xAmzAccessToken, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnsListingRetrievalApi#getReturn");
            e.printStackTrace();
        }
    }
}
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *id = id_example; // The return's Amazon Yojaka assigned id.

ReturnsListingRetrievalApi *apiInstance = [[ReturnsListingRetrievalApi alloc] init];

// Returns a single return
[apiInstance getReturnWith:xAmzAccessToken
    id:id
              completionHandler: ^(ReturnItem 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 id = id_example; // {{String}} The return'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.getReturn(xAmzAccessToken, id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getReturnExample
    {
        public void main()
        {

            var apiInstance = new ReturnsListingRetrievalApi();
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var id = id_example;  // String | The return's Amazon Yojaka assigned id.

            try
            {
                // Returns a single return
                ReturnItem result = apiInstance.getReturn(xAmzAccessToken, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnsListingRetrievalApi.getReturn: " + 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
$id = id_example; // String | The return's Amazon Yojaka assigned id.

try {
    $result = $api_instance->getReturn($xAmzAccessToken, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReturnsListingRetrievalApi->getReturn: ', $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 $id = id_example; # String | The return's Amazon Yojaka assigned id.

eval { 
    my $result = $api_instance->getReturn(xAmzAccessToken => $xAmzAccessToken, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReturnsListingRetrievalApi->getReturn: $@\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
id = id_example # String | The return's Amazon Yojaka assigned id.

try: 
    # Returns a single return
    api_response = api_instance.get_return(xAmzAccessToken, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReturnsListingRetrievalApi->getReturn: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The return's Amazon Yojaka assigned id.
Required
Header parameters
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 return.

Status: 400 - Bad request. The response contains the error details.

Status: 401 - Unauthorized. You are not authorized to invoke this API for the given parameters.

Status: 404 - Not found. The specified return id is not found.

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

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


listReturns

Returns a list of active/open returns

Invoke this API to get a list of returns. This API returns data in pages.


/returns

Usage and SDK Samples

curl -X GET "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/returns?returnLocationId=&returnStatus=&fromTimestamp=&toTimestamp=&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 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 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 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, 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 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 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 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, 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 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 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 *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
    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 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 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.
  '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 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 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 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, 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 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 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.
$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, $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 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 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 $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, 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 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 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)
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, cursor=cursor, maxResults=maxResults)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReturnsListingRetrievalApi->listReturns: %s\n" % e)

Parameters

Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Query parameters
Name Description
returnLocationId
String
The location id for which returns need to be listed.
returnStatus
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
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.
toTimestamp
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.
cursor
String
The cursor value returned from a previous call to list returns. Use this to retrieve the next page of returns.
maxResults
Integer
Specify the maximum number of returns that are to be returned in the response. If omitted, this parameter defaults to 10.

Responses

Status: 200 - Success. The response contains a list of returns.

Status: 400 - Bad request. The response contains the error details.

Status: 401 - Unauthorized. You are not authorized to invoke this API for the given parameters.

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

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