Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Module: Order Credit Memo API

Resource: sales_order_creditmemo

Aliases: order_creditmemo
Method:
  • order_creditmemo.info (SOAP V1)
  • salesOrderCreditmemoInfo (SOAP V2)

Allows you to retrieve full information about the specified credit memo.

Arguments:

TypeNameDescription
stringsessionIdSession ID
stringcreditmemoIncrementIdCredit memo increment ID

Return:

TypeNameDescription
arrayresultArray of salesOrderCreditmemoEntity

The salesOrderCreditmemoEntity content is as follows:

TypeNameDescription
stringupdated_atDate of updating
stringcreated_atDate of creation
stringincrement_idIncrement ID
stringtransaction_idTransaction ID
stringglobal_currency_codeGlobal currency code
stringbase_currency_codeBase currency code
stringorder_currency_codeOrder currency code
stringstore_currency_codeStore currency code
stringcybersource_tokenCybersource token
stringinvoice_idID of the invoice for which the credit memo was created
stringbilling_address_idBilling address ID
stringshipping_address_idShipping address ID
stringstateState
stringcreditmemo_statusCredit memo status
stringemail_sentDefines whether the email is sent
stringorder_idID of the order for which the credit memo was created
stringtax_amountTax amount
stringshipping_tax_amountShipping tax amount
stringbase_tax_amountBase tax amount
stringbase_adjustment_positiveAdjustment refund amount (using base currency)
stringbase_grand_totalBase grand total
stringadjustmentAdjustment
stringsubtotalSubtotal
stringdiscount_amountDiscount amount
stringbase_subtotalBase subtotal
stringbase_adjustmentBase adjustment
stringbase_to_global_rateBase to global rate
stringstore_to_base_rateStore to base rate
stringbase_shipping_amountBase shipping amount
stringadjustment_negativeAdjustment fee amount
stringsubtotal_incl_taxSubtotal including tax
stringshipping_amountShipping amount
stringbase_subtotal_incl_taxBase subtotal including tax
stringbase_adjustment_negativeAdjustment fee amount (using base currency)
stringgrand_totalGrand total
stringbase_discount_amountBase discount amount
stringbase_to_order_rateBase to order rate
stringstore_to_order_rateStore to order rate
stringbase_shipping_tax_amountBase shipping tax amount
stringadjustment_positiveAdjustment refund amount
stringstore_idStore ID
stringhidden_tax_amountHidden tax amount
stringbase_hidden_tax_amountBase hidden tax amount
stringshipping_hidden_tax_amountShipping hidden tax amount
stringbase_shipping_hidden_tax_amntBase shipping hidden tax amount
stringshipping_incl_taxShipping including tax
stringbase_shipping_incl_taxBase shipping including tax
stringbase_customer_balance_amountBase customer balance amount
stringcustomer_balance_amountCustomer balance amount
stringbs_customer_bal_total_refundedRefunded base customer balance amount
stringcustomer_bal_total_refundedCustomer balance total refunded
stringbase_gift_cards_amountBase gift cards amount
stringgift_cards_amountGift cards amount
stringgw_base_priceGift wrapping price refunded amount (using base currency)
stringgw_priceGift wrapping price refunded amount
stringgw_items_base_priceGift wrapping items base price
stringgw_items_priceGift wrapping items price
stringgw_card_base_priceGift wrapping card base price
stringgw_card_priceGift wrapping card price
stringgw_base_tax_amountGift wrapping tax amount refunded (using base currency)
stringgw_tax_amountGift wrapping tax amount refunded
stringgw_items_base_tax_amountGift wrapping items base tax amount
stringgw_items_tax_amountGift wrapping items tax amount
stringgw_card_base_tax_amountGift wrapping card base tax amount
stringgw_card_tax_amountGift wrapping card tax amount
stringbase_reward_currency_amountBase reward currency amount
stringreward_currency_amountReward currency amount
stringreward_points_balanceReward points balance
stringreward_points_balance_refundReward points balance refund
stringcreditmemo_idCredit memo ID
arrayitemsArray of salesOrderCreditmemoItemEntity
arraycommentsArray of salesOrderCreditmemoCommentEntity

The salesOrderCreditmemoItemEntity content is as follows:

