0

I wants to get the invoice information based on order id in magento 1.9

using soap api.

Thanks.

0

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);
  • Hi @sania thanks for your answer but i wants get all ready created invoices information based on order id – shivashankar m Jul 25 '18 at 12:22
0

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 :

https://devdocs.magento.com/guides/m1x/api/soap/sales/salesOrderInvoice/sales_order_invoice.info.html

  • The above link is worked for passing increment id only not order id – shivashankar m Jul 25 '18 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.