Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Cscart Api Dosent Returns Desirable Results Rate Topic   - - - - -

 
  • prasenjit
  • Newbie
  • Trial users
  • Join Date: 28-Sep 15
  • 1 posts

Posted 28 September 2015 - 12:39 PM #1

I am trying to fetch data using API.Now as per the API docs given I initiated a GET request to the API and the orders i have fetched has no product name , type of payments

 

(The headers are fine and its connected )

GET Request

http://example.com/api/orders 

 

result i got an array of 10 orders when i have more than 30 orders

 9 => array(
'order_id' => '1003',
'issuer_id' => null,
'user_id' => '0',
'is_parent_order' => 'N',
'parent_order_id' => '0',
'company_id' => '1',
'timestamp' => '1433830181',
'firstname' => 'Miss Anshika Tibrewala',
'lastname' => 'C/O Sheetal Tibrewala',
'email' => 'info@cupsware.com',
'phone' => '',
'status' => 'P',
'total' => '325.00',
'invoice_id' => null,
'credit_memo_id' => null
)
),
'params' => array(
'page' => (int) 1,
'items_per_page' => '10',
'ajax_custom' => '1',
'include_incompleted' => false,
'sort_order' => 'desc',
'sort_by' => 'date',
'sort_order_rev' => 'asc',
'total_items' => '22'
 

I need to iterate through the pages how can that be achieved? 

How to retrieve all the orders what point am I missing also i need the product name and payment type in the order how to get that??

 

Any sort of help is most welcomed.Thanks in advance.

:-)  :-)  :-)  :-)  :-)  :-)  :-)  :-)



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19060 posts

Posted 29 September 2015 - 11:37 AM #2

Try to use the following url:

http://example.com/api/orders?items_per_page=100

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.