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

Module: Mage_Sales

Resource: sales_order

Aliases:

  • order
Method:
  • sales_order.info (SOAP V1)
  • salesOrderInfo (SOAP V2)

Allows you to retrieve the required order information.

Aliases:

  • order.info

Arguments:

TypeNameDescription
stringsessionIdSession ID
stringorderIncrementIdOrder increment ID

Returns:

TypeNameDescription
arrayresultArray of salesOrderEntity

The salesOrderEntity 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 order is active
stringcustomer_idCustomer ID
stringtax_amountTax amount
stringshipping_amountShipping amount
stringdiscount_amountDiscount amount
stringsubtotalSubtotal sum
stringgrand_totalGrand total sum
stringtotal_paidTotal paid
stringtotal_refundedTotal refunded
stringtotal_qty_orderedTotal quantity ordered
stringtotal_canceledTotal canceled
stringtotal_invoicedTotal invoiced
stringtotal_online_refundedTotal online refunded
stringtotal_offline_refundedTotal offline refunded
stringbase_tax_amountBase tax amount
stringbase_shipping_amountBase shipping amount
stringbase_discount_amountBase discount amount
stringbase_subtotalBase subtotal
stringbase_grand_totalBase grand total
stringbase_total_paidBase total paid
stringbase_total_refundedBase total refunded
stringbase_total_qty_orderedBase total quantity ordered
stringbase_total_canceledBase total canceled
stringbase_total_invoicedBase total invoiced
stringbase_total_online_refundedBase total online refunded
stringbase_total_offline_refundedBase total offline refunded
stringbilling_address_idBilling address ID
stringbilling_firstnameFirst name in the billing address
stringbilling_lastnameLast name in the billing address
stringshipping_address_idShipping address ID
stringshipping_firstnameFirst name in the shipping address
stringshipping_lastnameLast name in the shipping address
stringbilling_nameBilling name
stringshipping_nameShipping name
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
stringweightWeight
stringstore_nameStore name
stringremote_ipRemote IP
stringstatusOrder status
stringstateOrder state
stringapplied_rule_idsApplied rule IDs
stringglobal_currency_codeGlobal currency code
stringbase_currency_codeBase currency code
stringstore_currency_codeStore currency code
stringorder_currency_codeOrder currency code
stringshipping_methodShipping method
stringshipping_descriptionShipping description
stringcustomer_emailEmail address of the customer
stringcustomer_firstnameCustomer first name
stringcustomer_lastnameCustomer last name
stringquote_idShopping cart ID
stringis_virtualDefines whether the product is a virtual one
stringcustomer_group_idCustomer group ID
stringcustomer_note_notifyCustomer notification
stringcustomer_is_guestDefines whether the customer is a guest
stringemail_sentDefines whether the email notification is sent
stringorder_idOrder ID
stringgift_message_idGift message ID
stringgift_messageGift message
arrayshipping_addressArray of salesOrderAddressEntity
arraybilling_addressArray of salesOrderAddressEntity
arrayitemsArray of salesOrderItemEntity
arraypaymentArray of salesOrderPaymentEntity
arraystatus_historyArray of salesOrderStatusHistoryEntity

The salesOrderAddressEntity content is as follows:

TypeNameDescription
stringincrement_idIncrement ID
stringparent_idParent ID
stringcreated_atDate of creation
stringupdated_atDate of updating
stringis_activeDefines whether the address is active
stringaddress_typeAddress type
stringfirstnameFirst name
stringlastnameLast name
stringcompanyCompany name
stringstreetStreet name
stringcityCity
stringregionRegion
stringpostcodePost code
stringcountry_idCountry ID
stringtelephoneTelephone number
stringfaxFax number
stringregion_idRegion ID
stringaddress_idAddress ID

The salesOrderItemEntity content is as follows:

