0

Magento version: 1.9.4.1

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.

asked May 27, 2020 at 1:20
8
  • do you want to get order list via script ? ie PHP code using API. 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 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 ! Commented May 27, 2020 at 15:09
  • @Pawan any sample code for google app script? 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 . Commented May 27, 2020 at 15:49

1 Answer 1

0

You can get all order using below code:

<?php
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$url = 'http://127.0.0.1/1924sample/index.php/api/v2_soap/?wsdl';
$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!

answered May 28, 2020 at 10:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.