Amazon Yojaka API Prices Model

PriceManagement

updatePrice

Update price

### This API is deprecated. Please use [updateSkuAttributes](./sku.html) API for pricing updates. Update the price details of the given SKU, marketplaceName and channelName.


/skus/{sku}/prices

Usage and SDK Samples

curl -X PUT "https://api.sandbox.dub.yojaka.xp.sellers.a2z.com/v1/skus/{sku}/prices?marketplaceName=&channelname="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PriceManagementApi;

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

public class PriceManagementApiExample {

    public static void main(String[] args) {
        
        PriceManagementApi apiInstance = new PriceManagementApi();
        PriceDetails body = ; // PriceDetails | The request body indicting price details to be updated for the SKU
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace.
        String channelname = channelname_example; // String | The name of the channel within the marketplace (if applicable).
        String skuId = skuId_example; // String | The id of the SKU whose price details is being updated.
        try {
            apiInstance.updatePrice(body, xAmzAccessToken, marketplaceName, channelname, skuId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PriceManagementApi#updatePrice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PriceManagementApi;

public class PriceManagementApiExample {

    public static void main(String[] args) {
        PriceManagementApi apiInstance = new PriceManagementApi();
        PriceDetails body = ; // PriceDetails | The request body indicting price details to be updated for the SKU
        String xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
        String marketplaceName = marketplaceName_example; // String | The name of the marketplace.
        String channelname = channelname_example; // String | The name of the channel within the marketplace (if applicable).
        String skuId = skuId_example; // String | The id of the SKU whose price details is being updated.
        try {
            apiInstance.updatePrice(body, xAmzAccessToken, marketplaceName, channelname, skuId);
        } catch (ApiException e) {
            System.err.println("Exception when calling PriceManagementApi#updatePrice");
            e.printStackTrace();
        }
    }
}
PriceDetails *body = ; // The request body indicting price details to be updated for the SKU
String *xAmzAccessToken = xAmzAccessToken_example; // The LWA access token for authorizing the request
String *marketplaceName = marketplaceName_example; // The name of the marketplace.
String *channelname = channelname_example; // The name of the channel within the marketplace (if applicable).
String *skuId = skuId_example; // The id of the SKU whose price details is being updated.

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

// Update price
[apiInstance updatePriceWith:body
    xAmzAccessToken:xAmzAccessToken
    marketplaceName:marketplaceName
    channelname:channelname
    skuId:skuId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var AmazonYojakaApiPricesModel = require('amazon_yojaka_api_prices_model');

var api = new AmazonYojakaApiPricesModel.PriceManagementApi()
var body = ; // {{PriceDetails}} The request body indicting price details to be updated for the SKU
var xAmzAccessToken = xAmzAccessToken_example; // {{String}} The LWA access token for authorizing the request
var marketplaceName = marketplaceName_example; // {{String}} The name of the marketplace.
var channelname = channelname_example; // {{String}} The name of the channel within the marketplace (if applicable).
var skuId = skuId_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.');
  }
};
api.updatePrice(bodyxAmzAccessTokenmarketplaceNamechannelnameskuId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new PriceManagementApi();
            var body = new PriceDetails(); // PriceDetails | The request body indicting price details to be updated for the SKU
            var xAmzAccessToken = xAmzAccessToken_example;  // String | The LWA access token for authorizing the request
            var marketplaceName = marketplaceName_example;  // String | The name of the marketplace.
            var channelname = channelname_example;  // String | The name of the channel within the marketplace (if applicable).
            var skuId = skuId_example;  // String | The id of the SKU whose price details is being updated.

            try
            {
                // Update price
                apiInstance.updatePrice(body, xAmzAccessToken, marketplaceName, channelname, skuId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PriceManagementApi.updatePrice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiPriceManagementApi();
$body = ; // PriceDetails | The request body indicting price details to be updated for the SKU
$xAmzAccessToken = xAmzAccessToken_example; // String | The LWA access token for authorizing the request
$marketplaceName = marketplaceName_example; // String | The name of the marketplace.
$channelname = channelname_example; // String | The name of the channel within the marketplace (if applicable).
$skuId = skuId_example; // String | The id of the SKU whose price details is being updated.

try {
    $api_instance->updatePrice($body, $xAmzAccessToken, $marketplaceName, $channelname, $skuId);
} catch (Exception $e) {
    echo 'Exception when calling PriceManagementApi->updatePrice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PriceManagementApi;

my $api_instance = WWW::SwaggerClient::PriceManagementApi->new();
my $body = WWW::SwaggerClient::Object::PriceDetails->new(); # PriceDetails | The request body indicting price details to be updated for the SKU
my $xAmzAccessToken = xAmzAccessToken_example; # String | The LWA access token for authorizing the request
my $marketplaceName = marketplaceName_example; # String | The name of the marketplace.
my $channelname = channelname_example; # String | The name of the channel within the marketplace (if applicable).
my $skuId = skuId_example; # String | The id of the SKU whose price details is being updated.

eval { 
    $api_instance->updatePrice(body => $body, xAmzAccessToken => $xAmzAccessToken, marketplaceName => $marketplaceName, channelname => $channelname, skuId => $skuId);
};
if ($@) {
    warn "Exception when calling PriceManagementApi->updatePrice: $@\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.PriceManagementApi()
body =  # PriceDetails | The request body indicting price details to be updated for the SKU
xAmzAccessToken = xAmzAccessToken_example # String | The LWA access token for authorizing the request
marketplaceName = marketplaceName_example # String | The name of the marketplace.
channelname = channelname_example # String | The name of the channel within the marketplace (if applicable).
skuId = skuId_example # String | The id of the SKU whose price details is being updated.

try: 
    # Update price
    api_instance.update_price(body, xAmzAccessToken, marketplaceName, channelname, skuId)
except ApiException as e:
    print("Exception when calling PriceManagementApi->updatePrice: %s\n" % e)

Parameters

Path parameters
Name Description
skuId*
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
marketplaceName*
String
The name of the marketplace.
Required
channelname*
String
The name of the channel within the marketplace (if applicable).
Required

Responses

Status: 204 - 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.