View Single Post
  #4  
Old 05-03-2017, 04:19 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Advice with REST API

REST API is an interface to manipulate data in the database through Repository classes.

So, first you should check the source code and understand what Models (subclasses of \XLite\Model\AEntity) you want to retrieve and how they relate to each other.
They you should run a series of API requests to retrieve the necessary models by their identifiers.
The exact list of requests depends on what exact information you require, so I'm not sure if I can guess it and post there.

When sending a search request, you may filter the data with the _cnd parameters. To find what parameters are available for your models look for prepareCnd***() methods defined in the Repository classes (subclasses of \XLite\Model\Repo\ARepo) that handle operations on models which you need.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote