ODBC Driver for Amazon Marketplace

Build 24.0.9060

SubmitOrderAdjustmentFeed

The Order Adjustment feed allows you to issue a refund (adjustment) for an order. You must provide a reason for the adjustment, such as Customer Return, and the adjustment amount, broken down by price component (principle, shipping, tax, and so on).

Execute

The stored procedure accepts two aggregated formats: #TEMP tables and XML aggregate

For #TEMP tables

You must include in your query:

INSERT INTO ItemPriceAdjustmentsAggregate#TEMP (ItemPriceAdjustmentsComponentType, ItemPriceAdjustmentsComponentAmount, ItemPriceAdjustmentsComponentAmountCurrency) VALUES ('Shipping', '150', 'JPY')

INSERT INTO AdjustedItemAggregate#TEMP (AdjustedItemAmazonOrderItemCode, AdjustedItemAdjustmentReason, ItemPriceAdjustmentsAggregate) VALUES ('25959136016214', 'CustomerReturn', 'ItemPriceAdjustmentsAggregate#TEMP')

INSERT INTO OrderAdjustmentFeedAggregate#TEMP (AmazonOrderID, OperationType, AdjustedItemAggregate) VALUES ('503-0717426-9080645', 'Update', 'AdjustedItemAggregate#TEMP')

Then you execute the procedure by specifying the value of OrderAdjustmentFeedAggregate with the name of #TEMP table used OrderAdjustmentFeedAggregate#TEMP.

EXEC SubmitOrderAdjustmentFeed OrderAdjustmentFeedAggregate = 'OrderAdjustmentFeedAggregate#TEMP', marketplaceids = 'A1VC38T7YXB528'

*The temporary table must be defined and used within the same connection. Closing the connection will clear out any temporary tables in memory.

For XML aggregate

The XML aggregate must follow the API structure (https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_4_1/OrderAdjustment.xsd):

    <Message>
        <MessageID>1</MessageID>
        <OperationType>Update</OperationType>
        <OrderAdjustment>
          <AmazonOrderID>503-0717426-9080645</AmazonOrderID>
          <AdjustedItem>
            <AmazonOrderItemCode>25959136016214</AmazonOrderItemCode>
            <AdjustmentReason>CustomerReturn</AdjustmentReason>
            <ItemPriceAdjustments>
              <Component>
                <Type>Shipping</Type>
                <Amount currency="JPY">150</Amount>
              </Component>
            </ItemPriceAdjustments>
          </AdjustedItem>
        </OrderAdjustment>
    </Message>

EXEC SubmitOrderAdjustmentFeed OrderAdjustmentFeedAggregate = '...(the above XML)...', marketplaceids = 'A1VC38T7YXB528'

Input

Name Type Required Description
AmazonOrderID String False Amazon's unique identifier for an order, which identifies the entire order regardless of the number of individual items in the order.
OperationType String False Required if AdjustedItemAggregate is empty. Used to specify the type of operation (Update or Delete) to be performed on the data.
MerchantOrderID String False Optional seller-supplied order ID. The first step is to establish the MerchantOrderID in the acknowledgment feed. Amazon will map the MerchantOrderID to the AmazonOrderID, and you can then use your own order ID (MerchantOrderID) for subsequent feeds relating to that order. See the base XSD for the definition.
AdjustedItemQuantityCancelled Integer False Quantity of items being canceled. Used only for partial cancellations.
AdjustedItemAmazonOrderItemCode String False Amazon's unique ID for an item in an order.
AdjustedItemMerchantOrderItemID String False Optional seller-supplied ID for an item in an order. It can be used in order processing if the pairing was established in the acknowledgment feed.
AdjustedItemMerchantAdjustmentItemID String False Optional seller-supplied unique ID for the adjustment (not used by Amazon).
AdjustedItemAdjustmentReason String False Reason for the adjustment.
ItemPriceAdjustmentsComponentType String False The Type of price adjustment for the item. Values include: Principal, Shipping, Tax, ShippingTax, RestockingFee, RestockingFeeTax, GiftWrap, GiftWrapTax, Surcharge, ReturnShipping, Goodwill, ExportCharge, COD, CODTax, Other, FreeReplacementReturnShipping
ItemPriceAdjustmentsComponentAmount Decimal False The Amount of the adjustment.
ItemPriceAdjustmentsComponentAmountCurrency String False The Currency for the Amount.
ItemPriceAdjustmentsAggregate String False An aggregate representing the Amount the buyer is to be refunded for the item. Can be in the form of XML, JSON, or a #TEMP table. Use this field if multiple item price adjustments need to be applied.
PromotionAdjustmentsPromotionClaimCode String False The ClaimCode for the Promotion Adjustment.
PromotionAdjustmentsMerchantPromotionID String False The Promotion Id for the Promotion Adjustment.
PromotionAdjustmentsComponentType String False The Type of price adjustment for the promotion.
PromotionAdjustmentsComponentAmount Decimal False The Amount of price adjustment for the promotion.
PromotionAdjustmentsComponentAmountCurrency String False The Currency for the Amount.
PromotionAdjustmentsComponentAggregate String False An aggregate representing the Amount the buyer is to be refunded for the promotion, broken down by type. Can be in the form of XML, JSON, or a #TEMP table. Use this field if multiple promotion price adjustments need to be applied.
PromotionAdjustmentsAggregate String False An aggregate representing the promotion. Child Elements include PromotionClaimCode, MerchantPromotionID, ComponentAggregate (Type, Amount and Amount@Currency). Use this field if multiple promotions need to be applied.
AdjustedItemAggregate String False An aggregate representing order adjustment information for a specific item. Can be in the form of XML, JSON, or a #TEMP table. Use this field if multiple items need adjusting in 1 order.
OrderAdjustmentFeedAggregate String False An aggregate representing the feed. Can be in the form of XML or a #TEMP table.
MarketplaceIds String True Required. A list of one or more marketplace IDs for the marketplace that registered the listing account.

Result Set Columns

Name Type Description
FeedId String A unique identifier for the feed.
FeedType String The type of feed submitted.
SubmittedDate Datetime The date and time when the feed was submitted.
FeedProcessingStatus String The processing status of the feed submission.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060