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

Module: Mage_Sales

Resource: sales_order_invoice

Aliases:

  • order_invoice
Method:
  • sales_order_invoice.info (SOAP V1)
  • salesOrderInvoiceInfo (SOAP V2)

Allows you to retrieve information about the required invoice.

Aliases:

  • order_invoice.info

Arguments:

TypeNameDescription
stringsessionIdSession ID
stringinvoiceIncrementIdInvoice increment ID

Returns:

TypeNameDescription
arrayresultArray of salesOrderInvoiceEntity

The salesOrderInvoiceEntity content is as follows:

TypeNameDescription
stringincrement_idIncrement ID
stringparent_idParent ID
stringstore_idStore ID
stringcreated_atDate of creation
stringupdated_atDate of updating
stringis_activeDefines whether the invoice is active
stringglobal_currency_codeGlobal currency code
stringbase_currency_codeBase currency code
stringstore_currency_codeStore currency code
stringorder_currency_codeOrder currency code
stringstore_to_base_rateStore to base rate
stringstore_to_order_rateStore to order rate
stringbase_to_global_rateBase to global rate
stringbase_to_order_rateBase to order rate
stringsubtotalSubtotal
stringbase_subtotalBase subtotal
stringbase_grand_totalBase grand total
stringdiscount_amountDiscount amount
stringbase_discount_amountBase discount amount
stringshipping_amountShipping amount
stringbase_shipping_amountBase shipping amount
stringtax_amountTax amount
stringbase_tax_amountBase tax amount
stringbilling_address_idBilling address ID
stringbilling_firstnameFirst name in the billing address
stringbilling_lastnameLast name in the billing address
stringorder_idOrder ID
stringorder_increment_idOrder increment ID
stringorder_created_atDate of order creation
stringstateOrder state
stringgrand_totalGrand total
stringinvoice_idInvoice ID
arrayitemsArray of salesOrderInvoiceItemEntity
arraycommentsArray of salesOrderInvoiceCommentEntity

The salesOrderInvoiceItemEntity content is as follows:

TypeNameDescription
stringincrement_idIncrement ID
stringparent_idParent ID
stringcreated_atDate of creation
stringupdated_atDate of updating
stringis_activeActive flag
stringweee_tax_appliedApplied fixed product tax
stringqtyQuantity
stringcostCost
stringpricePrice
stringtax_amountTax amount
stringrow_totalRow total
stringbase_priceBase price
stringbase_tax_amountBase tax amount
stringbase_row_totalBase row total
stringbase_weee_tax_applied_amountApplied fixed product tax amount (in base currency)
stringbase_weee_tax_applied_row_amountApplied fixed product tax row amount (in base currency)
stringweee_tax_applied_amountApplied fixed product tax amount
stringweee_tax_applied_row_amountApplied fixed product tax row amount
stringweee_tax_dispositionFixed product tax disposition
stringweee_tax_row_dispositionFixed product tax row disposition
stringbase_weee_tax_dispositionFixed product tax disposition (in base currency)
stringbase_weee_tax_row_dispositionFixed product tax row disposition (in base currency)
stringskuSKU
stringnameName
stringorder_item_idOrder item ID
stringproduct_idProduct ID
stringitem_idItem ID

The salesOrderInvoiceCommentEntity content is as follows:

TypeNameDescription
stringincrement_idIncrement ID
stringparent_idParent ID
stringcreated_atDate of creation
stringupdated_atDate of updating
stringis_activeActive flag
stringcommentInvoice comment
stringis_customer_notifiedDefines whether the customer is notified
stringcomment_idComment ID

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, 'sales_order_invoice.info', '200000006');
var_dump($result);

