Amazon Yojaka Adapters API Returns Model

ReturnsManagement

createReturnItem

Create return

API to create a new return item in smart connect.


/returns

Usage and SDK Samples

curl -X POST "https://api.prod.dub.adapters.yojaka.xp.sellers.a2z.com/v1/returns"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReturnsManagementApi;

import java.io.File;
import java.util.*;

public class ReturnsManagementApiExample {

    public static void main(String[] args) {
        
        ReturnsManagementApi apiInstance = new ReturnsManagementApi();
        CreateReturnItemInput body = ; // CreateReturnItemInput | The request body containing information about the return being created.
        try {
            CreateReturnItemOutput result = apiInstance.createReturnItem(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnsManagementApi#createReturnItem");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReturnsManagementApi;

public class ReturnsManagementApiExample {

    public static void main(String[] args) {
        ReturnsManagementApi apiInstance = new ReturnsManagementApi();
        CreateReturnItemInput body = ; // CreateReturnItemInput | The request body containing information about the return being created.
        try {
            CreateReturnItemOutput result = apiInstance.createReturnItem(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnsManagementApi#createReturnItem");
            e.printStackTrace();
        }
    }
}
CreateReturnItemInput *body = ; // The request body containing information about the return being created.

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

// Create return
[apiInstance createReturnItemWith:body
              completionHandler: ^(CreateReturnItemOutput output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiReturnsModel = require('amazon_yojaka_adapters_api_returns_model');

var api = new AmazonYojakaAdaptersApiReturnsModel.ReturnsManagementApi()
var body = ; // {{CreateReturnItemInput}} The request body containing information about the return being created.

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createReturnItem(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ReturnsManagementApi();
            var body = new CreateReturnItemInput(); // CreateReturnItemInput | The request body containing information about the return being created.

            try
            {
                // Create return
                CreateReturnItemOutput result = apiInstance.createReturnItem(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnsManagementApi.createReturnItem: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiReturnsManagementApi();
$body = ; // CreateReturnItemInput | The request body containing information about the return being created.

try {
    $result = $api_instance->createReturnItem($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReturnsManagementApi->createReturnItem: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReturnsManagementApi;

my $api_instance = WWW::SwaggerClient::ReturnsManagementApi->new();
my $body = WWW::SwaggerClient::Object::CreateReturnItemInput->new(); # CreateReturnItemInput | The request body containing information about the return being created.

eval { 
    my $result = $api_instance->createReturnItem(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReturnsManagementApi->createReturnItem: $@\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.ReturnsManagementApi()
body =  # CreateReturnItemInput | The request body containing information about the return being created.

try: 
    # Create return
    api_response = api_instance.create_return_item(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReturnsManagementApi->createReturnItem: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success. The return has been created

Status: 400 - Bad request. One or more of the input parameters you have provided is invalid.

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

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


updateReturnByTrackingId

Update Return By the TrackingId

This API is used to update the return details


/returns/update

Usage and SDK Samples

curl -X PUT "https://api.prod.dub.adapters.yojaka.xp.sellers.a2z.com/v1/returns/update?trackingId="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReturnsManagementApi;

import java.io.File;
import java.util.*;

public class ReturnsManagementApiExample {

    public static void main(String[] args) {
        
        ReturnsManagementApi apiInstance = new ReturnsManagementApi();
        UpdateReturnByTrackingIdInput body = ; // UpdateReturnByTrackingIdInput | The request body containing information about the return being modified.
        String trackingId = trackingId_example; // String | The tracking Id of the return
        try {
            apiInstance.updateReturnByTrackingId(body, trackingId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnsManagementApi#updateReturnByTrackingId");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReturnsManagementApi;

public class ReturnsManagementApiExample {

    public static void main(String[] args) {
        ReturnsManagementApi apiInstance = new ReturnsManagementApi();
        UpdateReturnByTrackingIdInput body = ; // UpdateReturnByTrackingIdInput | The request body containing information about the return being modified.
        String trackingId = trackingId_example; // String | The tracking Id of the return
        try {
            apiInstance.updateReturnByTrackingId(body, trackingId);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReturnsManagementApi#updateReturnByTrackingId");
            e.printStackTrace();
        }
    }
}
UpdateReturnByTrackingIdInput *body = ; // The request body containing information about the return being modified.
String *trackingId = trackingId_example; // The tracking Id of the return

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

// Update Return By the TrackingId
[apiInstance updateReturnByTrackingIdWith:body
    trackingId:trackingId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaAdaptersApiReturnsModel = require('amazon_yojaka_adapters_api_returns_model');

var api = new AmazonYojakaAdaptersApiReturnsModel.ReturnsManagementApi()
var body = ; // {{UpdateReturnByTrackingIdInput}} The request body containing information about the return being modified.
var trackingId = trackingId_example; // {{String}} The tracking Id of the return

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateReturnByTrackingId(bodytrackingId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new ReturnsManagementApi();
            var body = new UpdateReturnByTrackingIdInput(); // UpdateReturnByTrackingIdInput | The request body containing information about the return being modified.
            var trackingId = trackingId_example;  // String | The tracking Id of the return

            try
            {
                // Update Return By the TrackingId
                apiInstance.updateReturnByTrackingId(body, trackingId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReturnsManagementApi.updateReturnByTrackingId: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiReturnsManagementApi();
$body = ; // UpdateReturnByTrackingIdInput | The request body containing information about the return being modified.
$trackingId = trackingId_example; // String | The tracking Id of the return

try {
    $api_instance->updateReturnByTrackingId($body, $trackingId);
} catch (Exception $e) {
    echo 'Exception when calling ReturnsManagementApi->updateReturnByTrackingId: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReturnsManagementApi;

my $api_instance = WWW::SwaggerClient::ReturnsManagementApi->new();
my $body = WWW::SwaggerClient::Object::UpdateReturnByTrackingIdInput->new(); # UpdateReturnByTrackingIdInput | The request body containing information about the return being modified.
my $trackingId = trackingId_example; # String | The tracking Id of the return

eval { 
    $api_instance->updateReturnByTrackingId(body => $body, trackingId => $trackingId);
};
if ($@) {
    warn "Exception when calling ReturnsManagementApi->updateReturnByTrackingId: $@\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.ReturnsManagementApi()
body =  # UpdateReturnByTrackingIdInput | The request body containing information about the return being modified.
trackingId = trackingId_example # String | The tracking Id of the return

try: 
    # Update Return By the TrackingId
    api_instance.update_return_by_tracking_id(body, trackingId)
except ApiException as e:
    print("Exception when calling ReturnsManagementApi->updateReturnByTrackingId: %s\n" % e)

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description
trackingId*
String
The tracking Id of the return
Required

Responses

Status: 200 - Success. The return was successfully updated.

Status: 400 - Bad request. One or more of the input parameters you have provided is invalid.

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

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