TypeNameDescription
stringitem_idItem ID
stringorder_idOrder ID
stringquote_item_idShopping cart item ID
stringcreated_atDate of creation
stringupdated_atDate of updating
stringproduct_idProduct ID
stringproduct_typeProduct type
stringproduct_optionsProduct options
stringweightWeight
stringis_virtualDefines whether the product is a virtual one
stringskuProduct SKU
stringnameProduct name
stringapplied_rule_idsApplied rule IDs
stringfree_shippingDefines whether free shipping is applied
stringis_qty_decimalDefines whether the items quantity is decimal
stringno_discountDefines whether no discount is applied
stringqty_canceledItems quantity canceled
stringqty_invoicedItems quantity invoiced
stringqty_orderedItems quantity ordered
stringqty_refundedItems quantity refunded
stringqty_shippedItems quantity shipped
stringcostCost
stringpricePrice
stringbase_priceBase price
stringoriginal_priceOriginal price
stringbase_original_priceBase original price
stringtax_percentTax percent
stringtax_amountTax amount
stringbase_tax_amountBase tax amount
stringtax_invoicedTax invoiced
stringbase_tax_invoicedBase tax invoiced
stringdiscount_percentDiscount percent
stringdiscount_amountDiscount amount
stringbase_discount_amountBase discount amount
stringdiscount_invoicedDiscount invoiced
stringbase_discount_invoicedBase discount invoiced
stringamount_refundedAmount refunded
stringbase_amount_refundedBase amount refunded
stringrow_totalRow total
stringbase_row_totalBase row total
stringrow_invoicedRow invoiced
stringbase_row_invoicedBase row invoiced
stringrow_weightRow weight
stringgift_message_idGift message ID
stringgift_messageGift message
stringgift_message_availableDefines whether the gift message is available
stringbase_tax_before_discountBase tax before discount
stringtax_before_discountTax before discount
stringweee_tax_appliedApplied fixed product tax
stringweee_tax_applied_amountApplied fixed product tax amount
stringweee_tax_applied_row_amountApplied fixed product tax row amount
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_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)

The salesOrderPaymentEntity content is as follows:

TypeNameDescription
stringincrement_idIncrement ID
stringparent_idParent ID
stringcreated_atDate of creation
stringupdated_atDate of updating
stringis_activeActive flag
stringamount_orderedAmount ordered
stringshipping_amountShipping amount
stringbase_amount_orderedBase amount ordered
stringbase_shipping_amountBase shipping amount
stringmethodPayment method
stringpo_numberPurchase order number
stringcc_typeCredit card type
stringcc_number_encCredit card number
stringcc_last4Credit card last 4 digits
stringcc_ownerCredit card owner
stringcc_exp_monthCredit card expiration month
stringcc_exp_yearCredit card expiration year
stringcc_ss_start_monthCredit card start month (Switch/Solo)
stringcc_ss_start_yearCredit card start year (Switch/Solo)
stringpayment_idPayment ID

The salesOrderStatusHistoryEntity content is as follows:

