Amazon Yojaka API SKU Model

SkuAttributeManagement

updateSkuAttribute

Update sku attribute

Update the price details of the given SKU, marketplaceName and channelName.


/skus/{id}/sku-attribute

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/skus/{id}/sku-attribute?marketplace=&marketplaceRegion=&channelName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SkuAttributeManagementApi;

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

public class SkuAttributeManagementApiExample {

    public static void main(String[] args) {
        
        SkuAttributeManagementApi apiInstance = new SkuAttributeManagementApi();
        UpdateSkuAttributeInput body = ; // UpdateSkuAttributeInput | The request body indicating sku details to be updated.
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String marketplace = marketplace_example; // String | The name of the marketplace.
        String marketplaceRegion = marketplaceRegion_example; // String | The region of the marketplace.
        String channelName = channelName_example; // String | The name of the channel within the marketplace (if applicable).
        String id = id_example; // String | The id of the SKU whose price details is being updated.
        try {
            UpdateSkuAttributeOutput result = apiInstance.updateSkuAttribute(body, xAmzAccessToken, marketplace, marketplaceRegion, channelName, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SkuAttributeManagementApi#updateSkuAttribute");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SkuAttributeManagementApi;

public class SkuAttributeManagementApiExample {

    public static void main(String[] args) {
        SkuAttributeManagementApi apiInstance = new SkuAttributeManagementApi();
        UpdateSkuAttributeInput body = ; // UpdateSkuAttributeInput | The request body indicating sku details to be updated.
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String marketplace = marketplace_example; // String | The name of the marketplace.
        String marketplaceRegion = marketplaceRegion_example; // String | The region of the marketplace.
        String channelName = channelName_example; // String | The name of the channel within the marketplace (if applicable).
        String id = id_example; // String | The id of the SKU whose price details is being updated.
        try {
            UpdateSkuAttributeOutput result = apiInstance.updateSkuAttribute(body, xAmzAccessToken, marketplace, marketplaceRegion, channelName, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SkuAttributeManagementApi#updateSkuAttribute");
            e.printStackTrace();
        }
    }
}
UpdateSkuAttributeInput *body = ; // The request body indicating sku details to be updated.
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *marketplace = marketplace_example; // The name of the marketplace. (default to AMAZON)
String *marketplaceRegion = marketplaceRegion_example; // The region of the marketplace. (default to IN)
String *channelName = channelName_example; // The name of the channel within the marketplace (if applicable). (default to FBA)
String *id = id_example; // The id of the SKU whose price details is being updated.

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

// Update sku attribute
[apiInstance updateSkuAttributeWith:body
    xAmzAccessToken:xAmzAccessToken
    marketplace:marketplace
    marketplaceRegion:marketplaceRegion
    channelName:channelName
    id:id
              completionHandler: ^(UpdateSkuAttributeOutput output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiSkuModel = require('amazon_yojaka_api_sku_model');

var api = new AmazonYojakaApiSkuModel.SkuAttributeManagementApi()
var body = ; // {{UpdateSkuAttributeInput}} The request body indicating sku details to be updated.
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var marketplace = marketplace_example; // {{String}} The name of the marketplace.
var marketplaceRegion = marketplaceRegion_example; // {{String}} The region of the marketplace.
var channelName = channelName_example; // {{String}} The name of the channel within the marketplace (if applicable).
var id = id_example; // {{String}} The id of the SKU whose price details is being updated.

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

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

            var apiInstance = new SkuAttributeManagementApi();
            var body = new UpdateSkuAttributeInput(); // UpdateSkuAttributeInput | The request body indicating sku details to be updated.
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var marketplace = marketplace_example;  // String | The name of the marketplace. (default to AMAZON)
            var marketplaceRegion = marketplaceRegion_example;  // String | The region of the marketplace. (default to IN)
            var channelName = channelName_example;  // String | The name of the channel within the marketplace (if applicable). (default to FBA)
            var id = id_example;  // String | The id of the SKU whose price details is being updated.

            try
            {
                // Update sku attribute
                UpdateSkuAttributeOutput result = apiInstance.updateSkuAttribute(body, xAmzAccessToken, marketplace, marketplaceRegion, channelName, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SkuAttributeManagementApi.updateSkuAttribute: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiSkuAttributeManagementApi();
$body = ; // UpdateSkuAttributeInput | The request body indicating sku details to be updated.
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$marketplace = marketplace_example; // String | The name of the marketplace.
$marketplaceRegion = marketplaceRegion_example; // String | The region of the marketplace.
$channelName = channelName_example; // String | The name of the channel within the marketplace (if applicable).
$id = id_example; // String | The id of the SKU whose price details is being updated.

try {
    $result = $api_instance->updateSkuAttribute($body, $xAmzAccessToken, $marketplace, $marketplaceRegion, $channelName, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SkuAttributeManagementApi->updateSkuAttribute: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SkuAttributeManagementApi;

my $api_instance = WWW::SwaggerClient::SkuAttributeManagementApi->new();
my $body = WWW::SwaggerClient::Object::UpdateSkuAttributeInput->new(); # UpdateSkuAttributeInput | The request body indicating sku details to be updated.
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $marketplace = marketplace_example; # String | The name of the marketplace.
my $marketplaceRegion = marketplaceRegion_example; # String | The region of the marketplace.
my $channelName = channelName_example; # String | The name of the channel within the marketplace (if applicable).
my $id = id_example; # String | The id of the SKU whose price details is being updated.

eval { 
    my $result = $api_instance->updateSkuAttribute(body => $body, xAmzAccessToken => $xAmzAccessToken, marketplace => $marketplace, marketplaceRegion => $marketplaceRegion, channelName => $channelName, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SkuAttributeManagementApi->updateSkuAttribute: $@\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.SkuAttributeManagementApi()
body =  # UpdateSkuAttributeInput | The request body indicating sku details to be updated.
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
marketplace = marketplace_example # String | The name of the marketplace. (default to AMAZON)
marketplaceRegion = marketplaceRegion_example # String | The region of the marketplace. (default to IN)
channelName = channelName_example # String | The name of the channel within the marketplace (if applicable). (default to FBA)
id = id_example # String | The id of the SKU whose price details is being updated.

try: 
    # Update sku attribute
    api_response = api_instance.update_sku_attribute(body, xAmzAccessToken, marketplace, marketplaceRegion, channelName, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SkuAttributeManagementApi->updateSkuAttribute: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
The id of the SKU whose price details is being updated.
Required
Header parameters
Name Description
X-Amz-Access-Token*
String
The LWA access token for authorizing the request
Required
Body parameters
Name Description
body *
Query parameters
Name Description
marketplace*
String
The name of the marketplace.
Required
marketplaceRegion*
String
The region of the marketplace.
Required
channelName*
String
The name of the channel within the marketplace (if applicable).
Required

Responses

Status: 200 - Success.

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

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

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

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