| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
HOW can I pull the ShipTo and BillTo address of an order | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
HOW can I pull the ShipTo and BillTo address of an order
A question I have is HOW can I pull the ShipTo and BillTo address of an order? We are integrating our retail solution with X-Cart 5 using the API.
I'm using this to pull the order: https://mysite.com/xcart-5/xcart/admin.php?target=RESTAPI&_key=*****&_path=order/3&_method=put And this to pull the profile: https://mysite.com/xcart-5/xcart/admin.php?target=RESTAPI&_key=*****&_path=profile_ address/8&_method=put Neither shows the addresses. I need to get them so I can put into our system. Thanks, Chris Last edited by qualiteam : 09-24-2015 at 09:26 PM. |
|||||||
#2
|
|||||||||
|
|||||||||
Re: HOW can I pull the ShipTo and BillTo address of an order
Please refer to the documentation for developers:
http://kb.x-cart.com/display/XDD/REST+API+documentation It looks like instead of pulling you are trying to put the profile ("_method=put").
__________________
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 |
|||||||||
#3
|
|||||||
|
|||||||
Re: HOW can I pull the ShipTo and BillTo address of an order
I'm actually getting the same results if I use the _method=put or _method=put or even if I don't use _method in my url.
Pulling either order does not return the addresses nor does pulling the profile. What would my URL have to look like to pull the actual address for an order? |
|||||||
#4
|
|||||||||
|
|||||||||
Re: HOW can I pull the ShipTo and BillTo address of an order
What pulling an error does return? I believe it should include identifiers of address fields that you can use for further pulling.
__________________
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 |
|||||||||
#5
|
|||||||
|
|||||||
Re: HOW can I pull the ShipTo and BillTo address of an order
I don't get an error. When Pulling an order, this is what is returned and I don't see any addresses in there:
{"auctionIncPackage":[],"fraud_status_kount":"","order_id":3,"shipping_id ":162,"shipping_method_name":"Free","payment_metho d_name":"Purchase Order","tracking":"","date":1442852786,"lastRenewD ate":1442852786,"notes":"None","adminNotes":"","or derNumber":"1","total":59,"subtotal":59,"capostPar cels":[],"capostReturns":[],"capostOffice":null,"usedCoupons":[],"profile":{"default_card_id":0,"pending_zero_auth ":"","pending_zero_auth_txn_id":"","pending_zero_a uth_status":"","pending_zero_auth_interface":"","s ocialLoginProvider":null,"socialLoginId":null,"pro file_id":8,"login":"support@paygopos.com","passwor d":"","password_hint":"","password_hint_answer":"" ,"passwordResetKey":"","passwordResetKeyDate":0,"a ccess_level":100,"cms_profile_id":0,"cms_name":"", "added":1435258492,"first_login":1435259208,"last_ login":1442852441,"status":"E","statusComment":"", "referer":"Created by administrator (support@paygopos.com)","language":"en","last_ship ping_id":162,"last_payment_id":57,"anonymous":fals e,"forceChangePassword":false,"dateOfLoginAttempt" :0,"countOfLoginAttempts":0},"orig_profile":{"defa ult_card_id":0,"pending_zero_auth":"","pending_zer o_auth_txn_id":"","pending_zero_auth_status":"","p ending_zero_auth_interface":"","socialLoginProvide r":null,"socialLoginId":null,"profile_id":1,"login ":"support@paygopos.com","password":"SHA512:1a55a5 15a8a7e1fc4c72933b48c4fa5425e339565a468c0ac5cab978 9319f156dd5f4df9acdb108daaefc7ea659a057845a5500e9c 0f0dcc577c2d27e4ec2897","password_hint":"","passwo rd_hint_answer":"","passwordResetKey":"","password ResetKeyDate":0,"access_level":100,"cms_profile_id ":0,"cms_name":"","added":1435258492,"first_login" :1435259208,"last_login":1443020849,"status":"E"," statusComment":"","referer":"","language":"en","la st_shipping_id":162,"last_payment_id":57,"anonymou s":false,"forceChangePassword":false,"dateOfLoginA ttempt":0,"countOfLoginAttempts":0},"paymentStatus ":{"id":1,"code":"Q","position":10},"shippingStatu s":{"id":1,"code":"N","position":10},"details": [],"trackingNumbers":[],"events":[{"event_id":1,"date":1442852786,"code":"PLACE ORDER","description":"Order placed","data":{"orderId":3},"comment":""},{"event _id":2,"date":1442852786,"code":"TRANSACTION","des cription":"Payment transaction [method: Purchase Order, type: sale, amount: 59, status: Pending]","data":[],"comment":""},{"event_id":3,"date":1442852786,"co de":"CHANGE PRODUCT AMOUNT","description":"[Inventory] Removed from stock: \"{{product}}\" product amount in stock changes from \"{{oldInStock}}\" to \"{{newInStock}}\" ({{qty}} items)","data":{"orderId":3,"newInStock":59,"oldIn Stock":60,"product":"Whiz Bang Wine","qty":1},"comment":""},{"event_id":4,"date": 1442852786,"code":"CHANGE PRODUCT AMOUNT","description":"[Inventory] Removed from stock: \"{{product}}\" product amount in stock changes from \"{{oldInStock}}\" to \"{{newInStock}}\" ({{qty}} items)","data":{"orderId":3,"newInStock":4,"oldInS tock":5,"product":"Wine Glass Wine","qty":1},"comment":""},{"event_id":5,"date": 1442852786,"code":"CHANGE PRODUCT AMOUNT","description":"[Inventory] Removed from stock: \"{{product}}\" product amount in stock changes from \"{{oldInStock}}\" to \"{{newInStock}}\" ({{qty}} items)","data":{"orderId":3,"newInStock":2,"oldInS tock":3,"product":"Shirt - Ed Fancy","qty":1},"comment":""},{"event_id":6,"date" :1442852786,"code":"CHANGE PRODUCT AMOUNT","description":"[Inventory] Removed from stock: \"{{product}}\" product amount in stock changes from \"{{oldInStock}}\" to \"{{newInStock}}\" ({{qty}} items)","data":{"orderId":3,"newInStock":15,"oldIn Stock":16,"product":"Merlot --- The Best NEW","qty":1},"comment":""}],"items":[{"xpcFakeItem":false,"item_id":1,"name":"Whiz Bang Wine","sku":"54654","price":14,"itemNetPrice":14," discountedSubtotal":14,"amount":1,"total":14,"subt otal":14},{"xpcFakeItem":false,"item_id":2,"name": "Wine Glass Wine","sku":"987532","price":10,"itemNetPrice":10, "discountedSubtotal":10,"amount":1,"total":10,"sub total":10},{"xpcFakeItem":false,"item_id":5,"name" :"Shirt - Ed Fancy","sku":"353g","price":10,"itemNetPrice":10," discountedSubtotal":10,"amount":1,"total":10,"subt otal":10},{"xpcFakeItem":false,"item_id":9,"name": "Merlot --- The Best NEW","sku":"990e90e","price":25,"itemNetPrice":25, "discountedSubtotal":25,"amount":1,"total":25,"sub total":25}],"surcharges":[{"id":3,"type":"shipping","code":"SHIPPING","class ":"XLite\\Logic\\Order\\Modifier\\Shipping","inclu de":false,"available":true,"value":0,"name":"Shipp ing cost","weight":0}],"payment_transactions":[{"transaction_id":4,"date":1441208348,"publicTxnId ":"7HGwibT5ZlFvgmRB","method_name":"PurchaseOrder" ,"method_local_name":"Purchase Order","status":"W","value":59,"note":"","type":"s ale","public_id":"7HGwibT5ZlFvgmRB"}],"currency":{"currency_id":840,"code":"USD","symbo l":"$","prefix":"$","suffix":"","e":2,"decimalDeli miter":".","thousandDelimiter":""}} |
|||||||
#6
|
|||||||||
|
|||||||||
Re: HOW can I pull the ShipTo and BillTo address of an order
Try to use the complex scheme (add "&_schema=complex" to the URL) - it should return address data:
http://kb.x-cart.com/display/XDD/REST+API+documentation#RESTAPIdocumentation-DataavailableintheComplexschema
__________________
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 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|