// If you don't need the session anymore
//$client->endSession($session);
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->salesOrderInvoiceInfo($sessionId, '200000006');
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->salesOrderInvoiceInfo((object)array('sessionId' => $sessionId->result, 'invoiceIncrementId' => '200000006'));   
var_dump($result->result);
Response Example SOAP V1
array
  'store_id' => string '2' (length=1)
  'base_grand_total' => string '384.9800' (length=8)
  'shipping_tax_amount' => string '0.0000' (length=6)
  'tax_amount' => string '0.0000' (length=6)
  'base_tax_amount' => string '0.0000' (length=6)
  'store_to_order_rate' => string '1.0000' (length=6)
  'base_shipping_tax_amount' => string '0.0000' (length=6)
  'base_discount_amount' => string '0.0000' (length=6)
  'base_to_order_rate' => string '1.0000' (length=6)
  'grand_total' => string '384.9800' (length=8)
  'shipping_amount' => string '5.0000' (length=6)
  'subtotal_incl_tax' => string '379.9800' (length=8)
  'base_subtotal_incl_tax' => string '379.9800' (length=8)
  'store_to_base_rate' => string '1.0000' (length=6)
  'base_shipping_amount' => string '5.0000' (length=6)
  'total_qty' => string '1.0000' (length=6)
  'base_to_global_rate' => string '1.0000' (length=6)
  'subtotal' => string '379.9800' (length=8)
  'base_subtotal' => string '379.9800' (length=8)
  'discount_amount' => string '0.0000' (length=6)
  'billing_address_id' => string '3' (length=1)
  'is_used_for_refund' => null
  'order_id' => string '2' (length=1)
  'email_sent' => null
  'can_void_flag' => string '0' (length=1)
  'state' => string '2' (length=1)
  'shipping_address_id' => string '4' (length=1)
  'store_currency_code' => string 'USD' (length=3)
  'transaction_id' => null
  'order_currency_code' => string 'USD' (length=3)
  'base_currency_code' => string 'USD' (length=3)
  'global_currency_code' => string 'USD' (length=3)
  'increment_id' => string '200000006' (length=9)
  'created_at' => string '2012-03-30 12:02:19' (length=19)
  'updated_at' => string '2012-03-30 12:02:19' (length=19)
  'hidden_tax_amount' => string '0.0000' (length=6)
  'base_hidden_tax_amount' => string '0.0000' (length=6)
  'shipping_hidden_tax_amount' => string '0.0000' (length=6)
  'base_shipping_hidden_tax_amnt' => null
  'shipping_incl_tax' => string '5.0000' (length=6)
  'base_shipping_incl_tax' => string '5.0000' (length=6)
  'base_total_refunded' => null
  'cybersource_token' => null
  'invoice_id' => string '1' (length=1)
  'order_increment_id' => string '200000002' (length=9)
  'items' =>
    array
      0 =>
        array
          'parent_id' => string '1' (length=1)
          'base_price' => string '379.9800' (length=8)
          'tax_amount' => string '0.0000' (length=6)
          'base_row_total' => string '379.9800' (length=8)
          'discount_amount' => null
          'row_total' => string '379.9800' (length=8)
          'base_discount_amount' => null
          'price_incl_tax' => string '379.9800' (length=8)
          'base_tax_amount' => string '0.0000' (length=6)
          'base_price_incl_tax' => string '379.9800' (length=8)
          'qty' => string '1.0000' (length=6)
          'base_cost' => null
          'price' => string '379.9800' (length=8)
          'base_row_total_incl_tax' => string '379.9800' (length=8)
          'row_total_incl_tax' => string '379.9800' (length=8)
          'product_id' => string '1' (length=1)
          'order_item_id' => string '3' (length=1)
          'additional_data' => null
          'description' => null
          'sku' => string 'n2610-slider' (length=12)
          'name' => string 'Nokia 2610 Phone' (length=16)
          'hidden_tax_amount' => string '0.0000' (length=6)
          'base_hidden_tax_amount' => string '0.0000' (length=6)
          'base_weee_tax_applied_amount' => string '0.0000' (length=6)
          'base_weee_tax_applied_row_amnt' => string '0.0000' (length=6)
          'base_weee_tax_applied_row_amount' => string '0.0000' (length=6)
          'weee_tax_applied_amount' => string '0.0000' (length=6)
          'weee_tax_applied_row_amount' => string '0.0000' (length=6)
          'weee_tax_applied' => string 'a:0:{}' (length=6)
          'weee_tax_disposition' => string '0.0000' (length=6)
          'weee_tax_row_disposition' => string '0.0000' (length=6)
          'base_weee_tax_disposition' => string '0.0000' (length=6)
          'base_weee_tax_row_disposition' => string '0.0000' (length=6)
          'item_id' => string '1' (length=1)
  'comments' =>
    array
      empty

Table of contents