shopware/docs

Store API - No way to retrieve current active billing address? - Probably just missing in docs

AndreasA opened this issue · 5 comments

PHP Version

8.1

Shopware Version

6.4

Expected behaviour

add active billing address to either cart response or context or customer of the store API.

Actual behaviour

Context route does not provide any information for active billing address. the default address can be retrieved through the customer route but not the active billing address.

the shipping location is on the context and cart deliveries, so that is available, but I cannot see anything for the billing address. Though it probably would not hurt to also add the active shipping address with the customer route.

How to reproduce

See above.

Or maybe I just don't know the correct API ?

@keulinho Am I missing something here or is it indeed missing from the Store API currently?

Ok I have now done more testing and it seems that if I retrieve the current context, the customer object contains activeShippingAddress and activeBillingAddress.

Which are not part of the documentation: https://shopware.stoplight.io/docs/store-api/489d07a667582-fetch-the-current-context

and they also cannot be retrieved using the customer route: https://shopware.stoplight.io/docs/store-api/875599f89232e-get-information-about-current-customer as the properties are both there but set to null, and adding it as association or the default billing address, does not add any data to them.

Probably enough to adjust the docs.

shyim commented

I will take over this to the docs repository as it's a documentation issue

@AndreasA , thanks for raising this issue. There seems to be an issue with the schema generated. An internal ticket has been created to fix it.

This should be fixed by now - please see here