I wants to get the invoice information based on order id in magento 1.9
using soap api.
Thanks.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI wants to get the invoice information based on order id in magento 1.9
using soap api.
Thanks.
Please use this Example
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');
$notInvoicedOrderId = '100000003';
// Create new invoice
$newInvoiceId = $proxy->call($sessionId, 'sales_order_invoice.create', array($notInvoicedOrderId, array(), 'Invoice Created', true, true));
// View new invoice
$invoice = $proxy->call($sessionId, 'sales_order_invoice.info', $newInvoiceId);
var_dump($invoice);
// Add Comment
$proxy->call($sessionId, 'sales_order_invoice.addComment', array($newInvoiceId, 'Invoice comment, some text', true, false));
// View invoice with new comment
$invoice = $proxy->call($sessionId, 'sales_order_invoice.info', $newInvoiceId);
var_dump($invoice);
$proxy->call($sessionId, 'sales_order_invoice.capture', $newInvoiceId);
// View captured invoice
$invoice = $proxy->call($sessionId, 'sales_order_invoice.info', $newInvoiceId);
var_dump($invoice);
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);
For More detail follow magento doc :