Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sales Order Shipping Address #2628

Closed
jhildreth opened this issue Dec 7, 2015 · 17 comments
Closed

Sales Order Shipping Address #2628

jhildreth opened this issue Dec 7, 2015 · 17 comments
Assignees

Comments

@jhildreth
Copy link

I anticipated that the response to a GET request against the /V1/orders API endpoint would include the shipping address for each sales order, but it does not appear to. It does include the billing address for each order.

I'm not seeing a good alternative endpoint for retrieving the shipping address - what am I missing? How do I get the shipping address for a sales order via the API?

Thanks!

@thomasnordkvist
Copy link

I'm also intressted in how to get the shipping address and i don't see any solution in the api documentation.
But reading this #2382 i understand that it has been removed and some other solution will be there in the future? But when in the future?

@jhildreth
Copy link
Author

Thanks a lot @thomasnordkvist for referencing that issue, I hadn't come across it in my searches. Is there anyone that can shed some light about an existing or soon-to-be-released method for retrieving the shipping address via the API, or is customization the only way? That question was raised in #2382 , but it doesn't look like it was addressed.
I understand the decision to have shipping information on the individual sales order items, but it doesn't seem to be there yet. The sales order API isn't helpful to me from an integration standpoint if I can't get the shipping address.

@thomasnordkvist
Copy link

@jhildreth
The answer is here:
http://magento.stackexchange.com/questions/93143/magento2-how-to-get-shipping-address-for-order-in-rest-api

I think the magento people want this issue to be closed as soon as possible, because it might be more of a http://magento.stackexchange.com/questions/tagged/magento2 thing than a github issue.

/Thomas

@jhildreth
Copy link
Author

Fair enough, thanks a lot for the help @thomasnordkvist!

@choukalos
Copy link

This is a bug; it should have been exposed and linked per @paliarush comment on stack exchange. Creating Bug MAGETWO-46720

@thomasnordkvist
Copy link

Ok so it is a bug!

Good to know that this functionality will not change much from how i use it now, other than the function path.

/Thomas

@jhildreth
Copy link
Author

Glad to hear it's a bug. Thanks for the update!

@jhildreth
Copy link
Author

The release notes for 2.0.1 say: "Shipping address in the Orders API now exposes the shipping address value.", which I believe should address this issue.
However, after upgrading to 2.0.1, I'm still not seeing the shipping address on the data returned from /orders. Am I misunderstanding what this addresses?
Thanks!

@mujtaba2012
Copy link

Any info on when this fix is coming out?

@karanbhomiagit
Copy link

Hi @NadiyaS
Any ETA on this bug fix to be released?

@choukalos
Copy link

This should be addressed by the commits pushed on Feb 26th; closing.

@davidalger
Copy link
Member

Delivered in version 2.0.3

@karanbhomiagit
Copy link

@davidalger , @choukalos : I see that the shipping address is coming as part of response json to /rest/V1/orders GET call. Any particular reason the shipping address is coming under the "extension_attributes" section? Given that the "billing_address" comes as a separate section itself, would "shipping_address" be moved to a separate section, or would it always be under "extension_attributes" section?

"extension_attributes": { "shipping_assignments": [ { "shipping": { "address": { "address_type": "shipping", "city": "redwood city", "company": "a", "country_id": "US", "customer_address_id": 1, "email": "a@b.com", "entity_id": 1, "firstname": "Test Customer", "lastname": "Last", "parent_id": 1, "postcode": "94034", "region": "California", "region_code": "California", "region_id": 12, "street": [ "test street" ], "telephone": "3345678885" }, "method": "flatrate_flatrate", "total": { "base_shipping_amount": 20, "base_shipping_discount_amount": 0, "base_shipping_discount_tax_compensation_amnt": null, "base_shipping_incl_tax": 20, "base_shipping_tax_amount": 0, "shipping_amount": 20, "shipping_discount_amount": 0, "shipping_discount_tax_compensation_amount": 0, "shipping_incl_tax": 20, "shipping_tax_amount": 0 }

@timtt-zz
Copy link

When getting multiple orders in one call in 2.0.4, the shipping address is unfortunately incorrect. For a single order it works fine, but for multiple orders, the shipping address in extension attributes is the same for every order. If I have orders 1, 2, and 3, the shipping address for each of them will the one in order 3 - the last one in the call. Should this be filed as a separate bug?

@karanbhomiagit
Copy link

@timtt : Same thing happened for me too.
@davidalger , @choukalos : Can you please confirm and reopen this bug/tell us to create a new bug.

@choukalos
Copy link

Yes this should be filed as a separate bug - I see the linked github issue and will make sure there's a corresponding internal ticket filed under #4019.

@RUjmiak
Copy link

RUjmiak commented Jun 23, 2016

Is it possible to add shipping address to cart without setting shipping method? As it is possible with billing address (POST /V1/carts/mine/billing-address)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants