| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Rest API pulling Orders | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Rest API pulling Orders
I am on 5.3.6.8 and I am using it to pull down Orders. I have two questions.
1. It isn't pulling down some fields like Profile_Id, Payment_Status_id, Shipping_Status_ID etc... But the documentation seems to indicate it will pull down the entire entity. I get almost all the fields but missing just a few. Is this a problem with my install or these fields aren't supported. 2. Does anyone have the paging working? in my code I have this: request.QueryStringParams.Add($"_cnd[limit][0]={start}"); request.QueryStringParams.Add($"_cnd[limit][1]={pageSize}"); My start number is incremented by the pageSize + 1 so I should just page and page until I get a partial return with < less that pageSize and I would know I was at the end. But it doesn't seem to work that way, I get to the end and it still gives me 100 records. Is Limit the way to go here? X-Cart Business 5.3.6.8
__________________
X-Cart 5.3.6.8 |
|||||||
#2
|
|||||||
|
|||||||
Re: Rest API pulling Orders
Ok, after more playing around with this I have some observations. I was going to delete this post but thought I would leave it up for the next dev.
1. The default order object just doesn't return Profile_ID and a few other fields. which is a bummer because it's the full raw object and the field is there, but just not populated. What you can do instead is pull down the Complex Order which does give you a richer object graph including Customer (profile), CustomerAddress, Items (orderItems) etc. This object is not the full record from the DB but it's pretty useful. Forget my question about the paging. That is working for me now.
__________________
X-Cart 5.3.6.8 |
|||||||
|
|||
X-Cart forums © 2001-2020
|