TypeNameDescription
stringitem_idCredit memo item ID
stringparent_idParent ID
stringweee_tax_applied_row_amountApplied fixed product tax row amount
stringbase_priceBase price
stringbase_weee_tax_row_dispositionFixed product tax row disposition (in base currency)
stringtax_amountTax amount
stringbase_weee_tax_applied_amountApplied fixed product tax amount (in base currency)
stringweee_tax_row_dispositionFixed product tax row disposition
stringbase_row_totalBase row total
stringdiscount_amountDiscount amount
stringrow_totalRow total
stringweee_tax_applied_amountApplied fixed product tax amount
stringbase_discount_amountBase discount amount
stringbase_weee_tax_dispositionFixed product tax disposition (in base currency)
stringprice_incl_taxPrice including tax
stringbase_tax_amountBase tax amount
stringweee_tax_dispositionFixed product tax disposition
stringbase_price_incl_taxBase price including tax
stringqtyQuantity
stringbase_costBase cost
stringbase_weee_tax_applied_row_amountApplied fixed product tax row amount (in base currency)
stringpricePrice
stringbase_row_total_incl_taxBase row total including tax
stringrow_total_incl_taxRow total including tax
stringproduct_idProduct ID
stringorder_item_idOrder item ID
stringadditional_dataAdditional data
stringdescriptionDescription
stringweee_tax_appliedApplied fixed product tax
stringskuItem SKU
stringnameName
stringhidden_tax_amountHidden tax amount
stringbase_hidden_tax_amountBase hidden tax amount

The salesOrderCreditmemoCommentEntity content is as follows:

TypeNameDescription
stringparent_idParent ID
stringcreated_atDate of creation
stringcommentComment data
stringis_customer_notifiedDefines whether the customer is notified
stringcomment_idComment ID
stringis_visible_on_frontDefines whether the comment is visible on the frontend

Faults:

Fault CodeFault Description
100Requested credit memo does not exist.

Examples

Request Example SOAP V1
$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client->login('apiUser', 'apiKey');

$result = $client->call($session, 'order_creditmemo.info', '200000001');
var_dump ($result);
Request Example SOAP V2
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy->login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy->salesOrderCreditmemoInfo($sessionId, '200000001');
var_dump($result);
Request Example SOAP V2 (WS-I Compliance Mode)
$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); 

$sessionId = $proxy->login((object)array('username' => 'apiUser', 'apiKey' => 'apiKey')); 
 
$result = $proxy->salesOrderCreditmemoInfo((object)array('sessionId' => $sessionId->result, 'creditmemoIncrementId' => '200000001'));   
var_dump($result->result);
Response Example SOAP V1
array(
    'store_id' => '1',
    'adjustment_positive' => NULL,
    'base_shipping_tax_amount' => '0.0000',
    'store_to_order_rate' => '1.0000',
    'base_discount_amount' => '0.0000',
    'base_to_order_rate' => '1.0000',
    'grand_total' => '90.0000',
    'base_adjustment_negative' => NULL,
    'base_subtotal_incl_tax' => '75.0000',
    'shipping_amount' => '15.0000',
    'subtotal_incl_tax' => '75.0000',
    'adjustment_negative' => NULL,
    'base_shipping_amount' => '15.0000',
    'store_to_base_rate' => '1.0000',
    'base_to_global_rate' => '1.0000',
    'base_adjustment' => '0.0000',
    'base_subtotal' => '75.0000',
    'discount_amount' => '0.0000',
    'subtotal' => '75.0000',
    'adjustment' => '0.0000',
    'base_grand_total' => '90.0000',
    'base_adjustment_positive' => NULL,
    'base_tax_amount' => '0.0000',
    'shipping_tax_amount' => '0.0000',
    'tax_amount' => '0.0000',
    'order_id' => '744',
    'email_sent' => NULL,
    'creditmemo_status' => NULL,
    'state' => '2',
    'shipping_address_id' => '1488',
    'billing_address_id' => '1487',
    'invoice_id' => NULL,
    'cybersource_token' => NULL,
    'store_currency_code' => 'USD',
    'order_currency_code' => 'USD',
    'base_currency_code' => 'USD',
    'global_currency_code' => 'USD',
    'transaction_id' => NULL,
    'increment_id' => '100000684',
    'created_at' => '2011-05-27 10:53:03',
    'updated_at' => '2011-05-27 10:53:03',
    'hidden_tax_amount' => '0.0000',
    'base_hidden_tax_amount' => '0.0000',
    'shipping_hidden_tax_amount' => NULL,
    'base_shipping_hidden_tax_amnt' => NULL,
    'shipping_incl_tax' => '15.0000',
    'base_shipping_incl_tax' => '15.0000',
    'base_customer_balance_amount' => NULL,
    'customer_balance_amount' => NULL,
    'bs_customer_bal_total_refunded' => '0.0000',
    'customer_bal_total_refunded' => '0.0000',
    'base_gift_cards_amount' => NULL,
    'gift_cards_amount' => NULL,
    'gw_base_price' => NULL,
    'gw_price' => NULL,
    'gw_items_base_price' => NULL,
    'gw_items_price' => NULL,
    'gw_card_base_price' => NULL,
    'gw_card_price' => NULL,
    'gw_base_tax_amount' => NULL,
    'gw_tax_amount' => NULL,
    'gw_items_base_tax_amount' => NULL,
    'gw_items_tax_amount' => NULL,
    'gw_card_base_tax_amount' => NULL,
    'gw_card_tax_amount' => NULL,
    'base_reward_currency_amount' => NULL,
    'reward_currency_amount' => NULL,
    'reward_points_balance' => NULL,
    'reward_points_balance_refund' => NULL,
    'base_customer_balance_total_refunded' => '0.0000',
    'customer_balance_total_refunded' => '0.0000',
    'gw_printed_card_base_price' => NULL,
    'gw_printed_card_price' => NULL,
    'gw_printed_card_base_tax_amount' => NULL,
    'gw_printed_card_tax_amount' => NULL,
    'reward_points_balance_to_refund' => NULL,
    'creditmemo_id' => '684',
    'order_increment_id' => '100000744',
    'items' => array(
        0 => array(
            'parent_id' => '684',
            'weee_tax_applied_row_amount' => '0.0000',
            'base_price' => '55.0000',
            'base_weee_tax_row_disposition' => '0.0000',
            'tax_amount' => '0.0000',
            'base_weee_tax_applied_amount' => '0.0000',
            'weee_tax_row_disposition' => '0.0000',
            'base_row_total' => '55.0000',
            'discount_amount' => NULL,
            'row_total' => '55.0000',
            'weee_tax_applied_amount' => '0.0000',
            'base_discount_amount' => NULL,
            'base_weee_tax_disposition' => '0.0000',
            'price_incl_tax' => '55.0000',
            'base_tax_amount' => '0.0000',
            'weee_tax_disposition' => '0.0000',
            'base_price_incl_tax' => '55.0000',
            'qty' => '1.0000',
            'base_cost' => NULL,
            'base_weee_tax_applied_row_amnt' => NULL,
            'price' => '55.0000',
            'base_row_total_incl_tax' => '55.0000',
            'row_total_incl_tax' => '55.0000',
            'product_id' => '20',
            'order_item_id' => '775',
            'additional_data' => NULL,
            'description' => NULL,
            'weee_tax_applied' => 'a:0:{}',
            'sku' => 'test_product_sku',
            'name' => 'Test Product',
            'hidden_tax_amount' => '0.0000',
            'base_hidden_tax_amount' => '0.0000',
            'item_id' => '708'
        ),
        1 => array(
            'parent_id' => '684',
            'weee_tax_applied_row_amount' => '0.0000',
            'base_price' => '10.0000',
            'base_weee_tax_row_disposition' => '0.0000',
            'tax_amount' => '0.0000',
            'base_weee_tax_applied_amount' => '0.0000',
            'weee_tax_row_disposition' => '0.0000',
            'base_row_total' => '20.0000',
            'discount_amount' => NULL,
            'row_total' => '20.0000',
            'weee_tax_applied_amount' => '0.0000',
            'base_discount_amount' => NULL,
            'base_weee_tax_disposition' => '0.0000',
            'price_incl_tax' => '10.0000',
            'base_tax_amount' => '0.0000',
            'weee_tax_disposition' => '0.0000',
            'base_price_incl_tax' => '10.0000',
            'qty' => '2.0000',
            'base_cost' => NULL,
            'base_weee_tax_applied_row_amnt' => NULL,
            'price' => '10.0000',
            'base_row_total_incl_tax' => '20.0000',
            'row_total_incl_tax' => '20.0000',
            'product_id' => '21',
            'order_item_id' => '776',
            'additional_data' => NULL,
            'description' => NULL,
            'weee_tax_applied' => 'a:0:{}',
            'sku' => 'test_product_sku_2',
            'name' => 'Test 2',
            'hidden_tax_amount' => '0.0000',
            'base_hidden_tax_amount' => '0.0000',
            'item_id' => '709'
        )
    ),
    'comments' => array(
        0 => array(
            'parent_id' => '684',
            'is_customer_notified' => '0',
            'is_visible_on_front' => '0',
            'comment' => 'Test CreditMemo successfully created',
            'created_at' => '2011-05-27 10:53:03',
            'comment_id' => '118'
        ),
        1 => array(
            'parent_id' => '684',
            'is_customer_notified' => '0',
            'is_visible_on_front' => '0',
            'comment' => 'Test CreditMemo comment successfully added',
            'created_at' => '2011-05-27 10:53:03',
            'comment_id' => '119'
        )
    )
);