Magento version:

Trying to come up with a SOAP api GET request v1 or v2 to bring all the orders list. Have already read the documentation: https://devdocs.magento.com/guides/m1x/api/soap/sales/salesOrder/sales_order.list.html

Have already created an apiuser and apikey from the System backend SOAP/XML-RPC with admin permissions.

Tried this with no result. https://www.magentohost.com/api/soap/?wsdl?apiuser=xxx&apiKey=xxxxxxxxxxxxx

Im trying to come up with a working URL so i can then import the order list into a Google Sheet. Can't use Zapier or Integromat for this.

  • do you want to get order list via script ? ie PHP code using API.
    – Pawan
    Commented May 27, 2020 at 7:30
  • Only vía directa url so i can importdata on Google Sheets or use API connector addon or using Google app script
    – sebas
    Commented May 27, 2020 at 13:52
  • I think with direct URL it is not possible(because to access API, you need first to create token and add token in request), you can put logic in script and manipulate (import) result wherever you want !
    – Pawan
    Commented May 27, 2020 at 15:09
  • @Pawan any sample code for google app script?
    – sebas
    Commented May 27, 2020 at 15:37
  • i do not have any idea of google app script :( , can share PHP code and you need to convert it .
    – Pawan
    Commented May 27, 2020 at 15:49

1 Answer 1


You can get all order using below code:

ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);

$url = '';

$client = new SoapClient($url);

// get token
$session = $client->login('soapadmin', 'admin@123');
$result = $client->salesOrderList($session); 

var_dump ($result);

You need to change, username, password and HostURL

Hope above will help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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