TypeNameDescription
stringincrement_idIncrement ID
stringparent_idParent ID
stringcreated_atDate of creation
stringupdated_atDate of updating
stringis_activeActive flag
stringis_customer_notifiedDefines whether the customer is notified
stringstatusOrder status
stringcommentOrder comment

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.info', 'orderIncrementId');
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->salesOrderInfo($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->salesOrderInfo((object)array('sessionId' => $sessionId->result, 'orderIncrementId' => '200000006'));   
var_dump($result->result);
Response Example SOAP V1
array
  'state' => string 'new' (length=3)
  'status' => string 'pending' (length=7)
  'coupon_code' => null
  'protect_code' => string 'defe18' (length=6)
  'shipping_description' => string 'Flat Rate - Fixed' (length=17)
  'is_virtual' => string '0' (length=1)
  'store_id' => string '2' (length=1)
  'customer_id' => string '2' (length=1)
  'base_discount_amount' => string '0.0000' (length=6)
  'base_discount_canceled' => null
  'base_discount_invoiced' => null
  'base_discount_refunded' => null
  'base_grand_total' => string '619.9700' (length=8)
  'base_shipping_amount' => string '10.0000' (length=7)
  'base_shipping_canceled' => null
  'base_shipping_invoiced' => null
  'base_shipping_refunded' => null
  'base_shipping_tax_amount' => string '0.0000' (length=6)
  'base_shipping_tax_refunded' => null
  'base_subtotal' => string '609.9700' (length=8)
  'base_subtotal_canceled' => null
  'base_subtotal_invoiced' => null
  'base_subtotal_refunded' => null
  'base_tax_amount' => string '0.0000' (length=6)
  'base_tax_canceled' => null
  'base_tax_invoiced' => null
  'base_tax_refunded' => null
  'base_to_global_rate' => string '1.0000' (length=6)
  'base_to_order_rate' => string '1.0000' (length=6)
  'base_total_canceled' => null
  'base_total_invoiced' => null
  'base_total_invoiced_cost' => null
  'base_total_offline_refunded' => null
  'base_total_online_refunded' => null
  'base_total_paid' => null
  'base_total_qty_ordered' => null
  'base_total_refunded' => null
  'discount_amount' => string '0.0000' (length=6)
  'discount_canceled' => null
  'discount_invoiced' => null
  'discount_refunded' => null
  'grand_total' => string '619.9700' (length=8)
  'shipping_amount' => string '10.0000' (length=7)
  'shipping_canceled' => null
  'shipping_invoiced' => null
  'shipping_refunded' => null
  'shipping_tax_amount' => string '0.0000' (length=6)
  'shipping_tax_refunded' => null
  'store_to_base_rate' => string '1.0000' (length=6)
  'store_to_order_rate' => string '1.0000' (length=6)
  'subtotal' => string '609.9700' (length=8)
  'subtotal_canceled' => null
  'subtotal_invoiced' => null
  'subtotal_refunded' => null
  'tax_amount' => string '0.0000' (length=6)
  'tax_canceled' => null
  'tax_invoiced' => null
  'tax_refunded' => null
  'total_canceled' => null
  'total_invoiced' => null
  'total_offline_refunded' => null
  'total_online_refunded' => null
  'total_paid' => null
  'total_qty_ordered' => string '2.0000' (length=6)
  'total_refunded' => null
  'can_ship_partially' => null
  'can_ship_partially_item' => null
  'customer_is_guest' => string '0' (length=1)
  'customer_note_notify' => string '1' (length=1)
  'billing_address_id' => string '1' (length=1)
  'customer_group_id' => string '1' (length=1)
  'edit_increment' => null
  'email_sent' => string '1' (length=1)
  'forced_shipment_with_invoice' => null
  'payment_auth_expiration' => null
  'quote_address_id' => null
  'quote_id' => string '1' (length=1)
  'shipping_address_id' => string '2' (length=1)
  'adjustment_negative' => null
  'adjustment_positive' => null
  'base_adjustment_negative' => null
  'base_adjustment_positive' => null
  'base_shipping_discount_amount' => string '0.0000' (length=6)
  'base_subtotal_incl_tax' => string '609.9700' (length=8)
  'base_total_due' => null
  'payment_authorization_amount' => null
  'shipping_discount_amount' => string '0.0000' (length=6)
  'subtotal_incl_tax' => string '609.9700' (length=8)
  'total_due' => null
  'weight' => string '1.2000' (length=6)
  'customer_dob' => null
  'increment_id' => string '200000001' (length=9)
  'applied_rule_ids' => null
  'base_currency_code' => string 'USD' (length=3)
  'customer_email' => string 'john@example.com' (length=16)
  'customer_firstname' => string 'johny' (length=5)
  'customer_lastname' => string 'doe' (length=3)
  'customer_middlename' => null
  'customer_prefix' => null
  'customer_suffix' => null
  'customer_taxvat' => null
  'discount_description' => null
  'ext_customer_id' => null
  'ext_order_id' => null
  'global_currency_code' => string 'USD' (length=3)
  'hold_before_state' => null
  'hold_before_status' => null
  'order_currency_code' => string 'USD' (length=3)
  'original_increment_id' => null
  'relation_child_id' => null
  'relation_child_real_id' => null
  'relation_parent_id' => null
  'relation_parent_real_id' => null
  'remote_ip' => string '127.0.0.1' (length=9)
  'shipping_method' => string 'flatrate_flatrate' (length=17)
  'store_currency_code' => string 'USD' (length=3)
  'store_name' => string 'website
English store
English' (length=29)
  'x_forwarded_for' => null
  'customer_note' => null
  'created_at' => string '2012-03-30 11:40:30' (length=19)
  'updated_at' => string '2012-03-30 11:40:32' (length=19)
  'total_item_count' => string '2' (length=1)
  'customer_gender' => null
  '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' => string '0.0000' (length=6)
  'hidden_tax_invoiced' => null
  more elements...